forked from 0x2620/pandora
only call getId if using IMDb ids
This commit is contained in:
parent
ea3197d37d
commit
92a8480d79
1 changed files with 2 additions and 1 deletions
|
@ -375,8 +375,9 @@ def findId(request):
|
||||||
response['data']['items'] = [
|
response['data']['items'] = [
|
||||||
i.get_json(['title', 'director', 'year', 'id']) for i in qs
|
i.get_json(['title', 'director', 'year', 'id']) for i in qs
|
||||||
]
|
]
|
||||||
|
|
||||||
if not response['data']['items'] \
|
if not response['data']['items'] \
|
||||||
and len(data['id']) == 7 \
|
and settings.USE_IMDB \
|
||||||
and settings.DATA_SERVICE:
|
and settings.DATA_SERVICE:
|
||||||
r = models.external_data('getId', data)
|
r = models.external_data('getId', data)
|
||||||
if r['status']['code'] == 200:
|
if r['status']['code'] == 200:
|
||||||
|
|
Loading…
Reference in a new issue