Skip to content

Activity for HKAnime - #11484

Open
tinahwy wants to merge 2 commits into
PreMiD:mainfrom
tinahwy:add-hkanime
Open

tinahwy wants to merge 2 commits into
PreMiD:mainfrom
tinahwy:add-hkanime

Conversation

@tinahwy

@tinahwy tinahwy commented Nov 17, 2026 •

Copy link
Copy Markdown

Description

Added Discord Rich Presence support for HKAnime, Cantonese-dubbed anime streaming website.

This activity includes the following features:

  • Displaying the selected anime title along with its episode number and episode title
  • Retrieves the thumbnail from HKAnime
  • Show playback progress when the episode is playing

Acknowledgements

Screenshots

Proof showing the activity working as expected

Screenshot 1: Browsing HKAnime

HKAnime Discord Rich Presence showing anime playback

Screenshot 2: Watching an anime

image

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • New Features
    • Added HKAnime Rich Presence support, showing when you’re browsing or watching anime.
    • While watching, the activity can display the anime title, episode number and title, and playback progress. It also indicates when playback is paused.
    • Episode details and playback status are shown when available.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Adds HKAnime service metadata and Rich Presence support. The activity displays browsing or anime and episode details. For eligible videos, it also displays paused status or playback timestamps.

Changes: HKAnime Rich Presence

Layer / File(s) Summary
Service metadata and presence setup
websites/H/HKAnime/metadata.json, websites/H/HKAnime/presence.ts
Adds HKAnime service metadata, creates the presence client, loads translations, and initializes the activity when an update event occurs.
Anime and episode details
websites/H/HKAnime/presence.ts
On play pages, the activity uses the anime title and page image when available. It displays the selected episode number and a cleaned episode title, or translated fallback text.
Video playback state
websites/H/HKAnime/presence.ts
For videos with a finite positive duration, the activity displays a paused label or playback timestamps.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant HKAnimePage
  participant PresenceUpdateHandler
  participant VideoElement
  participant RichPresenceActivity
  HKAnimePage->>PresenceUpdateHandler: UpdateData event and page path
  PresenceUpdateHandler->>VideoElement: Read duration, paused state, and playback time
  PresenceUpdateHandler->>RichPresenceActivity: Set page and playback details
  RichPresenceActivity-->>HKAnimePage: Updated presence activity
Loading

Suggested labels: activity creation

Suggested reviewers: theusaf, bas950

Merge Risk: Minimal · up to 34b85

This adds HKAnime Rich Presence support in a new, isolated integration. No concrete merge-blocking risk was identified.

Architecture risk: Low · up to 34b85

The change affects 1 system.

Changed systems: websites

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — websites (service) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in websites/H/HKAnime/metadata.json: Adds the HKAnime service metadata, including its author, description, URL matching pattern, assets, display color, anime category, and tag.
  • observed — Modified behavior in websites/H/HKAnime/presence.ts: Creates the HKAnime presence client and loads translations for browsing, paused, watching, and episode labels.
  • observed — Modified behavior in websites/H/HKAnime/presence.ts: Registers an update handler that decodes the current path and initializes a watching activity with default browsing details, state, and image.
  • observed — Modified behavior in websites/H/HKAnime/presence.ts: On /play/<title> paths, sets the anime title as the activity details, uses the page’s Open Graph image when present, and displays the selected episode number with its title after removing a date in YYYY/MM/DD form. If the title is unavailable, it uses the translated episode label; without an episode number, it uses the translated watching label.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Activity for HKAnime" matches the main change. The PR adds Discord Rich Presence support for HKAnime, a Cantonese-dubbed anime streaming site, through new metadata.json and presence.ts file…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Activity for HKAnime" matches the main change. The PR adds Discord Rich Presence support for HKAnime, a Cantonese-dubbed anime streaming site, through new metadata.json and presence.ts files. The title is short and names the service, though it does not state that the change adds Rich Presence.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

⚠️ This pull request shows signs of AI-generated slop (redundant_comments). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a596d134-fdc8-4279-9d26-fa91226803ab
Commits

Reviewing files that changed from the base of the PR and between c4286b5 and 34b8513.

Files selected for processing: 2

  • websites/H/HKAnime/metadata.json
  • websites/H/HKAnime/presence.ts
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@dimerp

dimerp Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

🖼️ Activity asset preview

Fresh pixels, hot off the CDN — I lined them all up for inspection. 👀

HKAnime (websites/H/HKAnime) — creation

Preview Source URL
logo https://i.imgur.com/4lKtB9R.png
thumbnail https://i.imgur.com/Gfn9iQ2.png

Beep boop — I refresh this comment on every push, so no need to scroll. 🤖

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant