Since API updates at TheTVDB.org, metadata lookups mostly don't work

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
pvrmine
Junior
Posts: 30
Joined: Mon Jul 01, 2019 3:19 pm
United States of America

Since API updates at TheTVDB.org, metadata lookups mostly don't work

Post by pvrmine »

TheTVDB.org recently updated their API, with an attempt to maintain backward compatibility, but apparently it broke MythTV's grabber.

Consolidated thread in thetvdb.com forums at https://forums.thetvdb.com/viewtopic.php?f=122&t=60239.

For me, most metadata lookups, even with correct original airdate and episode title, return no data. Example from mythtv.log:

I'm on version 30.0-dmo5 from deb-multimedia.org.

Nov 19 15:08:51 pvr mythmetadatalookup: mythmetadatalookup[5407]: I MetadataDownload metadatadownload.cpp:203 (run) Metadata Lookup Failed: No Results Petticoat Junction 0 0
Nov 19 15:09:59 pvr mythmetadatalookup: mythmetadatalookup[6338]: I MetadataDownload metadatadownload.cpp:203 (run) Metadata Lookup Failed: No Results Bonanza 0 0
Nov 19 15:09:59 pvr mythmetadatalookup: mythmetadatalookup[6266]: I MetadataDownload metadatadownload.cpp:203 (run) Metadata Lookup Failed: No Results Petticoat Junction 0 0
Nov 19 15:11:08 pvr mythmetadatalookup: mythmetadatalookup[7096]: I MetadataDownload metadatadownload.cpp:203 (run) Metadata Lookup Failed: No Results The Bob Newhart Show 0 0
Nov 19 15:12:18 pvr mythmetadatalookup: mythmetadatalookup[7829]: I MetadataDownload metadatadownload.cpp:203 (run) Metadata Lookup Failed: No Results The Bob Newhart Show 0 0
Nov 19 15:13:29 pvr mythmetadatalookup: mythmetadatalookup[8528]: I MetadataDownload metadatadownload.cpp:203 (run) Metadata Lookup Failed: No Results Wagon Train 0 0
Nov 19 15:14:39 pvr mythmetadatalookup: mythmetadatalookup[9152]: I MetadataDownload metadatadownload.cpp:203 (run) Metadata Lookup Failed: No Results Newhart 0 0
Nov 19 15:51:06 pvr mythmetadatalookup: mythmetadatalookup[2334]: I MetadataDownload metadatadownload.cpp:203 (run) Metadata Lookup Failed: No Results Newhart 0 0

Can someone with more immediate knowledge of the metadata grabber's inner workings comment?
pvrmine
Junior
Posts: 30
Joined: Mon Jul 01, 2019 3:19 pm
United States of America

Re: Since API updates at TheTVDB.org, metadata lookups mostly don't work

Post by pvrmine »

One failure, one success, both using MythTV's grabber, which appears to use API V2. Both appear to have good data when viewed via web browser at thetvdb.org:

/usr/share/mythtv/metadata/Television/ttvdb.py -N "Highway Patrol" "Statute of Limitations"
Traceback (most recent call last):
File "/usr/share/mythtv/metadata/Television/ttvdb.py", line 2674, in <module>
sys.exit(main())
File "/usr/share/mythtv/metadata/Television/ttvdb.py", line 2481, in main
seriesfound=searchseries(t, opts, x)
File "/usr/share/mythtv/metadata/Television/ttvdb.py", line 1529, in searchseries
series_data = search_for_series(t, series_name, opts.language)
File "/usr/share/mythtv/metadata/Television/ttvdb.py", line 1515, in search_for_series
return tvdb[sid_or_name]
File "/usr/lib/python2.7/dist-packages/MythTV/ttvdb/tvdb_api.py", line 1165, in __getitem__
sid = self._nameToSid(key)
File "/usr/lib/python2.7/dist-packages/MythTV/ttvdb/tvdb_api.py", line 1149, in _nameToSid
self._getShowData(selected_series['id'], self.config['language'])
File "/usr/lib/python2.7/dist-packages/MythTV/ttvdb/tvdb_api.py", line 1070, in _getShowData
self._parseBanners(sid)
File "/usr/lib/python2.7/dist-packages/MythTV/ttvdb/tvdb_api.py", line 961, in _parseBanners
for banner_info in banners_info:
TypeError: 'NoneType' object is not iterable
mythtv@pvr:~/bin$ /usr/share/mythtv/metadata/Television/ttvdb.py -N "Nick Stellino: Storyteller in the Kitchen" "The Food Artist""
> ^C
mythtv@pvr:~/bin$ /usr/share/mythtv/metadata/Television/ttvdb.py -N "Nick Stellino: Storyteller in the Kitchen" "The Food Artist"
<?xml version='1.0' encoding='UTF-8'?>
<metadata>
<item>
<title>Nick Stellino: Storyteller in the Kitchen</title>
<subtitle>The Food Artist</subtitle>
<description>Chef Stellino paints the picture of a life expressing himself through his love for the culinary arts. He constantly seeks to create those dishes that are as beautiful as they are delicious and shares with the viewers the sacrifices inherent in always seeking the path to the perfect meal. Dishes include: Red wine sauce (with soffritto) / scalloped potatoes (with Swiss and parmesan cheese / steak au poivre (Peppered Steak) with garlic arugula / and salmon with Brussel sprouts and red wine sauce.</description>
<season>1</season>
<episode>4</episode>
<categories>
<category type="genre" name="Food"/>
<category type="genre" name="Reality"/>
</categories>
<studios>
<studio name="PBS"/>
</studios>
<runtime>25</runtime>
<inetref>343464</inetref>
<collectionref>343464</collectionref>
<imdb>6222780</imdb>
<language>en</language>
<year>2017</year>
<releasedate>2017-03-11</releasedate>
<images>
<image type="coverart" url="http://www.thetvdb.com/banners/posters/ ... aa78d8.jpg" thumb="http://www.thetvdb.com/banners/posters/ ... 78d8_t.jpg" width="680" height="1000"/>
</images>
</item>
</metadata>
glenb
Junior
Posts: 29
Joined: Sun Nov 17, 2019 7:48 am
United States of America

Re: Since API updates at TheTVDB org, metadata lookups mostly don't work

Post by glenb »

i have this working now again. i was watching ticket #13510 where there are 2 attachments.

Also there have been a few commits at the github for mythtv in master branch on this issue. i am on arch linux using 30 fixes and have to build a new package from the arch aur to do updates as it is. at this time it looks like these fixes/commits are only in the master branch and change the ttvdb py file in /usr/share/mythtv/metadata/Television and the tvdb_api py in my case found in /usr/lib/python2.7/site-packages/MythTV/ttvdb rather than rebuild i just did a dirty swap out of the two files and it began to work. i assume those fixes will be brought into other branches at some point on the git.
Last edited by bill6502 on Thu Nov 21, 2019 3:49 pm, edited 1 time in total.
Reason: Enclosed ticket number using ticket button.
pvrmine
Junior
Posts: 30
Joined: Mon Jul 01, 2019 3:19 pm
United States of America

Re: Since API updates at TheTVDB.org, metadata lookups mostly don't work

Post by pvrmine »

The first patch worked for me. Thank you.
glenb
Junior
Posts: 29
Joined: Sun Nov 17, 2019 7:48 am
United States of America

Re: Since API updates at TheTVDB.org, metadata lookups mostly don't work

Post by glenb »

fwiw, i find the two files in master branch at git: ttvdb py in mythtv programs and tvdb api py in bindings / python/ mythtv / ttvdb work much better than using that single patch only.
Post Reply