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

[video] Fix watched state / last played not preserved on internet update #23667

Merged
merged 1 commit into from Aug 26, 2023

Conversation

ksooo
Copy link
Member

@ksooo ksooo commented Aug 26, 2023

… of movies / TV show episodes.

Fixes a regression introduced with #20842 (@DaVukovic fyi), Changing the default value of advanced settings m_bVideoLibraryImportWatchedState to true has an unexpected side effect.

When refreshing a movie/episode data from the internet and abovementioned setting is set to true, this triggers a bug that resets the play count of the movie/episode to zero, which means movie/episode is unwatched. Internet update does never provide updated play counts, but the code that stores the new values into the video database ignores this fact.

To reproduce:

  1. Ensure importwatchedstate is not manually set to false in advancedsettings.xml
  2. Open the Video Info Dialog for a TV show that has some watched episodes
  3. Push the Refresh button
  4. Confirm to update info including info for all episodes
    ==> All formerly episodes marked watched are now unwatched again.

@enen92 fix is trivial - like we already do for resume points, we need to check validity of the play count before overwriting existing database value. Code review should be easy.

@fuzzard this should be backported.

@ksooo ksooo added Type: Fix non-breaking change which fixes an issue Backport: Needed Component: Video v21 Omega labels Aug 26, 2023
@ksooo ksooo added this to the Omega 21.0 Alpha 3 milestone Aug 26, 2023
@ksooo ksooo requested a review from enen92 August 26, 2023 12:41
@ksooo ksooo merged commit c170e83 into xbmc:master Aug 26, 2023
2 checks passed
@ksooo ksooo deleted the video-fix-watched-state-on-refresh branch August 26, 2023 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport: Done Component: Video Type: Fix non-breaking change which fixes an issue v21 Omega
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants