Skip to content

Commit

Permalink
Remove a useless join in season_view
Browse files Browse the repository at this point in the history
  • Loading branch information
phate89 committed Nov 12, 2015
1 parent 0d8015f commit e4188de
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions xbmc/video/VideoDatabase.cpp
Expand Up @@ -408,16 +408,16 @@ void CVideoDatabase::CreateViews()
" tvshow_view.c%02d AS genre," " tvshow_view.c%02d AS genre,"
" tvshow_view.c%02d AS studio," " tvshow_view.c%02d AS studio,"
" tvshow_view.c%02d AS mpaa," " tvshow_view.c%02d AS mpaa,"
" count(DISTINCT episode_view.idEpisode) AS episodes," " count(DISTINCT episode.idEpisode) AS episodes,"
" count(files.playCount) AS playCount," " count(files.playCount) AS playCount,"
" min(episode_view.c%02d) AS aired " " min(episode.c%02d) AS aired "
"FROM seasons" "FROM seasons"
" JOIN tvshow_view ON" " JOIN tvshow_view ON"
" tvshow_view.idShow = seasons.idShow" " tvshow_view.idShow = seasons.idShow"
" JOIN episode_view ON" " JOIN episode ON"
" episode_view.idShow = seasons.idShow AND episode_view.c%02d = seasons.season" " episode.idShow = seasons.idShow AND episode.c%02d = seasons.season"
" JOIN files ON" " JOIN files ON"
" files.idFile = episode_view.idFile " " files.idFile = episode.idFile "
"GROUP BY seasons.idSeason", "GROUP BY seasons.idSeason",
VIDEODB_ID_TV_TITLE, VIDEODB_ID_TV_PLOT, VIDEODB_ID_TV_PREMIERED, VIDEODB_ID_TV_TITLE, VIDEODB_ID_TV_PLOT, VIDEODB_ID_TV_PREMIERED,
VIDEODB_ID_TV_GENRE, VIDEODB_ID_TV_STUDIOS, VIDEODB_ID_TV_MPAA, VIDEODB_ID_TV_GENRE, VIDEODB_ID_TV_STUDIOS, VIDEODB_ID_TV_MPAA,
Expand Down Expand Up @@ -4684,7 +4684,7 @@ void CVideoDatabase::UpdateTables(int iVersion)


int CVideoDatabase::GetSchemaVersion() const int CVideoDatabase::GetSchemaVersion() const
{ {
return 99; return 100;
} }


bool CVideoDatabase::LookupByFolders(const std::string &path, bool shows) bool CVideoDatabase::LookupByFolders(const std::string &path, bool shows)
Expand Down

0 comments on commit e4188de

Please sign in to comment.