Skip to content

Commit

Permalink
fix collections being deleted under certain conditions when using tra…
Browse files Browse the repository at this point in the history
…nslations
  • Loading branch information
meisnate12 committed May 2, 2024
1 parent 8d5b59c commit 83db539
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions modules/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def apply_vars(input_str, var_set, var_key, var_limit):
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)
Expand All @@ -390,7 +390,7 @@ def apply_vars(input_str, var_set, var_key, var_limit):

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

Expand Down

0 comments on commit 83db539

Please sign in to comment.