item_locks when set to false will unlock

This commit is contained in:
meisnate12 2022-01-26 09:23:19 -05:00
parent e8fe21d296
commit e8200c367c

View file

@ -2138,11 +2138,11 @@ class CollectionBuilder:
# Locking should come before refreshing since refreshing can change metadata (i.e. if specified to both lock # Locking should come before refreshing since refreshing can change metadata (i.e. if specified to both lock
# background/poster and also refreshing, assume that the item background/poster should be kept) # background/poster and also refreshing, assume that the item background/poster should be kept)
if "item_lock_background" in self.item_details: if "item_lock_background" in self.item_details:
self.library.query(item.lockArt) self.library.query(item.lockArt if self.item_details["item_lock_background"] else item.unlockArt)
if "item_lock_poster" in self.item_details: if "item_lock_poster" in self.item_details:
self.library.query(item.lockPoster) self.library.query(item.lockPoster if self.item_details["item_lock_poster"] else item.unlockPoster)
if "item_lock_title" in self.item_details: if "item_lock_title" in self.item_details:
self.library.edit_query(item, {"title.locked": 1}) self.library.edit_query(item, {"title.locked": 1 if self.item_details["item_lock_title"] else 0})
if "item_refresh" in self.item_details: if "item_refresh" in self.item_details:
delay = self.item_details["item_refresh_delay"] if "item_refresh_delay" in self.item_details else self.library.item_refresh_delay delay = self.item_details["item_refresh_delay"] if "item_refresh_delay" in self.item_details else self.library.item_refresh_delay
if delay > 0: if delay > 0: