Alternative artwork/box set approach#1536
Alternative artwork/box set approach#1536darrell-k wants to merge 4 commits intoLMS-Community:public/9.2from
Conversation
Signed-off-by: darrell-k <darrell@darrell.org.uk>
|
Copilot's thoughts (Concern #4 is what made me raise an eyebrow): Concerns & Observations:
Testing Recommendations:
Minor Issues:
Overall, this is a thoughtful approach to a complex problem, but it would benefit from the noted refinements before merging. |
|
On the concerns:
On testing: Except for performance testing, I've tested the other stuff to the point of boredom, but I intend to do some more testing and it's a good checklist. Given the almost infinite combinations of adding/removing/changing artwork both at the disc/track level and album parent level, we can only do our best. Once we've verified performance is OK and it passes regression testing (ie current behaviour for the simple cases of changing artwork in a single album folder and embedded artwork) I'd suggest merging it to 9.2 for user feedback. On minor issues:
|
|
@darrell-k - happy to help testing when you are ready for that. I have some test cases set up from before. I was testing with embedded artwork where I had one with artwork embedded that varied by disc and another with embedded artwork varied by Grouping all with the “box set” artwork as cover.jpg. |
Signed-off-by: darrell-k <darrell@darrell.org.uk>
Thanks for the offer.
with the versions from my branch https://github.com/darrell-k/slimserver/tree/artwork Start with a full rescan to ensure a good starting point. Then put the new & changed scan through its paces. |
|
@mikeysas I should have reminded you that discsubtitle matching and file name heuristics are not implemented yet. I'm working on it now. |
Slim/Music/Artwork.pm
Outdated
| -- This is the Sqlite equivalent of dirname() | ||
| rtrim(tracks.url, replace(tracks.url, '/', '')) AS dirname, |
There was a problem hiding this comment.
Wow... that guy's tricky! Could you please uppercase SQLite keywords/functions for readability? Thanks!
There was a problem hiding this comment.
BTW: this seems to be incompatible with MySQL. I know... we kind of no longer support it. There's no reasonable way to handle this in Perl, is there? Maybe that's the final nail in the coffin of MySQL support.
There was a problem hiding this comment.
Apparently, something like
SELECT LEFT(url, CHAR_LENGTH(url) - LOCATE('/', REVERSE(url))) from tracks;
would work in MySql, but not Sqlite.
Or we could write a perl UDF.
There was a problem hiding this comment.
Don't know whether MySQL (or the Perl MySQL driver) supports UDFs. But let's ignore this for now. We can always try to fix this with the help of the guy who insists on using MySQL.
Signed-off-by: darrell-k <darrell@darrell.org.uk>
|
Initial performance tests show quite a hit (40 seconds combined for updateStandaloneArtwork and precacheArtwork combined for the 40,000 track test library, compared to 1 second for current 9.2! I'll work on this tomorrow. |
|
@mikeysas Yes, this can be resolved by Material sending an extra tag (J) in the tracks command and then using the returned album image id (which is confusingly called There's a related issue: the artist shown in the album heading is the lead artist of the track, rather than the lead artist of the album. This will require an LMS change, and possibly another Material change, so I'll hold off creating a PR for Material until I've decided how to approach the LMS query amendment, which is probably going to need an extra join to the contributors table for the name. |




Here is an alternative approach to #1513
It fixes a couple of existing new&changed artwork scanning problems including embedded artwork not being removed after being removed from the music file and issues I found with albums in multiple directories.
I've tried to implement the functionality of #1513 but I have not yet coded the "file/folder name to disc number" heuristics or the discsubtitle processing. But these should be relatively straightforward additions to the code structure in this PR.
I've also ensured that for box sets, if a particular disc doesn't have specific artwork, we fall back to the overall album artwork.
Needs much more testing, not just by me!
Comments please.