-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Pi Fansubs): Movie or TV Show as activity name #9372
base: main
Are you sure you want to change the base?
Conversation
websites/P/Pi Fansubs/presence.ts
Outdated
presenceData.largeImageKey = getImage( | ||
'.mark-1 > div:nth-child(1) > img:nth-child(1)', | ||
) | ||
presenceData.details = 'No Pi Fansubs' | ||
// eslint-disable-next-line regexp/no-unused-capturing-group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not ignore eslint rules unless necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need this regex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove the unused capturing groups?
/: \d+x\d+/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR addresses issue #9366 by updating the activity name handling for Pi Fansubs, specifically for movies and TV shows. Key changes include:
- Importing getTimestamps from premid and replacing presence.getTimestamps calls.
- Replacing the assignment of presenceData.state/details with presenceData.name and a constant details string.
- Adjusting regex logic for TV series activity naming.
Reviewed Changes
File | Description |
---|---|
websites/P/Pi Fansubs/presence.ts | Updated activity properties for movie and TV show presentations |
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
websites/P/Pi Fansubs/presence.ts:128
- A constant assignment for details may lead to confusion in future updates. Verify that this static value meets design requirements or consider a more informative assignment.
presenceData.details = 'No Pi Fansubs'
presenceData.largeImageKey = getImage('.poster > img:nth-child(1)') | ||
presenceData.details = 'No Pi Fansubs' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a constant string for details may not provide meaningful information for the activity. Consider using a more descriptive or dynamic value to clarify the activity's context.
presenceData.details = 'No Pi Fansubs' | |
presenceData.details = textContent('.sheader > div:nth-child(2) > h1:nth-child(1)') || 'No Pi Fansubs' |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Description
Resolves #9366
Acknowledgements
yarn format
Screenshots
Proof showing the creation/modification is working as expected