disable debug output
This commit is contained in:
parent
12f04edd50
commit
8598b2c771
1 changed files with 8 additions and 10 deletions
|
@ -102,8 +102,8 @@ def getPosterUrls(m):
|
||||||
p.save()
|
p.save()
|
||||||
|
|
||||||
if m.imdb_id:
|
if m.imdb_id:
|
||||||
if settings.DEBUG:
|
#if settings.DEBUG:
|
||||||
print 'imdb'
|
# print 'imdb'
|
||||||
poster = ox.web.imdb.getMoviePoster(m.imdb_id)
|
poster = ox.web.imdb.getMoviePoster(m.imdb_id)
|
||||||
if poster:
|
if poster:
|
||||||
addPoster(poster, 'imdb.com', m.imdb_id)
|
addPoster(poster, 'imdb.com', m.imdb_id)
|
||||||
|
@ -112,26 +112,24 @@ def getPosterUrls(m):
|
||||||
#for poster in ox.web.movieposterdb.getData(m.imdb_id)['posters']:
|
#for poster in ox.web.movieposterdb.getData(m.imdb_id)['posters']:
|
||||||
# addPoster(poster, 'movieposterdb.com', m.imdb_id)
|
# addPoster(poster, 'movieposterdb.com', m.imdb_id)
|
||||||
if m.criterion_id:
|
if m.criterion_id:
|
||||||
if settings.DEBUG:
|
#if settings.DEBUG:
|
||||||
print 'criterion', m.criterion_id
|
# print 'criterion', m.criterion_id
|
||||||
for poster in ox.web.criterion.getData(m.criterion_id)['posters']:
|
for poster in ox.web.criterion.getData(m.criterion_id)['posters']:
|
||||||
addPoster(poster, 'criterion.com', m.criterion_id)
|
addPoster(poster, 'criterion.com', m.criterion_id)
|
||||||
if m.wikipedia_id:
|
if m.wikipedia_id:
|
||||||
if settings.DEBUG:
|
#if settings.DEBUG:
|
||||||
print 'wikipedia'
|
# print 'wikipedia'
|
||||||
poster = ox.web.wikipedia.getPosterUrl(m.wikipedia_id)
|
poster = ox.web.wikipedia.getPosterUrl(m.wikipedia_id)
|
||||||
if poster:
|
if poster:
|
||||||
if PosterCache.objects.all().filter(url=poster).count() == 0:
|
if PosterCache.objects.all().filter(url=poster).count() == 0:
|
||||||
addPoster(poster, 'wikipedia.org', m.wikipedia_id)
|
addPoster(poster, 'wikipedia.org', m.wikipedia_id)
|
||||||
if m.impawards_id:
|
if m.impawards_id:
|
||||||
if settings.DEBUG:
|
#if settings.DEBUG:
|
||||||
print 'impawards'
|
# print 'impawards'
|
||||||
data = ox.web.impawards.getData(m.impawards_id)
|
data = ox.web.impawards.getData(m.impawards_id)
|
||||||
if data and 'imdbId' in data:
|
if data and 'imdbId' in data:
|
||||||
for poster in data['posters']:
|
for poster in data['posters']:
|
||||||
addPoster(poster, 'impawards.com', m.imdb_id)
|
addPoster(poster, 'impawards.com', m.imdb_id)
|
||||||
|
|
||||||
print 'done'
|
|
||||||
|
|
||||||
#fixme: get 0xdb still, possibly imdb still as fallback?
|
#fixme: get 0xdb still, possibly imdb still as fallback?
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue