mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 05:56:37 +00:00
Only save() the current Media
This commit is contained in:
parent
a44e856378
commit
eb27bf1583
@ -1600,8 +1600,7 @@ class Media(models.Model):
|
|||||||
|
|
||||||
# update the media_file in the db
|
# update the media_file in the db
|
||||||
self.media_file.name = str(new_video_path.relative_to(self.media_file.storage.location))
|
self.media_file.name = str(new_video_path.relative_to(self.media_file.storage.location))
|
||||||
self.save(update_fields={'media_file'})
|
self.save()
|
||||||
self.refresh_from_db(fields={'media_file'})
|
|
||||||
log.info(f'Updated "media_file" in the database for: {self!s}')
|
log.info(f'Updated "media_file" in the database for: {self!s}')
|
||||||
|
|
||||||
(new_prefix_path, new_stem) = directory_and_stem(new_video_path)
|
(new_prefix_path, new_stem) = directory_and_stem(new_video_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user