Skip to content

feat(Rally.TV): add activity#10448

Merged
Bas950 merged 27 commits intoPreMiD:mainfrom
entorge:add-rallytv
Mar 5, 2026
Merged

feat(Rally.TV): add activity#10448
Bas950 merged 27 commits intoPreMiD:mainfrom
entorge:add-rallytv

Conversation

@entorge
Copy link
Copy Markdown
Contributor

@entorge entorge commented Jan 24, 2026

This PR adds support for Rally.TV. It tracks the current live video or highlights being watched by scraping the active .live container. It implements a string-split logic using the | separator to clean up the display across the Details and State fields in Discord

Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Copy link
Copy Markdown

@github-advanced-security github-advanced-security AI left a comment

Choose a reason for hiding this comment

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

ESLint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Comment thread websites/R/RallyTV/presence.ts Fixed
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
@theusaf theusaf changed the title Add Rally.TV presence script for PreMiD feat(Rally.TV): add activity Jan 24, 2026
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.

Activities require a metadata file. Also, please see developer documentation for how examples on how an Activity is coded

@entorge
Copy link
Copy Markdown
Contributor Author

entorge commented Jan 24, 2026

Hi @theusaf. I have updated the PR to address your points:

Metadata: Fixed metadata.json by adding apiVersion, correcting the category to videos, and switching to a local logo.png asset.

Refactoring: Rewrote presence.ts to use the UpdateData event listener and removed the manual setInterval loop to align with the current developer documentation.

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.

Still missing metadata file. Also attach screenshots showing your Activity working

Comment thread websites/R/RallyTV/presence.ts Outdated
}

const presenceData = {
type: 3,
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.

use enum rather than number

Comment thread websites/R/RallyTV/presence.ts Outdated
Comment on lines +34 to +35
updatePresence()
setInterval(updatePresence, 10000)
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.

Use the updatedata event as mentioned in documentation

Comment thread websites/R/RallyTV/presence.ts Outdated
@@ -0,0 +1,36 @@
(async () => {
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.

Script does not need to be in a top-level anonymous function

@entorge
Copy link
Copy Markdown
Contributor Author

entorge commented Jan 29, 2026

@theusaf I removed the top-level anyonymous function, switched to enum, and used the UpdateData event listener.
Regarding the metadata.json file, it appears present on my end. I'm not sure how you're not seeing it.

image_2026-01-29_212351090 image_2026-01-29_212512139 image_2026-01-29_212540246 image_2026-01-29_212608533

@theusaf
Copy link
Copy Markdown
Contributor

theusaf commented Feb 2, 2026

Please verify that you are making changes on the correct branch add-rallytv. If you go to the Files Changed tab on this page, you can see there is no metadata.json file

Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Comment thread websites/R/RallyTV/metadata.json Fixed
Added a newline at the end of the metadata.json file.

Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Comment thread websites/R/RallyTV/metadata.json Fixed
Comment thread websites/R/RallyTV/metadata.json Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Comment thread websites/R/RallyTV/metadata.json Fixed
Comment thread websites/R/RallyTV/metadata.json Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Comment thread websites/R/RallyTV/presence.ts Fixed
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Comment thread websites/R/RallyTV/presence.ts Fixed
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Comment thread websites/R/RallyTV/presence.ts Fixed
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Comment thread websites/R/RallyTV/metadata.json Fixed
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Comment thread websites/R/RallyTV/metadata.json Fixed
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
@entorge
Copy link
Copy Markdown
Contributor Author

entorge commented Feb 15, 2026

Should be good to go now.

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.

Apologies for the wait. There are a few more issues to address.

Comment thread websites/R/RallyTV/metadata.json Outdated
Comment on lines +14 to +15
"logo": "https://media.discordapp.net/attachments/960887054273769474/1472581570391969965/logo.png?ex=699317f5&is=6991c675&hm=6728347af8d2eefcc77bc5de0ccfa9e4f8d0b448d0d274b6d11c3f789d6c2f58&=&format=webp&quality=lossless&width=563&height=563",
"thumbnail": "https://media.discordapp.net/attachments/960887054273769474/1472581570777976993/thumbnail.png?ex=699317f5&is=6991c675&hm=bad4de40413ef5cbfdf165defd9086332efe0598fa2fa2b33a678904ccec9c7e&=&format=webp&quality=lossless&width=563&height=563",
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.

Unfortunately, you cannot use Discord URLs here since Discord invalidates the URL after a short period of time. Re-upload the images to a separate location and use that URL

Comment thread websites/R/RallyTV/presence.ts Outdated
type: ActivityType.Watching,
details: detailsText,
state: stateText,
largeImageKey: 'logo',
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.

Use image URL instead of Discord asset key

Updated logo and thumbnail URLs in metadata.json.

Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
@entorge
Copy link
Copy Markdown
Contributor Author

entorge commented Feb 26, 2026

I found this alternative image hosting site, let me know if this'll work.

@theusaf theusaf requested a review from Bas950 March 1, 2026 13:59
@theusaf theusaf enabled auto-merge (squash) March 1, 2026 14:00
Comment thread websites/R/RallyTV/metadata.json Outdated
Comment on lines +14 to +15
"logo": "https://i.ibb.co/C5n7tX9h/logo.png",
"thumbnail": "https://i.ibb.co/JwBpMWp9/thumbnail.png",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

images aint loading for me?

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.

they're fine on my end, just a bit delayed load time. if you have a better alternative, then out with it

Co-authored-by: Bas van Zanten <bas.van.zanten007@gmail.com>
Signed-off-by: entorge <96802968+entorge@users.noreply.github.com>
auto-merge was automatically disabled March 4, 2026 19:37

Head branch was pushed to by a user without write access

@Bas950 Bas950 merged commit 56e91d9 into PreMiD:main Mar 5, 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