-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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(RTLplay): revamp 2.0.0 + features added #8910
base: main
Are you sure you want to change the base?
Conversation
…/Presences into RTLplay_30-10-2024
websites/R/RTLplay/util.ts
Outdated
// Copy of the function in Youtube utils | ||
let cachedTime = 0; | ||
export function adjustTimeError(time: number, acceptableError: number): number { | ||
if (Math.abs(time - cachedTime) > acceptableError) cachedTime = time; | ||
return cachedTime; | ||
} |
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.
this shouldn't be needed anymore.
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.
Hi @Bas950 !
I wanted to add the features keeping in mind that it works correctly on older versions too. I noticed that with Version: 2.7.0 (ba99913), when a media is played, the extension spammed headless_sessions in the service worker because the start timestamp was updated too fast, resulting in a lot of headless_sessions failing in rate limited. This meant that the change to other pages was much less responsive or was blocking or taking a long time because I guess there's probably a queue set up for status discord changes. So I looked at how other presences handled timestamps, found this function and it solved the problem. The headless_sessions stabilize after a while and only send when necessary, and the page change is more responsive.
I also tested with the latest recoded build Version: 2.7.0 (e9ff721) if this problem existed and it doesn't. So I agree with you and I came to the conclusion that this function was temporary and could be removed in the future. During development I went back and forth between the 2 versions to see if everything worked as I imagined it would in both.
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.
@Timeraa might be able to confirm, but I don't think we will release these presences to the current bundled extension version. So it will be released with the new alpha/beta version.
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'm not quite sure, I hope to finish 2.7.0 this year but no promises there but the spamming issue still somewhat happens with that function on 2.6.x because of a broken if check
Description
Added features :
Changes/fixes/qol:
So, with all that, I modified the version from 1.0.3 to 2.0.0
Previous look:
#8605
Acknowledgements
yarn format
Screenshots
Proof showing the creation/modification is working as expected
https://imgur.com/a/vFVSzog
Home page:
Search page:
Media page
Watching a TV Show (usePresenceName setting)
Watching a livestream
Radio livestream (music clip channel)
Regular radio player (bel rtl and radio contact websites)