Skip to content

Commit

Permalink
videodb: fix smart playlists not honoring "Show empty TV shows" setting.
Browse files Browse the repository at this point in the history
Looks like moving the setting check from GetTvShowsByWhere to GetTvShowsNav in
PR 5752 broke smart playlists as they were previously honoring the advanced
setting (hideemptyseries) and then the GUI one.
Previous behavior is restored by adding additional logic in GetItems.
  • Loading branch information
anaconda committed Jan 10, 2016
1 parent f8a52f8 commit ef513ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xbmc/video/VideoDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6216,7 +6216,12 @@ bool CVideoDatabase::GetItems(const std::string &strBaseDir, VIDEODB_CONTENT_TYP
if (StringUtils::EqualsNoCase(itemType, "movies") && (mediaType == VIDEODB_CONTENT_MOVIES || mediaType == VIDEODB_CONTENT_MOVIE_SETS))
return GetMoviesByWhere(strBaseDir, filter, items, sortDescription);
else if (StringUtils::EqualsNoCase(itemType, "tvshows") && mediaType == VIDEODB_CONTENT_TVSHOWS)
return GetTvShowsByWhere(strBaseDir, filter, items, sortDescription);
{
Filter filter2(filter);
if (!CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOLIBRARY_SHOWEMPTYTVSHOWS))
filter2.AppendWhere("totalCount IS NOT NULL AND totalCount > 0");
return GetTvShowsByWhere(strBaseDir, filter2, items, sortDescription);
}
else if (StringUtils::EqualsNoCase(itemType, "musicvideos") && mediaType == VIDEODB_CONTENT_MUSICVIDEOS)
return GetMusicVideosByWhere(strBaseDir, filter, items, true, sortDescription);
else if (StringUtils::EqualsNoCase(itemType, "episodes") && mediaType == VIDEODB_CONTENT_EPISODES)
Expand Down

0 comments on commit ef513ec

Please sign in to comment.