From 4f56ebd1cee3c41119ab42f3dc72c81484fcc5ad Mon Sep 17 00:00:00 2001 From: tcely Date: Thu, 19 Dec 2024 21:34:28 -0500 Subject: [PATCH] Depend on the function to write a temporary file --- tubesync/sync/models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index 94901e8f..ca4e79ec 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -1567,9 +1567,7 @@ class Media(models.Model): # The thumbpath inside the .nfo file may have changed if self.source.write_nfo and self.source.copy_thumbnails: - nfo_path_tmp = Path(str(self.nfopath) + '.tmp') - write_text_file(nfo_path_tmp, self.nfoxml) - nfo_path_tmp.replace(new_prefix_path / self.nfopath.name) + write_text_file(new_prefix_path / self.nfopath.name, self.nfoxml) # try to remove empty dirs parent_dir = old_video_path.parent