From 5420ae6bee0c35cfab499555054e350507c21fe1 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 22 May 2020 10:59:28 +0200 Subject: [PATCH 1/1] Remove YouTube files after upload. --- src/youtube/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.20.1