allow adding to user or user:Public

This commit is contained in:
j 2019-01-20 15:53:42 +05:30
parent a576de8a82
commit 820190d9e6

View file

@ -309,10 +309,12 @@ def addListItems(data):
i = Item.get(item_id) i = Item.get(item_id)
i.queue_download() i.queue_download()
i.update() i.update()
elif data['list'] and (data['list'].startswith(':') or data['list'].endswith(':Public')): elif data['list'] and (data['list'].startswith(':') or
data['list'].endswith(':Public') or
data['list'].enswtih(':')):
l = models.List.get_or_create(data['list']) l = models.List.get_or_create(data['list'])
if l: if l:
if l.name == 'Public' and l.user_id != settings.USER_ID: if l.name in ('Public', '') and l.user_id != settings.USER_ID:
state.tasks.queue('upload', { state.tasks.queue('upload', {
'user': l.user_id, 'user': l.user_id,
'items': data['items'] 'items': data['items']