Skip to content

Commit

Permalink
Revert "Fix metadata fanart selection."
Browse files Browse the repository at this point in the history
The fix for this issue was addressed at a lower level in another
commit as a result this code path was reversing the list again.

Fixes #12246

This reverts commit da8ac30.

Conflicts:
	mythtv/libs/libmythmetadata/metadatafactory.cpp

(cherry picked from commit 09422c5)
  • Loading branch information
stuartm committed Feb 25, 2015
1 parent 4e4a785 commit a2563e1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions mythtv/libs/libmythmetadata/metadatafactory.cpp
Expand Up @@ -290,12 +290,10 @@ void MetadataFactory::OnSingleResult(MetadataLookup *lookup)
if (fanartlist.size())
{
ArtworkInfo info;
int index = fanartlist.size();
int index = 0;
int season = lookup->GetIsCollection() ? 0 : (int)lookup->GetSeason();
if (season > 0)
index = max(0, index-season);
else
index--;
if (season > 0 && season <= fanartlist.count())
index = season - 1;
info.url = fanartlist.takeAt(index).url;
map.insert(kArtworkFanart, info);
}
Expand Down

0 comments on commit a2563e1

Please sign in to comment.