Commit afa789e8 authored by Tranter Madi's avatar Tranter Madi 🌧 Committed by Nate Graham
Browse files

Return the right embbed cover art of tracks that don't have the Album info

parent a999a612
Pipeline #171527 passed with stage
in 13 minutes and 20 seconds
......@@ -4101,6 +4101,10 @@ void DatabaseInterface::initRequest()
"`Tracks` tracksCover "
"WHERE "
"tracksCover.`HasEmbeddedCover` = 1 AND "
"( "
"(tracksCover.`AlbumTitle` IS NULL AND "
"tracksCover.`FileName` = tracks.`FileName` ) OR "
"( "
"tracksCover.`AlbumTitle` = album.`Title` AND "
"(tracksCover.`AlbumArtistName` = album.`ArtistName` OR "
"(tracksCover.`AlbumArtistName` IS NULL AND "
......@@ -4108,6 +4112,8 @@ void DatabaseInterface::initRequest()
") "
") AND "
"tracksCover.`AlbumPath` = album.`AlbumPath` "
") "
") "
") as EmbeddedCover "
"FROM "
"`TracksData` tracksMapping "
......@@ -4251,6 +4257,10 @@ void DatabaseInterface::initRequest()
"`Tracks` tracksCover "
"WHERE "
"tracksCover.`HasEmbeddedCover` = 1 AND "
"( "
"(tracksCover.`AlbumTitle` IS NULL AND "
"tracksCover.`FileName` = tracks.`FileName` ) OR "
"( "
"tracksCover.`AlbumTitle` = album.`Title` AND "
"(tracksCover.`AlbumArtistName` = album.`ArtistName` OR "
"(tracksCover.`AlbumArtistName` IS NULL AND "
......@@ -4258,6 +4268,8 @@ void DatabaseInterface::initRequest()
") "
") AND "
"tracksCover.`AlbumPath` = album.`AlbumPath` "
") "
") "
") as EmbeddedCover "
"FROM "
"`Tracks` tracks, "
......@@ -4376,6 +4388,10 @@ void DatabaseInterface::initRequest()
"`Tracks` tracksCover "
"WHERE "
"tracksCover.`HasEmbeddedCover` = 1 AND "
"( "
"(tracksCover.`AlbumTitle` IS NULL AND "
"tracksCover.`FileName` = tracks.`FileName` ) OR "
"( "
"tracksCover.`AlbumTitle` = album.`Title` AND "
"(tracksCover.`AlbumArtistName` = album.`ArtistName` OR "
"(tracksCover.`AlbumArtistName` IS NULL AND "
......@@ -4383,6 +4399,8 @@ void DatabaseInterface::initRequest()
") "
") AND "
"tracksCover.`AlbumPath` = album.`AlbumPath` "
") "
") "
") as EmbeddedCover "
"FROM "
"`Tracks` tracks, "
......@@ -4768,6 +4786,10 @@ void DatabaseInterface::initRequest()
"`Tracks` tracksCover "
"WHERE "
"tracksCover.`HasEmbeddedCover` = 1 AND "
"( "
"(tracksCover.`AlbumTitle` IS NULL AND "
"tracksCover.`FileName` = tracks.`FileName` ) OR "
"( "
"tracksCover.`AlbumTitle` = album.`Title` AND "
"(tracksCover.`AlbumArtistName` = album.`ArtistName` OR "
"(tracksCover.`AlbumArtistName` IS NULL AND "
......@@ -4775,6 +4797,8 @@ void DatabaseInterface::initRequest()
") "
") AND "
"tracksCover.`AlbumPath` = album.`AlbumPath` "
") "
") "
") as EmbeddedCover "
"FROM "
"`Tracks` tracks, "
......@@ -4935,6 +4959,10 @@ void DatabaseInterface::initRequest()
"`Tracks` tracksCover "
"WHERE "
"tracksCover.`HasEmbeddedCover` = 1 AND "
"( "
"(tracksCover.`AlbumTitle` IS NULL AND "
"tracksCover.`FileName` = tracks.`FileName` ) OR "
"( "
"tracksCover.`AlbumTitle` = album.`Title` AND "
"(tracksCover.`AlbumArtistName` = album.`ArtistName` OR "
"(tracksCover.`AlbumArtistName` IS NULL AND "
......@@ -4942,6 +4970,8 @@ void DatabaseInterface::initRequest()
") "
") AND "
"tracksCover.`AlbumPath` = album.`AlbumPath` "
") "
") "
") as EmbeddedCover "
"FROM "
"`Tracks` tracks, "
......@@ -5047,6 +5077,10 @@ void DatabaseInterface::initRequest()
"`Tracks` tracksCover "
"WHERE "
"tracksCover.`HasEmbeddedCover` = 1 AND "
"( "
"(tracksCover.`AlbumTitle` IS NULL AND "
"tracksCover.`FileName` = tracks.`FileName` ) OR "
"( "
"tracksCover.`AlbumTitle` = album.`Title` AND "
"(tracksCover.`AlbumArtistName` = album.`ArtistName` OR "
"(tracksCover.`AlbumArtistName` IS NULL AND "
......@@ -5054,6 +5088,8 @@ void DatabaseInterface::initRequest()
") "
") AND "
"tracksCover.`AlbumPath` = album.`AlbumPath` "
") "
") "
") as EmbeddedCover "
"FROM "
"`Tracks` tracks, "
......@@ -5454,6 +5490,10 @@ void DatabaseInterface::initRequest()
"`Tracks` tracksCover "
"WHERE "
"tracksCover.`HasEmbeddedCover` = 1 AND "
"( "
"(tracksCover.`AlbumTitle` IS NULL AND "
"tracksCover.`FileName` = tracks.`FileName` ) OR "
"( "
"tracksCover.`AlbumTitle` = album.`Title` AND "
"(tracksCover.`AlbumArtistName` = album.`ArtistName` OR "
"(tracksCover.`AlbumArtistName` IS NULL AND "
......@@ -5461,6 +5501,8 @@ void DatabaseInterface::initRequest()
") "
") AND "
"tracksCover.`AlbumPath` = album.`AlbumPath` "
") "
") "
") as EmbeddedCover "
"FROM "
"`Tracks` tracks, "
......@@ -6095,6 +6137,10 @@ void DatabaseInterface::initRequest()
"`Tracks` tracksCover "
"WHERE "
"tracksCover.`HasEmbeddedCover` = 1 AND "
"( "
"(tracksCover.`AlbumTitle` IS NULL AND "
"tracksCover.`FileName` = tracks.`FileName` ) OR "
"( "
"tracksCover.`AlbumTitle` = album.`Title` AND "
"(tracksCover.`AlbumArtistName` = album.`ArtistName` OR "
"(tracksCover.`AlbumArtistName` IS NULL AND "
......@@ -6102,6 +6148,8 @@ void DatabaseInterface::initRequest()
") "
") AND "
"tracksCover.`AlbumPath` = album.`AlbumPath` "
") "
") "
") as EmbeddedCover "
"FROM "
"`Tracks` tracks, "
......@@ -6224,6 +6272,10 @@ void DatabaseInterface::initRequest()
"`Tracks` tracksCover "
"WHERE "
"tracksCover.`HasEmbeddedCover` = 1 AND "
"( "
"(tracksCover.`AlbumTitle` IS NULL AND "
"tracksCover.`FileName` = tracks.`FileName` ) OR "
"( "
"tracksCover.`AlbumTitle` = album.`Title` AND "
"(tracksCover.`AlbumArtistName` = album.`ArtistName` OR "
"(tracksCover.`AlbumArtistName` IS NULL AND "
......@@ -6231,6 +6283,8 @@ void DatabaseInterface::initRequest()
") "
") AND "
"tracksCover.`AlbumPath` = album.`AlbumPath` "
") "
") "
") as EmbeddedCover "
"FROM "
"`Tracks` tracks, "
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment