diff options
author | Arno van Amersfoort <arnova77@gmail.com> | 2019-09-09 08:37:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-09 08:37:15 +0200 |
commit | 738e205e1ac73431dd528f7aea60b4efc6c97223 (patch) | |
tree | 836bb94ace10198f657eb6a54e92bb12a5f8a9fb | |
parent | 8ad9ab2b451349394e818a5ecb470c56d34915b7 (diff) | |
parent | c64700fae7bdf56fd791176b3fd2e8c34ccafe41 (diff) |
Merge pull request #16554 from arnova/mark_unwatched_no_resume
changed: Clear resume bookmarks also when marking as unwatched
-rw-r--r-- | xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp b/xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp index bcb892cf68..a20837ac99 100644 --- a/xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp +++ b/xbmc/video/jobs/VideoLibraryMarkWatchedJob.cpp @@ -89,15 +89,16 @@ bool CVideoLibraryMarkWatchedJob::Work(CVideoDatabase &db) for (std::vector<CFileItemPtr>::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); } |