aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/video/VideoDatabase.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp
index e7444f77aa..9e352e8309 100644
--- a/xbmc/video/VideoDatabase.cpp
+++ b/xbmc/video/VideoDatabase.cpp
@@ -7136,7 +7136,13 @@ 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 extFilter = filter;
+ if (!CServiceBroker::GetSettingsComponent()->GetSettings()->
+ GetBool(CSettings::SETTING_VIDEOLIBRARY_SHOWEMPTYTVSHOWS))
+ extFilter.AppendWhere("totalCount IS NOT NULL AND totalCount > 0");
+ return GetTvShowsByWhere(strBaseDir, extFilter, 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)