Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions build/kartinatv/src/api/rodnoe_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,21 @@ def getChannelsEpg(self, cids): #RodnoeTV hasn't got this function in API. Got e
if prog and prog.findtext('begin') and prog.findtext('title'):
title = prog.findtext('title').encode('utf-8') + '\n'
title += prog.findtext('info').encode('utf-8')
t_start = datetime.fromtimestamp(int(prog.findtext('begin').encode('utf-8')))
t_end = datetime.fromtimestamp(int(prog.findtext('end').encode('utf-8')))
try:
t_start = datetime.fromtimestamp(int(prog.findtext('begin').encode('utf-8')))
t_end = datetime.fromtimestamp(int(prog.findtext('end').encode('utf-8')))
except ValueError:
pass
self.channels[id].epg = EpgEntry(title, t_start, t_end)
prog = channel.find('next')
if prog and prog.findtext('begin') and prog.findtext('title'):
title = prog.findtext('title').encode('utf-8') + '\n'
title += prog.findtext('info').encode('utf-8')
t_start = datetime.fromtimestamp(int(prog.findtext('begin').encode('utf-8')))
t_end = datetime.fromtimestamp(int(prog.findtext('end').encode('utf-8')))
try:
t_start = datetime.fromtimestamp(int(prog.findtext('begin').encode('utf-8')))
t_end = datetime.fromtimestamp(int(prog.findtext('end').encode('utf-8')))
except ValueError:
pass
self.channels[id].epg = EpgEntry(title, t_start, t_end)
else:
self.channels[id].lastUpdateFailed = True
Expand Down