[allocine] fix bug wile playing videos from external url
This commit is contained in:
parent
4d6fba9e7a
commit
5451f4b370
2 changed files with 5 additions and 4 deletions
|
|
@ -470,9 +470,10 @@ class AllocineBrowser(Browser):
|
||||||
if res is None:
|
if res is None:
|
||||||
return
|
return
|
||||||
result = json.loads(res)
|
result = json.loads(res)
|
||||||
for episode in result['feed']['media']:
|
if 'feed' in in result and 'media' in result['feed']:
|
||||||
if 'title' in episode:
|
for episode in result['feed']['media']:
|
||||||
yield self.parse_video(episode, category)
|
if 'title' in episode:
|
||||||
|
yield self.parse_video(episode, category)
|
||||||
|
|
||||||
def parse_video(self, _video, category):
|
def parse_video(self, _video, category):
|
||||||
video = BaseVideo(u'%s#%s' % (_video['code'], category))
|
video = BaseVideo(u'%s#%s' % (_video['code'], category))
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ class AllocineModule(Module, CapCinema, CapVideo, CapCalendarEvent, CapCollectio
|
||||||
def get_video(self, _id):
|
def get_video(self, _id):
|
||||||
with self.browser:
|
with self.browser:
|
||||||
split_id = _id.split('#')
|
split_id = _id.split('#')
|
||||||
if split_id[-1] == 'movir':
|
if split_id[-1] == 'movie':
|
||||||
return self.browser.get_movie_from_id(split_id[0])
|
return self.browser.get_movie_from_id(split_id[0])
|
||||||
return self.browser.get_video_from_id(split_id[0], split_id[-1])
|
return self.browser.get_video_from_id(split_id[0], split_id[-1])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue