aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorksooo <3226626+ksooo@users.noreply.github.com>2023-08-19 15:33:01 +0200
committerksooo <3226626+ksooo@users.noreply.github.com>2023-08-26 18:23:08 +0200
commit5efb53aecac164464b776a9f196cf268b2d78801 (patch)
tree4d7362019f8e95b66ed9a5218fb95ece3214e6db
parenta6f4852f8d93bee1a43ebabd87daa1e08046b782 (diff)
[video] Fix watched state / last played not preserved on internet update of movies / TV show episodes.
-rw-r--r--xbmc/video/VideoInfoScanner.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/xbmc/video/VideoInfoScanner.cpp b/xbmc/video/VideoInfoScanner.cpp
index 7008205bfa..92fa5c191f 100644
--- a/xbmc/video/VideoInfoScanner.cpp
+++ b/xbmc/video/VideoInfoScanner.cpp
@@ -1454,10 +1454,12 @@ namespace VIDEO
if (!pItem->m_bIsFolder)
{
- if (CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_bVideoLibraryImportWatchedState || libraryImport)
+ const auto advancedSettings = CServiceBroker::GetSettingsComponent()->GetAdvancedSettings();
+ if ((libraryImport || advancedSettings->m_bVideoLibraryImportWatchedState) &&
+ (movieDetails.IsPlayCountSet() || movieDetails.m_lastPlayed.IsValid()))
m_database.SetPlayCount(*pItem, movieDetails.GetPlayCount(), movieDetails.m_lastPlayed);
- if ((CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_bVideoLibraryImportResumePoint || libraryImport) &&
+ if ((libraryImport || advancedSettings->m_bVideoLibraryImportResumePoint) &&
movieDetails.GetResumePoint().IsSet())
m_database.AddBookMarkToFile(pItem->GetPath(), movieDetails.GetResumePoint(), CBookmark::RESUME);
}