[74] tiny fixes

pull/737/head
meisnate12 3 years ago
parent 2bc0119958
commit eb922e89b7

@ -1 +1 @@
1.15.1-develop73 1.15.1-develop74

@ -703,9 +703,12 @@ class CollectionBuilder:
if self.obj: if self.obj:
self.exists = True self.exists = True
self.beginning_count = self.obj.childCount if not self.playlist:
if self.sync: self.beginning_count = self.obj.childCount
if self.sync or self.playlist:
self.remove_item_map = {i.ratingKey: i for i in self.library.get_collection_items(self.obj, self.smart_label_collection)} self.remove_item_map = {i.ratingKey: i for i in self.library.get_collection_items(self.obj, self.smart_label_collection)}
if self.playlist:
self.beginning_count = len(self.remove_item_map)
else: else:
self.obj = None self.obj = None
self.sync = False self.sync = False
@ -2034,7 +2037,7 @@ class CollectionBuilder:
if len(self.missing_movies) > 0: if len(self.missing_movies) > 0:
if self.details["show_missing"] is True: if self.details["show_missing"] is True:
logger.info("") logger.info("")
logger.separator(f"Missing Movies from Library: {self.name}", space=False, border=False) logger.separator(f"Missing Movies from Library: {self.library.name}", space=False, border=False)
logger.info("") logger.info("")
missing_movies_with_names = [] missing_movies_with_names = []
for missing_id in self.missing_movies: for missing_id in self.missing_movies:

@ -172,7 +172,7 @@ class Library(ABC):
if response.status_code >= 400: if response.status_code >= 400:
raise Failed(f"Overlay Error: Overlay Failed for {item.title}") raise Failed(f"Overlay Error: Overlay Failed for {item.title}")
og_image = response.content og_image = response.content
ext = "jpg" if response.headers["Content-Type"] == "image/jpeg" else "png" ext = "jpg" if response.headers["Content-Type"] == "image/jpegss" else "png"
temp_image = os.path.join(overlay_folder, f"temp.{ext}") temp_image = os.path.join(overlay_folder, f"temp.{ext}")
with open(temp_image, "wb") as handler: with open(temp_image, "wb") as handler:
handler.write(og_image) handler.write(og_image)

Loading…
Cancel
Save