Skip to content

Commit

Permalink
Add release-date of an episode to tv-grabber ttvdb4.py
Browse files Browse the repository at this point in the history
The 'aired' field retrieved by the TV grabber for thetvdb.com API v4
for a specific episode seems to be compatible to the 'releasedate'
item of the xml format required by MythTV documented at
https://www.mythtv.org/wiki/MythTV_Universal_Metadata_Format

Refs #628

(cherry picked from commit c11c85a)
  • Loading branch information
rcrdnalor committed Nov 27, 2022
1 parent 2af1c20 commit 8ff52c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mythtv/bindings/python/ttvdbv4/myth4ttvdbv4.py
Expand Up @@ -406,6 +406,10 @@ def _format_xml(self, ser_x, sea_x=None, epi_x=None):
m.season = check_item(m, ("season", epi_x.seasonNumber), ignore=False)
m.episode = check_item(m, ("episode", epi_x.number), ignore=False)
m.runtime = check_item(m, ("runtime", epi_x.runtime), ignore=True)
if epi_x.aired:
# convert string to 'date' object, assuming ISO naming
m.releasedate = convert_date(epi_x.aired[:10])

desc = strip_tags(desc).replace("\r\n", "").replace("\n", "")
m.description = check_item(m, ("description", desc))

Expand Down

0 comments on commit 8ff52c5

Please sign in to comment.