Improve EPG metadata (#13)
This commit is contained in:
parent
fd59759892
commit
1006c6dae3
@ -111,7 +111,6 @@ class Menu:
|
||||
'duration': item.duration,
|
||||
'season': item.season,
|
||||
'episode': item.number,
|
||||
'aired': item.aired.strftime('%Y-%m-%d'),
|
||||
})
|
||||
|
||||
stream_dict = STREAM_DICT.copy()
|
||||
|
@ -119,11 +119,6 @@ class TvGuide:
|
||||
else:
|
||||
context_menu = None
|
||||
|
||||
stream_dict = STREAM_DICT.copy()
|
||||
stream_dict.update({
|
||||
'duration': program.duration,
|
||||
})
|
||||
|
||||
title = '{time} - {title}'.format(
|
||||
time=program.start.strftime('%H:%M'),
|
||||
title=program.program_title
|
||||
@ -138,6 +133,22 @@ class TvGuide:
|
||||
path = None
|
||||
title = '[COLOR gray]' + title + '[/COLOR]'
|
||||
|
||||
stream_dict = STREAM_DICT.copy()
|
||||
stream_dict.update({
|
||||
'duration': program.duration,
|
||||
})
|
||||
|
||||
info_dict = {
|
||||
'title': title,
|
||||
'plot': program.description,
|
||||
'studio': program.channel,
|
||||
'duration': program.duration,
|
||||
'tvshowtitle': program.program_title,
|
||||
'season': program.season,
|
||||
'episode': program.number,
|
||||
'mediatype': 'episode',
|
||||
}
|
||||
|
||||
listing.append(
|
||||
TitleItem(title=title,
|
||||
path=path,
|
||||
@ -145,12 +156,7 @@ class TvGuide:
|
||||
'icon': program.cover,
|
||||
'thumb': program.cover,
|
||||
},
|
||||
info_dict={
|
||||
'title': title,
|
||||
'plot': program.description,
|
||||
'duration': program.duration,
|
||||
'mediatype': 'video',
|
||||
},
|
||||
info_dict=info_dict,
|
||||
stream_dict=stream_dict,
|
||||
context_menu=context_menu,
|
||||
is_playable=True)
|
||||
|
@ -16,13 +16,13 @@ _LOGGER = logging.getLogger('epg-api')
|
||||
class EpgProgram:
|
||||
""" Defines a Program in the EPG. """
|
||||
|
||||
def __init__(self, channel, program_title, episode_title, episode_title_original, nr, season, genre, start, won_id, won_program_id, program_description,
|
||||
def __init__(self, channel, program_title, episode_title, episode_title_original, number, season, genre, start, won_id, won_program_id, program_description,
|
||||
description, duration, program_url, video_url, cover, airing):
|
||||
self.channel = channel
|
||||
self.program_title = program_title
|
||||
self.episode_title = episode_title
|
||||
self.episode_title_original = episode_title_original
|
||||
self.nr = nr
|
||||
self.number = number
|
||||
self.season = season
|
||||
self.genre = genre
|
||||
self.start = start
|
||||
@ -109,7 +109,7 @@ class EpgApi:
|
||||
program_title=data.get('program_title'),
|
||||
episode_title=data.get('episode_title'),
|
||||
episode_title_original=data.get('original_title'),
|
||||
nr=int(data.get('episode_nr')) if data.get('episode_nr') else None,
|
||||
number=int(data.get('episode_nr')) if data.get('episode_nr') else None,
|
||||
season=int(data.get('season')) if data.get('season') else None,
|
||||
genre=data.get('genre'),
|
||||
start=start,
|
||||
|
Loading…
Reference in New Issue
Block a user