Video metadata downloads the least popular fanart from tmdb

Description

This is seen with current master. It has been an issue for well over a year as well. I have seen at least one other person mention this on the users list and it was dismissed as a false report.

When a query to tmdb returns multiple rows for fanart, the last one is downloaded and used. This is the lowest rated from tmdb and should not be the one used.

Simply changing tmdp3.py to use m.images.insert(0,{...}) rather than m.images.append({...}) (reverses the sort) for fanart results in the proper image being used. I assume, however, that the fix should actually be in myth's code. Coverart also uses the append method and the first item is downloaded in that case.

On another note, if you reset all metadata for a video, it does not delete the existing fanart. When you then retrieve details, it also does not overwrite the existing image. Unless you manually delete the image, you cannot replace it with an updated one. To refresh an image, one has to both delete the fanart file and clear their themecache entry which is cumbersome.

When artwork is processed from metadata grabber results, the artwork is
put into a QMultiMap, indexed based off the type. When pulling values
back out of a QMultiMap, they are in reverse order from how they were
inserted. Since the grabber is assumed to place the highest rated
artwork at the top of the response list, it must be pulled back out of
the bottom of the QMultiMap.

Commit c3d64c80 made this change for all artwork types by fanart. Fanart
had special handling, to allow it to select different artwork for each
season of a television show. However, the logic used to select the
artwork resulted in being indexed from the beginning of the list, rather
than indexed from the back of the list, thus pulling the lowest rated
artwork rather than the highest.

When artwork is processed from metadata grabber results, the artwork is
put into a QMultiMap, indexed based off the type. When pulling values
back out of a QMultiMap, they are in reverse order from how they were
inserted. Since the grabber is assumed to place the highest rated
artwork at the top of the response list, it must be pulled back out of
the bottom of the QMultiMap.

Commit c3d64c80 made this change for all artwork types by fanart. Fanart
had special handling, to allow it to select different artwork for each
season of a television show. However, the logic used to select the
artwork resulted in being indexed from the beginning of the list, rather
than indexed from the back of the list, thus pulling the lowest rated
artwork rather than the highest.

Add Comment

This ticket has been modified since you started editing. You should review the
other modifications which have been appended above,
and any conflicts shown in the preview below.
You can nevertheless proceed and submit your changes if you wish so.