Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Music Scanner Update #1222

Merged
merged 1 commit into from

3 participants

@classicspam

Update: If 2+ different track artworks exist in same album use the first one as album art and keep the individual track artworks.

Reasons:

There are 2 possible situations that I can think of where there may be more than 1 artwork in an album:
- It is the same artwork but different resolutions (i.e. tracks acquired from different sources)

- The album separator messes up and they are actually 2 different albums (very rarely happen...I have only seen it on 2 different "Various Artist","Anthology" albums

In either of these cases I would think the best option would be to select the first found artwork as the album art rather then leaving it empty. We also need to keep the track art for these rare occurrences in case it falls in the second option above.

@jmarshallnz
Owner

@night199uk your thoughts?

@classicspam

I am of the opinion that embedded art should take precedence over scraped art for the reason that if the album does not fall in the tolerance range for the scraper, the user is left with no album art even though they have track art for these situations. This way xbmc will still fallback to scraper art if there is no embedded art on any of the tracks.

@MartijnKaijser

I tend to disagree. I would definitely put it in this order:
1. folder.jpg
2. scraped
3. embedded

2+3 order can be debated because some have different covers for each track of an album.
1. is an absolute must for me. I spend a lot of time searching the best covers and putting them alongside my albums so i would hate it if the lower quality embedded ones got scraped

(something like this was already discussed in the team forum pages)

@classicspam

The patch only takes into account the way xbmc processes items 2 and 3 for albums with more than 1 track artworks which you just stated is open for discussion. My previous comment also limited the discussion to embedded versus scraped which again is open for discussion...I agree that folder.jpg should take highest precedence as that was specifically set by the user and should be used as default, however given the lack of folder.jpg I would say embedded > scraped as people may have taken the time to actually embed art into their mp3's

@MartijnKaijser

Issue is that some will just downloaded some files with crappy embedded artwork (as i regularly find out) and don't check that.

@jmarshallnz
Owner

Given that we now know that an album's art is embedded, we could (if scraping is enabled + a good hit is found) overwrite the existing embedded art with the scraped art.

The problem, ofcourse, is that we don't know the users intention. We assume that tags are king with everything else, so IMO making the same assumption here is best as well.

folder.jpg will ofcourse still be the highest priority.

@MartijnKaijser

Uhm weren 't proper tags needed to even do a proper search result when scraping in the first place or is scraping also done from filename when tags are missing?

It's difficult to assume what users prefer. Comparing the embedded covers with what is available through scraping isn't probably available in current scraper code (maybe something for top2fs his project).
Difficult choice because both have pros/cons

@classicspam

Well if a user wants scraping to override embedded art then it should probably be an advanced setting as we can go around that discussion forever..half the people will want one thing half the people will want another.

That being said the first track image found should probably still pull into the album art on scanning embedded images when more than one track image is on an album (assuming that there is no folder.jpg and xbmc correctly works now...if it doesn't then that is another PR) to alleviate no album image if the scanner cannot find an album image (per possible future choice in previous paragraph)

@jmarshallnz
Owner

@classicspam mind squashing this down - will pull it in then.

@classicspam classicspam Music Scanner Update
Update: If 2+ different track artworks exist in same album use the first one as album art and keep the individual artworks.
31fc8ff
@classicspam

done...rebased off of master and fixup'ed

@jmarshallnz
Owner

Thanks :)

@jmarshallnz jmarshallnz was assigned
@jmarshallnz jmarshallnz merged commit e48a897 into xbmc:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 5, 2012
  1. @classicspam

    Music Scanner Update

    classicspam authored
    Update: If 2+ different track artworks exist in same album use the first one as album art and keep the individual artworks.
This page is out of date. Refresh to see the latest.
Showing with 18 additions and 12 deletions.
  1. +18 −12 xbmc/music/infoscanner/MusicInfoScanner.cpp
View
30 xbmc/music/infoscanner/MusicInfoScanner.cpp
@@ -746,7 +746,8 @@ void CMusicInfoScanner::FindArtForAlbums(VECALBUMS &albums, const CStdString &pa
/*
Find art that is common across these items
If we find a single art image we treat it as the album art
- else we keep everything as song art.
+ and discard song art else we use first as album art and
+ keep everything as song art.
*/
bool singleArt = true;
CSong *art = NULL;
@@ -764,23 +765,28 @@ void CMusicInfoScanner::FindArtForAlbums(VECALBUMS &albums, const CStdString &pa
art = &song;
}
}
+
+ /*
+ assign the first art found to the album - better than no art at all
+ */
+
+ if (art && albumArt.empty())
+ {
+ if (!art->strThumb.empty())
+ albumArt = art->strThumb;
+ else
+ albumArt = CTextureCache::GetWrappedImageURL(art->strFileName, "music");
+ }
+
+ album.art["thumb"] = albumArt;
+
if (singleArt)
- { // a single piece of art was found for these songs so assign to the album
- // and clear out of the songs
- if (art && albumArt.empty())
- {
- if (!art->strThumb.empty())
- albumArt = art->strThumb;
- else
- albumArt = CTextureCache::GetWrappedImageURL(art->strFileName, "music");
- }
+ { //if singleArt then we can clear the artwork for all songs
for (VECSONGS::iterator k = album.songs.begin(); k != album.songs.end(); ++k)
k->strThumb.clear();
- album.art["thumb"] = albumArt;
}
else
{ // more than one piece of art was found for these songs, so cache per song
- // and don't assign to the album
for (VECSONGS::iterator k = album.songs.begin(); k != album.songs.end(); ++k)
{
if (k->strThumb.empty() && !k->embeddedArt.empty())
Something went wrong with that request. Please try again.