MythTV / mythtv

The official MythTV repository
https://www.mythtv.org
GNU General Public License v2.0
699 stars 343 forks source link

Python tmdb3tv: Allow specials with season number 0 #907

Open rcrdnalor opened 4 weeks ago

rcrdnalor commented 4 weeks ago

tmdb3 lookup.py does not allow queries for tv-season number 0 as raised by @davidjo in #902.

Provided patch in #902 works for me, tested with:

tmdb3tv.py -l en -a GB -D 62974 0 5
tmdb3tv.py -l de -a AT -D 53193 0 3

otherwise, one gets:

~/MythTV/issue_902$ ./share/mythtv/metadata/Television/tmdb3tv.py -l en -a GB -D 62974 0 5
Traceback (most recent call last):
  File "~/MythTV/issue_902/./share/mythtv/metadata/Television/tmdb3tv.py", line 159, in <module>
    sys.exit(main("television",'tmdb3tv.py'))
  File "~/MythTV/issue_902/./share/mythtv/metadata/Television/tmdb3tv.py", line 136, in main
    xml = buildEpisode(args[0:3], opts)
  File "~/MythTV/issue_902/MythTV/tmdb3/lookup.py", line 397, in buildEpisode
    if season.poster:
UnboundLocalError: local variable 'season' referenced before assignment

Checklist