Skip to content
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

Fix playing next episode when autoplay is disabled #5398

Merged

Conversation

ConnorS1110
Copy link
Contributor

@ConnorS1110 ConnorS1110 commented Apr 20, 2024

This issue was caused by us doing the user flag check during playlist creation, rather than when an episode has ended. Fixing this will simultaneously fix the player automatically playing the next episode with the flag Play next episode automatically disabled and allow proper usage of the skip to next/previous buttons for people with this flag disabled.

Changes
Moved checking the user setting flag from where the playlist is loaded to where we attempt to load the next episode after playback has been stopped (ie reaching the end of an episode).

Issues
Fixes #5382
Fixes #2596

@ConnorS1110 ConnorS1110 requested a review from a team as a code owner April 20, 2024 05:44
@ConnorS1110 ConnorS1110 force-pushed the fix-broken-next-episode-setting branch 2 times, most recently from 051f2f0 to f0ba0a6 Compare April 20, 2024 07:39
Copy link
Contributor

@dmitrylyzo dmitrylyzo left a comment

Choose a reason for hiding this comment

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

LGTM.
And thank you for contribution.

@ConnorS1110 ConnorS1110 force-pushed the fix-broken-next-episode-setting branch from f0ba0a6 to 1ae71aa Compare April 20, 2024 17:31
@dmitrylyzo
Copy link
Contributor

The commit has now become complex/non-atomic.
I would just ignore SonarCloud - it was not relevant to your changes.
At the very least, the refactoring should be done in a separate commit.

@ConnorS1110 ConnorS1110 force-pushed the fix-broken-next-episode-setting branch from 1ae71aa to e8c3e5d Compare April 20, 2024 18:59
@ConnorS1110
Copy link
Contributor Author

The commit has now become complex/non-atomic. I would just ignore SonarCloud - it was not relevant to your changes. At the very least, the refactoring should be done in a separate commit.

I put it in a separate commit. If you still would rather I drop it altogether I can do that

@ConnorS1110 ConnorS1110 force-pushed the fix-broken-next-episode-setting branch from e8c3e5d to 46f2df5 Compare April 20, 2024 19:11
Copy link
Contributor

@dmitrylyzo dmitrylyzo left a comment

Choose a reason for hiding this comment

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

Refactoring changes require more attention, i.e. more time to review.

src/components/playback/playbackmanager.js Show resolved Hide resolved
src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
@ConnorS1110 ConnorS1110 force-pushed the fix-broken-next-episode-setting branch from 46f2df5 to 6ad5479 Compare April 20, 2024 21:39
Copy link
Contributor

@dmitrylyzo dmitrylyzo left a comment

Choose a reason for hiding this comment

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

The formatting suggestions are just nitpicking. I'm not sure we have a strict code style for such cases. 😅

src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
@ConnorS1110 ConnorS1110 force-pushed the fix-broken-next-episode-setting branch from 6ad5479 to 588da3c Compare April 21, 2024 00:59
@ConnorS1110 ConnorS1110 force-pushed the fix-broken-next-episode-setting branch from 588da3c to 55de33c Compare April 22, 2024 19:32
src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
src/components/playback/playbackmanager.js Outdated Show resolved Hide resolved
@ConnorS1110 ConnorS1110 force-pushed the fix-broken-next-episode-setting branch from 55de33c to 9462089 Compare April 24, 2024 00:09
@dmitrylyzo
Copy link
Contributor

Little note:
You must refresh the web client for the changes to take effect.
Play next episode automatically is stored in the user configuration, which is cached by ApiClient, but the cache is not updated when the configuration is sent to the server.
We could fix this in ApiClient, but it is frozen/archived. So it is better to just migrate the playback settings to the new SDK (not in this PR).

@jellyfin-bot

This comment has been minimized.

@jellyfin-bot jellyfin-bot added the merge conflict Conflicts prevent merging label Apr 24, 2024
@ConnorS1110 ConnorS1110 force-pushed the fix-broken-next-episode-setting branch from 9462089 to 82b08f7 Compare April 24, 2024 21:26
@jellyfin-bot jellyfin-bot removed the merge conflict Conflicts prevent merging label Apr 24, 2024
@ConnorS1110 ConnorS1110 force-pushed the fix-broken-next-episode-setting branch from 82b08f7 to 595983f Compare April 26, 2024 01:29
Copy link

sonarcloud bot commented Apr 26, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.9% Duplication on New Code

See analysis details on SonarCloud

@jellyfin-bot
Copy link
Collaborator

Cloudflare Pages deployment

Latest commit 595983f
Status ✅ Deployed!
Preview URL https://252719db.jellyfin-web.pages.dev
Type 🔀 Preview

View build logs
View bot logs

@nielsvanvelzen nielsvanvelzen added this to In progress in Release 10.9.z via automation Apr 30, 2024
@nielsvanvelzen nielsvanvelzen added this to the v10.9.0 milestone Apr 30, 2024
@nielsvanvelzen nielsvanvelzen added bug Something isn't working playback This PR or issue mainly concerns playback labels Apr 30, 2024
@thornbill thornbill changed the title Fix incorrect flag check preventing expected behavior when navigating to next episode Fix play next when autoplay is disabled Apr 30, 2024
@thornbill thornbill added the enhancement Improve existing functionality or small fixes label Apr 30, 2024
@thornbill thornbill changed the title Fix play next when autoplay is disabled Fix playing next episode when autoplay is disabled Apr 30, 2024
@thornbill thornbill merged commit 573e9ab into jellyfin:master Apr 30, 2024
12 checks passed
Release 10.9.z automation moved this from In progress to Done Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement Improve existing functionality or small fixes playback This PR or issue mainly concerns playback
Projects
5 participants