Closed lilyinstarlight closed 2 years ago
Looks okay; I wonder if both OGG and MP4 could be folded into the existing for tag in song.tags.keys()
loop though.
Looks okay; I wonder if both OGG and MP4 could be folded into the existing
for tag in song.tags.keys()
loop though.
Were you thinking something like this https://github.com/lilyinstarlight/mpDris2/commit/4d1a50fa3a8d5bc0f9d1834884193cf868ab6b4e? I haven't tested the code yet, but if it looks like what you're wanting I can test and PR that later
Looks okay; I wonder if both OGG and MP4 could be folded into the existing
for tag in song.tags.keys()
loop though.Were you thinking something like this lilyinstarlight@4d1a50f? I haven't tested the code yet, but if it looks like what you're wanting I can test and PR that later
Yes, something like that.
(If I remember right, looping over all keys was the only way to find mutagen's weirdly-named APIC tags in MP3... so might as well use the same loop for other types too, even if it's not as nice as a direct get().)
This PR adds MP4 cover art support based on the mutagen docs for MP4 tags. It assumes the first cover art (if any) is the front cover and instantiates its own
mutagen.id3.APIC
since the MP4 API doesn't provide one and_create_temp_cover
expects oneLet me know if anything is problematic or should be changed!