From 7ac2af688ed8cb61cddf1ed0aed070b415913d48 Mon Sep 17 00:00:00 2001 From: arnova Date: Sun, 1 Sep 2019 09:21:19 +0200 Subject: [PATCH] changed: Clear resume bookmarks also when marking as unwatched --- xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp b/xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp index 23a690de5c77e..989710a2f4c1b 100644 --- a/xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp +++ b/xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp @@ -81,15 +81,16 @@ bool CVideoLibraryMarkWatchedJob::Work(CVideoDatabase &db) for (std::vector::const_iterator iter = markItems.begin(); iter != markItems.end(); ++iter) { CFileItemPtr item = *iter; - if (m_mark) - { - std::string path(item->GetPath()); - if (item->HasVideoInfoTag() && !item->GetVideoInfoTag()->GetPath().empty()) - path = item->GetVideoInfoTag()->GetPath(); - db.ClearBookMarksOfFile(path, CBookmark::RESUME); + std::string path(item->GetPath()); + if (item->HasVideoInfoTag() && !item->GetVideoInfoTag()->GetPath().empty()) + path = item->GetVideoInfoTag()->GetPath(); + + // With both mark as watched and unwatched we want the resume bookmarks to be reset + db.ClearBookMarksOfFile(path, CBookmark::RESUME); + + if (m_mark) db.IncrementPlayCount(*item); - } else db.SetPlayCount(*item, 0); }