Skip to content

fix(HBO Max): restructure codebase and improve presence data#10628

Merged
theusaf merged 8 commits intoPreMiD:mainfrom
colourfulplanets:main
Apr 15, 2026
Merged

fix(HBO Max): restructure codebase and improve presence data#10628
theusaf merged 8 commits intoPreMiD:mainfrom
colourfulplanets:main

Conversation

@colourfulplanets
Copy link
Copy Markdown
Contributor

Description

Restructured the HBO Max activity to match a modern codebase pattern:

  • Added types.ts with proper TypeScript interfaces for the Max API response
  • Moved fetch logic into functions/fetchPageInfo.ts with p-limit to prevent race conditions
  • Improved cover art selection (prefers boxart/tile/poster image kinds)
  • Added episode and movie descriptions to presence state
  • Added Privacy Mode, Timestamps, and Browsing Status settings
  • Added Watch/View buttons for episodes, series and movies

Acknowledgements

  • I read the Activity Guidelines
  • I linted the code by running npm run lint
  • The PR title follows the repo's commit conventions

Screenshots

Screenshot 2026-03-31 172547 Screenshot 2026-03-31 172612 Screenshot 2026-03-31 172625 Screenshot 2026-03-31 172642 Screenshot 2026-03-31 172656


const limit = pLimit(1)

// eslint-disable-next-line import/no-mutable-exports
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid disabling eslint unless absolutely necessary

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! I replaced the mutable export with a getPageInfo() getter function to avoid disabling ESLint.

Comment thread websites/H/HBO Max/functions/fetchPageInfo.ts Fixed
Comment thread websites/H/HBO Max/presence.ts Fixed
Comment thread websites/H/HBO Max/types.ts Fixed
@colourfulplanets
Copy link
Copy Markdown
Contributor Author

Hey @theusaf, just wanted to check if you’ve had a chance to review this PR. All requested changes have been applied and the branch is up-to-date. Thanks!

Copy link
Copy Markdown
Contributor

@theusaf theusaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like your ts files has extra \r characters near the end of them on some lines

@colourfulplanets
Copy link
Copy Markdown
Contributor Author

Hey @theusaf, the \r characters have been removed and line endings are now consistent (LF). All set on my end. Thanks!

Comment thread websites/H/HBO Max/types.ts
@colourfulplanets
Copy link
Copy Markdown
Contributor Author

Hey @theusaf, thanks for reviewing! I double checked types.ts and all line endings are now set to LF, with a newline at the end of the file. Let me know if there’s anything else you want me to adjust.

@colourfulplanets
Copy link
Copy Markdown
Contributor Author

Hey @theusaf, just checking in, were you able to re-run the check on your side after the latest update? Everything should now be consistent with LF + trailing newline. Let me know if it’s good to go

@theusaf theusaf enabled auto-merge (squash) April 13, 2026 17:27
@theusaf theusaf requested a review from Bas950 April 13, 2026 17:27
@theusaf theusaf merged commit 5f11ca2 into PreMiD:main Apr 15, 2026
5 checks passed
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.

4 participants