[mythtv-users] tmdb.py pulls Least Favourite Fan Art from themoviedb.org

Doug Vaughan r.d.vaughan at rogers.com
Fri Jul 20 13:57:00 UTC 2012


Kt,
   The Movie and TV grabbers rely on their associated web sites to 
return all image URLs in a most popular to least popular order. MythTV 
just uses the first in each category (cover, banner, fanart). With that 
being said I tried "Terminator 2" and the fanart accurately reflects the 
votes on the web site.

You can see what order the fanart is returned by adding the debug (-d) 
option to any tmdb.py call. The URL used to get the raw data from the 
TMDB site is displayed near the beginning of the returned info. You can 
copy that URL into a browser and see the raw data including all image 
URLs and their order.

Here is an abbreviated example:

Get the inetref number for this movie:
 > ./tmbd.py -M "Terminator 2"

Get all associated metadata for the movie include debug info:
 > ./tmdb/py -D "0103064" -d

opts: {'peoplelist': False, 'version': False, 'language': u'en', 
'peopleinfo': False, 'usage': False, 'moviedata': True, 'raw': False, 
'test': False, 'moviehash': False, 'debug': True, 'movielist': False, 
'interactive': False}

args: [u'0103064']


DEBUG: XML 
URL:http://api.themoviedb.org/2.1/Movie.imdbLookup/en/xml/c27cb71cff5bd76e1a7a009380562c62/tt0103064

<?xml version='1.0' encoding='UTF-8'?>
<metadata>
   <item>
     <title>Terminator 2</title>
     <subtitle>Judgment Day</subtitle>

... data cut out for brevity ....

       <image type="coverart" 
thumb="http://cf2.imgobject.com/t/p/w185/kaWMFh04HcwuUhQcNn9Aw4Rq1bi.jpg" url="http://cf2.imgobject.com/t/p/original/kaWMFh04HcwuUhQcNn9Aw4Rq1bi.jpg" 
width="537" height="734"/>
       <image type="fanart" 
thumb="http://cf2.imgobject.com/t/p/w300/d9AqtruwS8nljKjL5aYzM42hQJr.jpg" url="http://cf2.imgobject.com/t/p/original/d9AqtruwS8nljKjL5aYzM42hQJr.jpg" 
width="1920" height="1080"/>
       <image type="fanart" 
thumb="http://cf2.imgobject.com/t/p/w300/jUV2lPxhcQe4g6EEKyJT0F1QbrC.jpg" url="http://cf2.imgobject.com/t/p/original/jUV2lPxhcQe4g6EEKyJT0F1QbrC.jpg" 
width="1920" height="1080"/>
       <image type="fanart" 
thumb="http://cf2.imgobject.com/t/p/w300/i5megxGRBadEZEUeej5ADFnYLlB.jpg" url="http://cf2.imgobject.com/t/p/original/i5megxGRBadEZEUeej5ADFnYLlB.jpg" 
width="1920" height="1080"/>
       <image type="fanart" 
thumb="http://cf2.imgobject.com/t/p/w300/9MkA1OXmmvE06vajhdCyQWO8T2L.jpg" url="http://cf2.imgobject.com/t/p/original/9MkA1OXmmvE06vajhdCyQWO8T2L.jpg" 
width="1366" height="768"/>
       <image type="fanart" 
thumb="http://cf2.imgobject.com/t/p/w300/meVyiMCXZtqWC7kYNSgSbwwMDsF.jpg" url="http://cf2.imgobject.com/t/p/original/meVyiMCXZtqWC7kYNSgSbwwMDsF.jpg" 
width="1920" height="1080"/>
       <image type="fanart" 
thumb="http://cf2.imgobject.com/t/p/w300/vWOZSEP1OWqiv24EGicNnZ5uqO3.jpg" url="http://cf2.imgobject.com/t/p/original/vWOZSEP1OWqiv24EGicNnZ5uqO3.jpg" 
width="1920" height="1080"/>

... more data cut out for brevity ....

     </images>
   </item>
</metadata>


In this case the raw data URL is:
http://api.themoviedb.org/2.1/Movie.imdbLookup/en/xml/c27cb71cff5bd76e1a7a009380562c62/tt0103064

Two things of note is that TMDB calls fanart a "backdrop" and the image 
URLs include the same backdrop in various sizes. You will see that the 
order of the images are consistent with what the tmdb.py grabber returns 
to MythTV.

It may be that the "least favourite" fanart you have observed is what 
TMDB is returning. As you did not include an example movie in your email 
I could not check if this was indeed the case.

Of note is that in future versions of MythTV (0.26 and higher) a newer 
version of the TMDB api will be used and that means a new TMDB grabber. 
I cannot comment on what tmdb3.py will provide.


More information about the mythtv-users mailing list