Skip to content

Commit

Permalink
[videodb] - evaluate the setting for hiding watched movies/episodes in
Browse files Browse the repository at this point in the history
recently added lists
  • Loading branch information
Memphiz committed Nov 18, 2014
1 parent 3459b2e commit 1508ff4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions xbmc/video/VideoDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6601,6 +6601,10 @@ bool CVideoDatabase::GetRecentlyAddedMoviesNav(const CStdString& strBaseDir, CFi
Filter filter;
filter.order = "dateAdded desc, idMovie desc";
filter.limit = PrepareSQL("%u", limit ? limit : g_advancedSettings.m_iVideoLibraryRecentlyAddedItems);

if (CSettings::Get().GetBool("videolibrary.hiderecentlywatchedmovies"))
filter.AppendWhere("playCount > 0");// only query unwatched items

return GetMoviesByWhere(strBaseDir, filter, items);
}

Expand All @@ -6609,6 +6613,10 @@ bool CVideoDatabase::GetRecentlyAddedEpisodesNav(const CStdString& strBaseDir, C
Filter filter;
filter.order = "dateAdded desc, idEpisode desc";
filter.limit = PrepareSQL("%u", limit ? limit : g_advancedSettings.m_iVideoLibraryRecentlyAddedItems);

if (CSettings::Get().GetBool("videolibrary.hiderecentlywatchedepisodes"))
filter.AppendWhere("playCount > 0");// only query unwatched items

return GetEpisodesByWhere(strBaseDir, filter, items, false);
}

Expand Down

0 comments on commit 1508ff4

Please sign in to comment.