aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2019-01-11 06:26:11 +0100
committerGitHub <noreply@github.com>2019-01-11 06:26:11 +0100
commit0972f367cd0b41d7737212d051d9116490d57f71 (patch)
treee34b80a8beba8c77fbc93c889c9e3d776ecf514c
parentcb6e844ac61771fb0328fdd06d62fbb0046a02aa (diff)
parent0fbd8c55a6e3b6f2857deae4b32cdf5801037ba5 (diff)
Merge pull request #15200 from wildcat2020/feature_myvideos113
[database] Set tvshow_view return maximum path
-rw-r--r--xbmc/video/VideoDatabase.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp
index 5bd5ff07a7..a924a263c0 100644
--- a/xbmc/video/VideoDatabase.cpp
+++ b/xbmc/video/VideoDatabase.cpp
@@ -410,7 +410,9 @@ void CVideoDatabase::CreateViews()
" uniqueid.value AS uniqueid_value, "
" uniqueid.type AS uniqueid_type "
"FROM tvshow"
- " LEFT JOIN tvshowlinkpath ON"
+ " LEFT JOIN (SELECT idShow, MAX(idPath) as idPath "
+ " FROM tvshowlinkpath "
+ " GROUP BY tvshowlinkpath.idShow) AS tvshowlinkpath ON "
" tvshowlinkpath.idShow=tvshow.idShow"
" LEFT JOIN path ON"
" path.idPath=tvshowlinkpath.idPath"
@@ -5453,7 +5455,7 @@ void CVideoDatabase::UpdateTables(int iVersion)
int CVideoDatabase::GetSchemaVersion() const
{
- return 114;
+ return 115;
}
bool CVideoDatabase::LookupByFolders(const std::string &path, bool shows)