Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13130 closed Patch - Bug Fix (fixed)

[PATCH] Fixes for regressions in tvdb

Reported by: Ian Campbell <ijc@…> Owned by: Peter Bennett
Priority: major Milestone: 29.1
Component: MythTV - Mythmetadatalookup Version: Master Head
Severity: medium Keywords:
Cc: Peter Bennett, Mark Spieth Ticket locked: no

Description

With the move from v1 to v2 api for ttvdb I noticed in my logs:

E MetadataImageDownload metadataimagedownload.cpp:255 (run) Tried to write http://thetvdb.com/banners/, but it appears to be an HTML redirect or corrupt file (filesize 235).

This comes from:

$ ttvdb.py -l en -a GB -C 330432
<?xml version='1.0' encoding='UTF-8'?>
<metadata>
  <item>
    <language>en</language>
    <title>Nine Minute Ninja</title>
    <network>CBBC</network>
    <description>Art Ninja spinoff. Ricky makes art in nine minutes.</description>
    <studios>
      <studio name="CBBC"/>
    </studios>
    <runtime>10</runtime>
    <inetref>330432</inetref>
    <userrating>0</userrating>
    <ratingcount>0</ratingcount>
    <year>2015</year>
    <releasedate>2015-06-24</releasedate>
    <lastupdated>Wed, 20 Sep 2017 20:43:40 GMT</lastupdated>
    <status>Continuing</status>
    <images>
      <image type="coverart" url="http://www.thetvdb.com/banners/posters/330432-1.jpg" thumb="http://www.thetvdb.com/banners/_cache/posters/330432-1.jpg"/>
      <image type="banner" url="http://thetvdb.com/banners/" thumb="http://thetvdb.com/banners/_cache/"/>
    </images>
  </item>
</metadata>

Compared with v29.0 where I see:

$ ttvdb.py -l en -a GB -C 330432
<?xml version='1.0' encoding='UTF-8'?>
<metadata>
  <item>
    <language>en</language>
    <title>Nine Minute Ninja</title>
    <network>CBBC</network>
    <description>Art Ninja spinoff. Ricky makes art in nine minutes.</description>
    <categories>
      <category type="genre" name="Children"/>
    </categories>
    <studios>
      <studio name="CBBC"/>
    </studios>
    <runtime>10</runtime>
    <inetref>330432</inetref>
    <ratingcount>0</ratingcount>
    <year>2015</year>
    <releasedate>2015-06-24</releasedate>
    <lastupdated>Wed, 20 Sep 2017 20:43:40 GMT</lastupdated>
    <status>Continuing</status>
    <images>
      <image type="coverart" url="http://www.thetvdb.com/banners/posters/330432-1.jpg" thumb="http://www.thetvdb.com/banners/_cache/posters/330432-1.jpg"/>
    </images>
  </item>
</metadata>

So as well as the bogus/strange banner the genre's are missing and their is a spurious (?) userrating of 0.

When I came to fix I also found that doctest was broken so I fixed those before fixing the issue I had seen and adding a test case for it.

Patches are available in https://github.com/MythTV/mythtv/compare/master...ijc:ttvdb-fixes. I'll also attach here.

Attachments (8)

patches.tar (20.0 KB) - added by ijc@… 6 years ago.
6 patches in tarball
0001-ttvdb-Update-Fixer-Upper-test-cases-with-wildcards.patch (1.1 KB) - added by Peter Bennett 6 years ago.
Patch 1/6
0002-ttvdb-Update-NOVA-Eclipse-Over-America-test-case.patch (3.6 KB) - added by Peter Bennett 6 years ago.
Patch 2/6
0003-ttvdb-Ignore-banner-of-just-http-thetvdb.com-banners.patch (1.3 KB) - added by Peter Bennett 6 years ago.
Patch 3/6
0004-ttvdb-ignore-user-rating-of-0.patch (1.2 KB) - added by Peter Bennett 6 years ago.
Patch 4/6
0005-ttvdb-correct-handingly-of-genre.patch (2.2 KB) - added by Peter Bennett 6 years ago.
Patch 5/6
0006-ttvdb-Add-new-test-case-ttvdb.py-l-en-a-GB-C-330432.patch (1.8 KB) - added by Peter Bennett 6 years ago.
Patch 6/6
20170924_ticket_13130_combined.patch (6.9 KB) - added by Peter Bennett 6 years ago.
6 patches combined

Download all attachments as: .zip

Change History (17)

