From: Radek Czajka Date: Fri, 22 May 2020 08:59:28 +0000 (+0200) Subject: Remove YouTube files after upload. X-Git-Url: https://git.mdrn.pl/audio.git/commitdiff_plain/5420ae6bee0c35cfab499555054e350507c21fe1?ds=inline;hp=4b27ab07ebc8ec17f7526081fab017fda1dfffe2 Remove YouTube files after upload. --- diff --git a/src/youtube/tasks.py b/src/youtube/tasks.py index 0c3298a..32e41b7 100644 --- a/src/youtube/tasks.py +++ b/src/youtube/tasks.py @@ -1,3 +1,4 @@ +import os from archive.tasks import AudioFormatTask from .models import YouTube @@ -15,7 +16,7 @@ class YouTubeTask(AudioFormatTask): @classmethod def save(cls, audiobook, file_name): """We do not save the video files.""" - pass + os.unlink(file_name) def put(self, user, audiobook, filename): YouTube.objects.first().publish(audiobook, filename)