disable debug output

This commit is contained in:
j 2010-08-11 15:19:26 +02:00
parent 12f04edd50
commit 8598b2c771

View file

@ -102,8 +102,8 @@ def getPosterUrls(m):
p.save()
if m.imdb_id:
if settings.DEBUG:
print 'imdb'
#if settings.DEBUG:
# print 'imdb'
poster = ox.web.imdb.getMoviePoster(m.imdb_id)
if poster:
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']:
# addPoster(poster, 'movieposterdb.com', m.imdb_id)
if m.criterion_id:
if settings.DEBUG:
print 'criterion', m.criterion_id
#if settings.DEBUG:
# print 'criterion', m.criterion_id
for poster in ox.web.criterion.getData(m.criterion_id)['posters']:
addPoster(poster, 'criterion.com', m.criterion_id)
if m.wikipedia_id:
if settings.DEBUG:
print 'wikipedia'
#if settings.DEBUG:
# print 'wikipedia'
poster = ox.web.wikipedia.getPosterUrl(m.wikipedia_id)
if poster:
if PosterCache.objects.all().filter(url=poster).count() == 0:
addPoster(poster, 'wikipedia.org', m.wikipedia_id)
if m.impawards_id:
if settings.DEBUG:
print 'impawards'
#if settings.DEBUG:
# print 'impawards'
data = ox.web.impawards.getData(m.impawards_id)
if data and 'imdbId' in data:
for poster in data['posters']:
addPoster(poster, 'impawards.com', m.imdb_id)
print 'done'
#fixme: get 0xdb still, possibly imdb still as fallback?