This forum has been archived. All content is frozen. Please use KDE Discuss instead.

album cover sometimes not visible in the OSD

Tags: None
(comma "," separated)
jkerr
Registered Member
Posts
14
Karma
0
Interesting - I cleared the album artwork from iTunes for two songs of an album that had a "bad" embedded image set in each song.  I then rebooted to ubuntu, ran amarok and played that song - the album cover displayed correctly, a new file wasn't created.  I then played a song from the album with a 'bad' image, it created the file and didn't display in the OSD.  Any time after this when I play one of the 'good' songs, they don't display a cover in the OSD, taking the bad file from the tagcover folder instead.

The "bad" image displays fine in iTunes and when I copied and pasted it into an image editor, it was fine.  I don't know what kind of image it is though, since you just have the iTunes interface to deal with, you can only copy out of it.

Another test - cleared two more embedded song images, and re-did them - one by dragging from Firefox into iTunes, the other by saving a file as a jpg, cropping and saving in an image editor, and adding through the track information screen in iTunes.  Rebooted and when I play them in amarok, neither song adds an image to the tagcover folder - they don't get by the line

Code: Select all
if ( hash.isEmpty() || (*it).hash() == hash ) {


to be saved in CollectionDB::extractEmbeddedImage because the hash isn't the same - at the line above, hash is 9fd28813314af961407b6339a7c88676 and (*it).hash() is d66cabb73f6d02e69d54e34e4f5774fe

Think that's it for my testing for now :)

Last edited by jkerr on Tue Oct 30, 2007 1:27 am, edited 1 time in total.
jkerr
Registered Member
Posts
14
Karma
0
So there are actually two problems:
1)  CollectionDB code finds an embedded image and saves a bad file into the tagcover folder
2)  If OSD code finds a file in tagcover for it's album, it will try to use it; if it's bad, it won't show anything

Proposed solution (to #2)
- Since the OSD code knows at some point that the file in tagcover is unusable, when this occurs, fall back to behaving in the same way as when no file was found (use a cover from cover manager if possible
- Possibly delete the 'bad' file when this occurs

Solution to #1 is harder:
- Find out why the extract code either has a problem extracting the image in the file, or properly extracts but Amarok can't handle that image type

:biggrin:
User avatar
dangle_wtf
Moderator
Posts
1252
Karma
0
or 3... replace your bad embedded images ;)

If you manually assign an album cover to that album, does that get displayed properly in the OSD? If you right-click on the cover and clear it does it find a good cover?

Bear in mind that amarok assigns covers to albums, while you might have problem images related to only some tracks within that album - it may depend which track you play first as to where the cover is found.

Last edited by dangle_wtf on Tue Oct 30, 2007 11:41 am, edited 1 time in total.


"There are two theories to arguing with women. Neither one works."
.
If men could get pregnant, we'd learn the true meaning of "screaming nancyboy wuss"
jkerr
Registered Member
Posts
14
Karma
0
If you manually assign an album cover to the album, it uses it until it plays a song with a 'bad' image embedded.  Then it uses the 'bad' image for any songs on that album (nothing displayed).  Clearing the artwork doesn't seem to clear it - not sure if amarok edits MP3 files to remove embedded images or not.
jkerr
Registered Member
Posts
14
Karma
0
Guess what?  Fixed it :)  I kept narrowing it down, narrowing it down with debug lines and found the problem, came up with a solution, and implemented it  :cool:  4 lines of code...

Basically, in the code where it extracts an image from an MP3 file to the tagcover folder, I added a simple test - try to create an image of that file.  If the result is null, delete the extracted file and return - simple!

Who should I talk to about getting my code into SVN?  Maybe get it into 1.4.8... 
User avatar
dangle_wtf
Moderator
Posts
1252
Karma
0
email the amarok mailing list using the feedback form on the main amarok.kde.org page


"There are two theories to arguing with women. Neither one works."
.
If men could get pregnant, we'd learn the true meaning of "screaming nancyboy wuss"
jkerr
Registered Member
Posts
14
Karma
0
Cool.  Thanks for your help and input  :biggrin:
jkerr
Registered Member
Posts
14
Karma
0
Bugged in bugs.kde.org as Bug 151609  :biggrin:
User avatar
dangle_wtf
Moderator
Posts
1252
Karma
0
good job!


"There are two theories to arguing with women. Neither one works."
.
If men could get pregnant, we'd learn the true meaning of "screaming nancyboy wuss"


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]