From 83db5397d692745c16a35d347d712a1c90967212 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Thu, 2 May 2024 09:23:55 -0400 Subject: [PATCH] fix collections being deleted under certain conditions when using translations --- CHANGELOG | 1 + modules/builder.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7275db68..ca379dba 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,5 +16,6 @@ Fixed `amazon` ID in `streaming` when region is `CA` Catch bad ID data from Plex Fixes `- git` file calls Ignore empty Environment Variables +Fixes collections being deleted under certain conditions when using translations Various other Minor Fixes \ No newline at end of file diff --git a/modules/builder.py b/modules/builder.py index a0d82848..96661430 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -370,7 +370,7 @@ class CollectionBuilder: trans_summary = apply_vars(trans_summary, trans_vars, trans_key, self.limit) delete_cols = [] - if (self.name and self.name != en_name) or (not self.name and en_name != trans_name): + if (self.name and self.name != en_name) or (not self.name and trans_name and en_name != trans_name): delete_cols.append(en_name) if self.name and self.name != trans_name and en_name != trans_name: delete_cols.append(trans_name) @@ -390,7 +390,7 @@ class CollectionBuilder: if not self.name: self.name = trans_name if trans_name else en_name - logger.info(self.name) + logger.info(f"Final Name: {self.name}") if en_summary or trans_summary: self.summaries["translation"] = trans_summary if trans_summary else en_summary