[arte] fix bug when there no item programImage in json
This commit is contained in:
parent
3c9b1b7f53
commit
d6db3256f9
1 changed files with 6 additions and 3 deletions
|
|
@ -172,9 +172,12 @@ class ArteBrowser(BaseBrowser):
|
||||||
else:
|
else:
|
||||||
video.title = u'%s' % (item['VTI'])
|
video.title = u'%s' % (item['VTI'])
|
||||||
video.rating = int(item['VRT'])
|
video.rating = int(item['VRT'])
|
||||||
|
|
||||||
|
if 'programImage' in item:
|
||||||
url = u'%s' % item['programImage']
|
url = u'%s' % item['programImage']
|
||||||
video.thumbnail = BaseImage(url)
|
video.thumbnail = BaseImage(url)
|
||||||
video.thumbnail.url=video.thumbnail.id
|
video.thumbnail.url=video.thumbnail.id
|
||||||
|
|
||||||
video.duration = datetime.timedelta(seconds=int(item['videoDurationSeconds']))
|
video.duration = datetime.timedelta(seconds=int(item['videoDurationSeconds']))
|
||||||
video.set_empty_fields(NotAvailable, ('url',))
|
video.set_empty_fields(NotAvailable, ('url',))
|
||||||
if 'VDE' in item:
|
if 'VDE' in item:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue