fix deleting media files

This commit is contained in:
Laurent DEFERT 2022-12-28 18:37:55 +01:00
parent f9908a4d3b
commit e69adafcec
1 changed files with 1 additions and 1 deletions

View File

@ -416,7 +416,7 @@ class DeleteSourceView(DeleteView, FormMixin):
for media in Media.objects.filter(source=source): for media in Media.objects.filter(source=source):
if media.media_file: if media.media_file:
# Delete the media file # Delete the media file
delete_file(media.media_file.name) delete_file(media.media_file.path)
# Delete thumbnail copy if it exists # Delete thumbnail copy if it exists
delete_file(media.thumbpath) delete_file(media.thumbpath)
# Delete NFO file if it exists # Delete NFO file if it exists