delete channel path building

This commit is contained in:
simon 2023-05-18 20:32:58 +07:00
parent 9d6ab6b7b3
commit 8ef59f5bff
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 4 additions and 7 deletions

View File

@ -14,7 +14,6 @@ from home.src.download.yt_dlp_base import YtWrap
from home.src.es.connect import ElasticWrap, IndexPaginate
from home.src.index.generic import YouTubeItem
from home.src.index.playlist import YoutubePlaylist
from home.src.ta.helper import clean_string
class YoutubeChannel(YouTubeItem):
@ -177,12 +176,10 @@ class YoutubeChannel(YouTubeItem):
def get_folder_path(self):
"""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)
folder_path = os.path.join(
self.app_conf["videos"],
self.json_data["channel_id"],
)
return folder_path
def delete_es_videos(self):