From 7ed7527815c59e8a095501a7542495f191671a38 Mon Sep 17 00:00:00 2001 From: tcely Date: Sat, 1 Mar 2025 07:43:30 -0500 Subject: [PATCH] Set `Media.skip` to `False` This handles a bad interaction between files that were deleted by the user externally and need to be skipped and files that were temporarily indistinguishable from that case. The source directory changing invalidates the absolute paths, but those should be corrected later. Leaving skip set causes display problems. --- tubesync/sync/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index a3ae6ed7..38c0d332 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -1537,7 +1537,8 @@ class Media(models.Model): # update the media_file in the db self.media_file.name = str(new_video_path.relative_to(self.media_file.storage.location)) - self.save() + self.skip = False + self.save(update_fields=('media_file', 'skip')) log.info(f'Updated "media_file" in the database for: {self!s}') (new_prefix_path, new_stem) = directory_and_stem(new_video_path)