mirror of
https://github.com/tubearchivist/tubearchivist
synced 2024-11-02 09:41:07 +00:00
delete channel path building
This commit is contained in:
parent
9d6ab6b7b3
commit
8ef59f5bff
@ -14,7 +14,6 @@ from home.src.download.yt_dlp_base import YtWrap
|
|||||||
from home.src.es.connect import ElasticWrap, IndexPaginate
|
from home.src.es.connect import ElasticWrap, IndexPaginate
|
||||||
from home.src.index.generic import YouTubeItem
|
from home.src.index.generic import YouTubeItem
|
||||||
from home.src.index.playlist import YoutubePlaylist
|
from home.src.index.playlist import YoutubePlaylist
|
||||||
from home.src.ta.helper import clean_string
|
|
||||||
|
|
||||||
|
|
||||||
class YoutubeChannel(YouTubeItem):
|
class YoutubeChannel(YouTubeItem):
|
||||||
@ -177,12 +176,10 @@ class YoutubeChannel(YouTubeItem):
|
|||||||
|
|
||||||
def get_folder_path(self):
|
def get_folder_path(self):
|
||||||
"""get folder where media files get stored"""
|
"""get folder where media files get stored"""
|
||||||
channel_name = self.json_data["channel_name"]
|
folder_path = os.path.join(
|
||||||
folder_name = clean_string(channel_name)
|
self.app_conf["videos"],
|
||||||
if len(folder_name) <= 3:
|
self.json_data["channel_id"],
|
||||||
# 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
|
return folder_path
|
||||||
|
|
||||||
def delete_es_videos(self):
|
def delete_es_videos(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user