diable apple enable piratecinema
This commit is contained in:
parent
896af63b5f
commit
d8c7f34f7c
2 changed files with 16 additions and 2 deletions
|
@ -5,6 +5,8 @@ from django.core.management.base import BaseCommand, CommandError
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
import lookup.cache
|
import lookup.cache
|
||||||
|
import poster.models
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
"""
|
"""
|
||||||
|
@ -14,6 +16,11 @@ class Command(BaseCommand):
|
||||||
args = ''
|
args = ''
|
||||||
|
|
||||||
def handle(self, **options):
|
def handle(self, **options):
|
||||||
import oxdata.lookup.cache
|
import poster.models
|
||||||
|
before_import = datetime.now()
|
||||||
lookup.cache.getIds()
|
lookup.cache.getIds()
|
||||||
|
for p in poster.models.PosterCache.objects.filter(image='', failed=False, created__gt=before_import):
|
||||||
|
print p.url
|
||||||
|
p.get()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ import ox.web.movieposterdb
|
||||||
import ox.web.imdb
|
import ox.web.imdb
|
||||||
import ox.web.impawards
|
import ox.web.impawards
|
||||||
import ox.web.apple
|
import ox.web.apple
|
||||||
|
import ox.web.piratecinema
|
||||||
|
|
||||||
from oxdata.lookup.models import MovieId
|
from oxdata.lookup.models import MovieId
|
||||||
|
|
||||||
|
@ -121,6 +122,11 @@ def getPosterUrls(m):
|
||||||
#site is sometimes down
|
#site is sometimes down
|
||||||
#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)
|
||||||
|
|
||||||
|
poster = ox.web.piratecinema.getPosterUrl(m.imdb_id)
|
||||||
|
if poster:
|
||||||
|
addPoster(poster, 'piratecinema.org', 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
|
||||||
|
@ -141,10 +147,11 @@ def getPosterUrls(m):
|
||||||
for poster in data['posters']:
|
for poster in data['posters']:
|
||||||
addPoster(poster, 'impawards.com', m.imdb_id)
|
addPoster(poster, 'impawards.com', m.imdb_id)
|
||||||
|
|
||||||
|
'''
|
||||||
if m.title and m.director:
|
if m.title and m.director:
|
||||||
data = ox.web.apple.getMovieData(m.title, m.director)
|
data = ox.web.apple.getMovieData(m.title, m.director)
|
||||||
if data and 'poster' in data:
|
if data and 'poster' in data:
|
||||||
addPoster(data['poster'], 'apple.com', m.imdb_id)
|
addPoster(data['poster'], 'apple.com', m.imdb_id)
|
||||||
|
'''
|
||||||
#fixme: get 0xdb still, possibly imdb still as fallback?
|
#fixme: get 0xdb still, possibly imdb still as fallback?
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue