[mythtv-users] tmdb3 grabber pulls French coverart
Joseph Fry
joe at thefrys.com
Tue Dec 31 20:18:26 UTC 2013
>> For example for "Insidious Chapter 2", the image it pulls is the only
>> one listed on the site under the French language, but it appears last
>> on the list when the frontend runs "tmdb3.py -l en -a US -D 91586"
>>
>> Anyone else seen this. I don't see any bugs reported for it, but it
>> is extremely annoying.
>
>
> http://code.mythtv.org/trac/ticket/11678
Thanks for that... I think I saw that ticket but didn't think it was
my problem. I was digging through the code, but after tmdb3.py
generates the list, I wasn't sure what code actually selected the
image to download.
I'm happy to apply patches to any python scripts if you need someone to test.
I would also like to request that something be implemented that would
allow us to enter the year of the video and have that added to the
search similar to below:
- results = searchMovie(query)
+ from datetime import date
+
+ if len(query.split()) > 1:
+ title = query.rsplit(' ', 1)[0]
+ titleyear = query.rsplit(' ', 1)[1]
+ if titleyear.isdigit() and int(titleyear) > 1900 and \
+ int(titleyear) < int(date.today().year + 1):
+ results = searchMovie(title, year=titleyear)
+ if not results:
+ results = searchMovie(query)
+ else:
+ results = searchMovie(query)
+ else:
+ results = searchMovie(query)
This is the changes I made to an earlier version of tmdb3.py and
assumes any 4 digit number as the last word passed to the script is
the year (as long as that number is > 1900 and less than the current
year and not the entire title. I would have made it work with dates
in parens, but text in parens isn't passed to the script. Making
these changes boosts success to about 99% as long as the file name is
in the form <title>.<year>.<ext>. It works as well as the current
implementation if you don't add the years, except for titles that end
in a 4 digit year between 1900 and now (not many of them).
More information about the mythtv-users
mailing list