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

Skipping a media segment that goes to the end of the file doesn't mark the file played. #4165

Closed
reacocard opened this issue Nov 5, 2024 · 7 comments · Fixed by #4167, #4189 or #4197
Closed
Labels
bug Something isn't working

Comments

@reacocard
Copy link
Contributor

Describe the bug

  1. Have an episode in Jellyfin that has a media segment covering from a point after "Minimum Resume Percentage" but before "Maximum Resume Percentage", to the end of the file.
  2. Turn on ask to skip for that segment's type.
  3. Play the file, and on being prompted to skip the segment, skip it.
  4. Observe that Jellyfin offers to resume from the point of the skip, rather than marking the file played.

I hit this on a series with very short episodes, so the min/max resume was way shorter than the ending credits.

Logs

This bit of logcat looks relevant - it's submitting the time of the skip rather than the time it tried to seek to.

11-04 22:23:12.646 20015 20015 D PlaybackController: Trying to seek from 64316 to 137191
11-04 22:23:12.646 20015 20015 D PlaybackController: Container: ts
11-04 22:23:12.647 20015 20015 D PlaybackController: stop called at 64377
11-04 22:23:12.650 20015 20015 I ReportingHelper$reportStopped: Reporting EPISODE_TITLE playback stopped at 643770000

Application version

compiled from commit f474e2a

Where did you install the app from?

Sideloaded APK

Device information

Nvidia Shield Pro 2017

Android version

Android 11, 2022-04-05 patch

Jellyfin server version

10.10.0

@nielsvanvelzen
Copy link
Member

Good find, fixed that for the next beta!

@reacocard
Copy link
Contributor Author

I'm afraid this is still happening even with that fix. I added a bit of local debug logging and determined it's somehow getting reset in refreshCurrentPosition, specifically the if (finishedInitialSeek) { branch, but wasn't able to determine how to fix that.

11-05 15:51:56.648 26106 26106 D PlaybackController: Trying to seek from 63131 to 137191
11-05 15:51:56.648 26106 26106 D PlaybackController: Container: ts
11-05 15:51:56.649 26106 26106 D PlaybackController: DO NOT COMMIT - set mCurrentPosition to 137191
11-05 15:51:56.650 26106 26106 D PlaybackController: DO NOT COMMIT refreshCurrentPosition - finishedInitialSeek branch
11-05 15:51:56.650 26106 26106 D PlaybackController: DO NOT COMMIT refreshCurrentPosition - current 137191, new 63508
11-05 15:51:56.651 26106 26106 D PlaybackController: stop called at 63508
11-05 15:51:56.678 26106 26106 D PlaybackController: DO NOT COMMIT refreshCurrentPosition - current 63508, new -1
11-05 15:51:56.679 26106 26106 D PlaybackController: stop called at 63508
11-05 15:51:56.767 26106 26106 D PlaybackController: DO NOT COMMIT refreshCurrentPosition - current 63508, new -1
11-05 15:51:56.767 26106 26106 D PlaybackController: stop called at 63508

@nielsvanvelzen nielsvanvelzen reopened this Nov 6, 2024
@reacocard
Copy link
Contributor Author

Poked at it again today and found if I also set currentSkipPos = getDuration(); then it works.

11-06 14:45:40.148 10350 10350 D PlaybackController: Trying to seek from 63684 to 136213
11-06 14:45:40.148 10350 10350 D PlaybackController: Container: ts
11-06 14:45:40.149 10350 10350 D PlaybackController: DO NOT COMMIT - set mCurrentPosition to 136213
11-06 14:45:40.149 10350 10350 D PlaybackController: DO NOT COMMIT refreshCurrentPosition - current 136213, new -1
11-06 14:45:40.149 10350 10350 D PlaybackController: stop called at 136213

@nielsvanvelzen
Copy link
Member

I think I messed up something when I cleaned up my debug logging in the initial fix. Should now be fixed for real with the next beta 😄

@reacocard
Copy link
Contributor Author

Unfortunately that still hasn't fixed it

11-10 15:29:35.427 32309 32309 D PlaybackController: DO NOT COMMIT refreshCurrentPosition - current 63213, new 63639
11-10 15:29:35.575 32309 32309 D PlaybackController: Trying to seek from 63639 to 136213
11-10 15:29:35.576 32309 32309 D PlaybackController: Container: ts
11-10 15:29:35.576 32309 32309 D PlaybackController: DO NOT COMMIT - set mCurrentPosition to 136213
11-10 15:29:35.577 32309 32309 D PlaybackController: DO NOT COMMIT refreshCurrentPosition - finishedInitialSeek branch
11-10 15:29:35.596 32309 32309 D PlaybackController: DO NOT COMMIT refreshCurrentPosition - current 136213, new 63801
11-10 15:29:35.596 32309 32309 D PlaybackController: stop called at 63801
11-10 15:29:35.617 32309 32309 D PlaybackController: DO NOT COMMIT refreshCurrentPosition - current 63801, new -1
11-10 15:29:35.618 32309 32309 D PlaybackController: stop called at 63801
11-10 15:29:35.718 32309 32309 D PlaybackController: DO NOT COMMIT refreshCurrentPosition - current 63801, new -1
11-10 15:29:35.718 32309 32309 D PlaybackController: stop called at 63801

@nielsvanvelzen
Copy link
Member

Ok another attempt, this should finally fix it: #4197. I'll wait with merging until you've confirmed it to work this time 😅

@reacocard
Copy link
Contributor Author

Yep that's working, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment