[allocine] movie poster correction
This commit is contained in:
parent
d5d23d01c5
commit
4a832d7dda
2 changed files with 8 additions and 4 deletions
|
|
@ -48,6 +48,9 @@ class AllocineBrowser(BaseBrowser):
|
|||
if 'castingShort' in m and 'actors' in m['castingShort']:
|
||||
tdesc += ' ; %s' % m['castingShort']['actors']
|
||||
short_description = tdesc.strip('; ')
|
||||
thumbnail_url = NotAvailable
|
||||
if 'poster' in m:
|
||||
thumbnail_url = unicode(m['poster']['href'])
|
||||
movie = Movie(m['code'], unicode(m['originalTitle']))
|
||||
movie.other_titles = NotLoaded
|
||||
movie.release_date = NotLoaded
|
||||
|
|
@ -58,7 +61,7 @@ class AllocineBrowser(BaseBrowser):
|
|||
movie.note = NotLoaded
|
||||
movie.roles = NotLoaded
|
||||
movie.all_release_dates = NotLoaded
|
||||
movie.thumbnail_url = NotLoaded
|
||||
movie.thumbnail_url = thumbnail_url
|
||||
yield movie
|
||||
|
||||
def iter_persons(self, pattern):
|
||||
|
|
@ -109,8 +112,8 @@ class AllocineBrowser(BaseBrowser):
|
|||
if 'originalTitle' not in jres:
|
||||
return
|
||||
title = unicode(jres['originalTitle'].strip())
|
||||
if 'picture' in jres:
|
||||
thumbnail_url = unicode(jres['picture']['href'])
|
||||
if 'poster' in jres:
|
||||
thumbnail_url = unicode(jres['poster']['href'])
|
||||
if 'genre' in jres:
|
||||
for g in jres['genre']:
|
||||
genres.append(g['$'])
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ class MiniMovie(QFrame):
|
|||
self.ui.backendLabel.setText(backend.name)
|
||||
|
||||
def gotThumbnail(self):
|
||||
self.backend.fill_movie(self.movie, ('thumbnail_url'))
|
||||
if empty(self.movie.thumbnail_url):
|
||||
self.backend.fill_movie(self.movie, ('thumbnail_url'))
|
||||
if not empty(self.movie.thumbnail_url):
|
||||
data = urllib.urlopen(self.movie.thumbnail_url).read()
|
||||
img = QImage.fromData(data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue