forked from 0x2620/pandora
use year if passed
This commit is contained in:
parent
c394a7d57a
commit
da3ae38b9f
1 changed files with 2 additions and 0 deletions
|
@ -124,6 +124,8 @@ def get_item(info, user=None, async=False):
|
||||||
tasks.update_poster.delay(item.itemId)
|
tasks.update_poster.delay(item.itemId)
|
||||||
else:
|
else:
|
||||||
qs = Item.objects.filter(find__key='title', find__value__iexact=info['title'])
|
qs = Item.objects.filter(find__key='title', find__value__iexact=info['title'])
|
||||||
|
if 'year' in info:
|
||||||
|
qs = qs.filter(find__key='year', find__value__iexact=str(info['year']))
|
||||||
if qs.count() == 1:
|
if qs.count() == 1:
|
||||||
item = qs[0]
|
item = qs[0]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue