From e5e83287ab52dc6dc41ed681bfe89ab5c30f59c3 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 30 Jan 2022 08:33:10 +0700 Subject: [PATCH] fix channel delete for channel_id fallback folders --- tubearchivist/home/src/index/channel.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tubearchivist/home/src/index/channel.py b/tubearchivist/home/src/index/channel.py index 50a0696..57a1c4e 100644 --- a/tubearchivist/home/src/index/channel.py +++ b/tubearchivist/home/src/index/channel.py @@ -198,6 +198,9 @@ class YoutubeChannel(YouTubeItem): """get folder where media files get stored""" channel_name = self.json_data["channel_name"] folder_name = clean_string(channel_name) + if len(folder_name) <= 3: + # fall back to channel id + folder_name = self.json_data["channel_id"] folder_path = os.path.join(self.app_conf["videos"], folder_name) return folder_path