mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
Fix remove
(forgot to re-add it with the code reduction pull request)
This commit is contained in:
parent
3288d21bef
commit
7149241b38
2 changed files with 10 additions and 7 deletions
|
@ -111,17 +111,12 @@ class Items(object):
|
||||||
update_videolibrary = True
|
update_videolibrary = True
|
||||||
items_process = itemtypes[itemtype](embycursor, kodicursor, pdialog)
|
items_process = itemtypes[itemtype](embycursor, kodicursor, pdialog)
|
||||||
|
|
||||||
'''
|
|
||||||
|
|
||||||
if actions.get(process):
|
|
||||||
|
|
||||||
if process == "remove":
|
|
||||||
for item in itemlist:
|
|
||||||
actions[process](item)'''
|
|
||||||
|
|
||||||
if process == "added":
|
if process == "added":
|
||||||
processItems = itemlist
|
processItems = itemlist
|
||||||
items_process.add_all(itemtype, itemlist)
|
items_process.add_all(itemtype, itemlist)
|
||||||
|
elif process == "remove":
|
||||||
|
items_process.remove_all(itemtype, itemlist)
|
||||||
else:
|
else:
|
||||||
processItems = emby.getFullItems(itemlist)
|
processItems = emby.getFullItems(itemlist)
|
||||||
items_process.process_all(itemtype, process, processItems, total)
|
items_process.process_all(itemtype, process, processItems, total)
|
||||||
|
|
|
@ -106,6 +106,14 @@ class Items(object):
|
||||||
process(item)
|
process(item)
|
||||||
self.count += 1
|
self.count += 1
|
||||||
|
|
||||||
|
def remove_all(self, item_type, items):
|
||||||
|
|
||||||
|
log.debug("Processing removal: %s", items)
|
||||||
|
|
||||||
|
process = self._get_func(item_type, "remove")
|
||||||
|
for item in items:
|
||||||
|
process(item)
|
||||||
|
|
||||||
def added(self, items, total=None, update=True):
|
def added(self, items, total=None, update=True):
|
||||||
# Generator for newly added content
|
# Generator for newly added content
|
||||||
if update:
|
if update:
|
||||||
|
|
Loading…
Reference in a new issue