make systems without imdb work
This commit is contained in:
parent
1014bc8a89
commit
ec28dc05e1
10 changed files with 76 additions and 36 deletions
|
|
@ -8,6 +8,7 @@ import re
|
|||
import hashlib
|
||||
import unicodedata
|
||||
|
||||
from django.conf import settings
|
||||
import ox
|
||||
import ox.iso
|
||||
from ox.normalize import normalizeName, normalizeTitle
|
||||
|
|
@ -166,11 +167,13 @@ def parse_path(path):
|
|||
M/McCarthy, Thomas/The Visitor (2007)
|
||||
G/Godard, Jean-Luc/Histoire(s) du cinema_ Toutes les histoires (1988)
|
||||
'''
|
||||
import ox.web.imdb
|
||||
search_title = oxdb_title(path, True)
|
||||
r = {}
|
||||
r['title'] = oxdb_title(path)
|
||||
r['director'] = oxdb_directors(path)
|
||||
if not settings.USE_IMDB:
|
||||
return r
|
||||
import ox.web.imdb
|
||||
search_title = oxdb_title(path, True)
|
||||
r['directors'] = oxdb_directors(path)
|
||||
year = ox.findRe(path, '\((\d{4})\)')
|
||||
if year:
|
||||
r['year'] = year
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue