- postprocessors = []
- postprocessors.append( { 'key': 'EmbedThumbnail', })
- postprocessors.append( { 'key': 'FFmpegMetadata', })
+ apa = video['id']
+# import pdb;pdb.set_trace()
+ if video['season'] == 0 and not video['movie']: #not a series, something like Rapport
+ validf = datetime.datetime.strptime(video['validFrom'],'%Y-%m-%dT%H:%M:%S%z')
+ valids = validf.strftime("%Y-%m-%dT%H")
+ title = f"{video['programTitle']} {valids}"
+ if not video['movie'] and video['season'] != 0:
+ title = f"{video['programTitle']} S{video['season']}E{video['episodeNumber']} {video['title']}"
+ with open(f"{path}/{video['id']}.xml","w") as xmlfile:
+ xmlfile.write(svtplay_meta2xml(video))
+ add_subs = ''
+ if video['closedCaptioned']:
+ add_subs = f"'{path}/'*{apa}*.vtt"