aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrystalP <crystalp@kodi.tv>2024-01-19 00:00:27 -0500
committerCrystalP <crystalp@kodi.tv>2024-01-21 12:26:56 -0500
commitac5a2211777f8a2709198eff94d77324bf4f4b7a (patch)
tree2eef401dbfd545a8f301cb55fbbe11026a700d90
parent95055e41ab5c2e3f34f4dcb1ca5b72398b67d52d (diff)
[videodb] Ignore empty art
url is set to empty for Choose Art > no art
-rw-r--r--xbmc/video/VideoDatabase.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp
index 9853269b43..93acf0cf55 100644
--- a/xbmc/video/VideoDatabase.cpp
+++ b/xbmc/video/VideoDatabase.cpp
@@ -4958,16 +4958,22 @@ bool CVideoDatabase::GetArtForAsset(int assetId,
"FROM art "
"LEFT JOIN videoversion vv "
" ON art.media_id = vv.idMedia AND art.media_type = vv.media_type "
- "WHERE (art.media_id = %i AND art.media_type = '%s') "
- "OR(vv.idFile = %i) ",
+ "WHERE art.url <> '' "
+ "AND ( "
+ " (art.media_id = %i AND art.media_type = '%s') "
+ " OR (vv.idFile = %i) "
+ ")",
assetId, MediaTypeVideoVersion, assetId);
}
else
{
sql = PrepareSQL("SELECT media_type, type, url "
"FROM art "
- "WHERE (media_id = %i AND media_type = '%s') "
- "OR (media_id = %i AND media_type = '%s')",
+ "WHERE art.url <> '' "
+ "AND ( "
+ " (media_id = %i AND media_type = '%s') "
+ " OR (media_id = %i AND media_type = '%s')"
+ ")",
assetId, MediaTypeVideoVersion, ownerMediaId, mediaType.c_str());
}