Changed 6 years ago by ijc@…

Attachment: patches.tar added

6 patches in tarball

comment:1 Changed 6 years ago by ijc@…

Second patch in the series was rejected due to containing too many URLs (it touches a test case which contains URLs) so rather than continuing to attach them individually I have attached a tarball with all 6 patches it it.

comment:2 Changed 6 years ago by Peter Bennett

Owner: changed from JYA to Peter Bennett
Status: newassigned

comment:3 Changed 6 years ago by Mark Spieth

Reviewed. LGTM good removal of brittleness of the doctests.

comment:4 Changed 6 years ago by Peter Bennett

Reporter: changed from ijc@… to Ian Campbell <ijc@…>

Changed 6 years ago by Peter Bennett

Patch 1/6

Changed 6 years ago by Peter Bennett

Patch 2/6

Changed 6 years ago by Peter Bennett

Patch 3/6

Changed 6 years ago by Peter Bennett

Patch 4/6

Changed 6 years ago by Peter Bennett

Patch 5/6

Changed 6 years ago by Peter Bennett

Patch 6/6

Changed 6 years ago by Peter Bennett

6 patches combined

comment:5 Changed 6 years ago by Peter Bennett

Milestone: needs_triage29.1
Status: assignedaccepted

comment:6 Changed 6 years ago by Ian Campbell <ijc@…>

Resolution: fixed
Status: acceptedclosed

In 09090e1ff99468da4f0cc44c0f6b5b98a7ae34be/mythtv:

ttvdb: Various fixes

  1. ttvdb: Update "Fixer Upper" test cases with wildcards

"Lastupdated" field has changed, and seems likely to change, so make it a
wildcard match. "Thumbauthor" field has also changed.

  1. Update "NOVA: Eclipse Over America" test case

This appears to have moved from episode 18 to episode 11 and had updates
to the description and other metadata.

  1. Ignore banner of just "http://thetvdb.com/banners/"
  2. ignore user rating of 0
  3. correct handingly of genre

They are a list of "<item>..</item>".

  1. Add new test case: ttvdb.py -l en -a GB -C 330432

This had some regressions compared to v29.0 which are now fixed, so add a test case.

Fixes #13130

Signed-off-by: Peter Bennett <pbennett@…>

comment:7 Changed 6 years ago by Ian Campbell <ijc@…>

In ed4356116a754b4c13e83567b5458080f80dcd59/mythtv:

ttvdb: Various fixes

  1. ttvdb: Update "Fixer Upper" test cases with wildcards

"Lastupdated" field has changed, and seems likely to change, so make it a
wildcard match. "Thumbauthor" field has also changed.

  1. Update "NOVA: Eclipse Over America" test case

This appears to have moved from episode 18 to episode 11 and had updates
to the description and other metadata.

  1. Ignore banner of just "http://thetvdb.com/banners/"
  2. ignore user rating of 0
  3. correct handingly of genre

They are a list of "<item>..</item>".

  1. Add new test case: ttvdb.py -l en -a GB -C 330432

This had some regressions compared to v29.0 which are now fixed, so add a test case.

Fixes #13130

Signed-off-by: Peter Bennett <pbennett@…>
(cherry picked from commit 09090e1ff99468da4f0cc44c0f6b5b98a7ae34be)

comment:8 Changed 6 years ago by Ian Campbell <ijc@…>

In 172459d73771cf44b0ec7a0914387b112d9226b4/mythtv:

ttvdb: Various fixes

  1. ttvdb: Update "Fixer Upper" test cases with wildcards

"Lastupdated" field has changed, and seems likely to change, so make it a
wildcard match. "Thumbauthor" field has also changed.

  1. Update "NOVA: Eclipse Over America" test case

This appears to have moved from episode 18 to episode 11 and had updates
to the description and other metadata.

  1. Ignore banner of just "http://thetvdb.com/banners/"
  2. ignore user rating of 0
  3. correct handingly of genre

They are a list of "<item>..</item>".

  1. Add new test case: ttvdb.py -l en -a GB -C 330432

This had some regressions compared to v29.0 which are now fixed, so add a test case.

Fixes #13130

Signed-off-by: Peter Bennett <pbennett@…>
(cherry picked from commit 09090e1ff99468da4f0cc44c0f6b5b98a7ae34be)

comment:9 Changed 6 years ago by Peter Bennett

Owner: changed from Peter Bennett to Peter Bennett
Note: See TracTickets for help on using tickets.