mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 21:46:44 +00:00
Depend on the function to write a temporary file
This commit is contained in:
parent
72e4095354
commit
4f56ebd1ce
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user