mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-05 02:55:25 +00:00
Remove subdirectory with site_name
This commit is contained in:
parent
b6319b42bd
commit
d13c78e3d1
@ -39,7 +39,7 @@ def download_title(select_title: MediaItem):
|
||||
# Define output path
|
||||
title_name = os_manager.get_sanitize_file(select_title.name)
|
||||
mp4_path = os_manager.get_sanitize_path(
|
||||
os.path.join(ROOT_PATH, SITE_NAME, MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
||||
os.path.join(ROOT_PATH, MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
||||
)
|
||||
|
||||
# Create output folder
|
||||
|
@ -22,7 +22,7 @@ from StreamingCommunity.Api.Player.supervideo import VideoSource
|
||||
|
||||
|
||||
# Config
|
||||
from .costant import ROOT_PATH, SITE_NAME, MOVIE_FOLDER
|
||||
from .costant import ROOT_PATH, MOVIE_FOLDER
|
||||
|
||||
|
||||
def download_film(select_title: MediaItem) -> str:
|
||||
@ -47,7 +47,7 @@ def download_film(select_title: MediaItem) -> str:
|
||||
# Define output path
|
||||
title_name = os_manager.get_sanitize_file(select_title.name) + ".mp4"
|
||||
mp4_path = os_manager.get_sanitize_path(
|
||||
os.path.join(ROOT_PATH, SITE_NAME, MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
||||
os.path.join(ROOT_PATH, MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
||||
)
|
||||
|
||||
# Get m3u8 master playlist
|
||||
|
@ -19,7 +19,7 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
||||
|
||||
|
||||
# Variable
|
||||
from .costant import SITE_NAME, DOMAIN_NOW
|
||||
from .costant import SITE_NAME
|
||||
media_search_manager = MediaManager()
|
||||
table_show_manager = TVShowManager()
|
||||
|
||||
|
@ -54,11 +54,11 @@ def download_episode(index_select: int, scrape_serie: ScrapeSerieAnime, video_so
|
||||
|
||||
if scrape_serie.is_series:
|
||||
mp4_path = os_manager.get_sanitize_path(
|
||||
os.path.join(ROOT_PATH, SITE_NAME, SERIES_FOLDER, scrape_serie.series_name)
|
||||
os.path.join(ROOT_PATH, SERIES_FOLDER, scrape_serie.series_name)
|
||||
)
|
||||
else:
|
||||
mp4_path = os_manager.get_sanitize_path(
|
||||
os.path.join(ROOT_PATH, SITE_NAME, MOVIE_FOLDER, scrape_serie.series_name)
|
||||
os.path.join(ROOT_PATH, MOVIE_FOLDER, scrape_serie.series_name)
|
||||
)
|
||||
|
||||
# Create output folder
|
||||
|
@ -21,7 +21,7 @@ from StreamingCommunity.Api.Player.maxstream import VideoSource
|
||||
|
||||
|
||||
# Config
|
||||
from .costant import ROOT_PATH, SITE_NAME, MOVIE_FOLDER
|
||||
from .costant import ROOT_PATH, MOVIE_FOLDER
|
||||
|
||||
|
||||
def download_film(select_title: MediaItem) -> str:
|
||||
@ -46,7 +46,7 @@ def download_film(select_title: MediaItem) -> str:
|
||||
# Define output path
|
||||
title_name = os_manager.get_sanitize_file(select_title.name) +".mp4"
|
||||
mp4_path = os_manager.get_sanitize_path(
|
||||
os.path.join(ROOT_PATH, SITE_NAME, MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
||||
os.path.join(ROOT_PATH, MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
||||
)
|
||||
|
||||
# Get m3u8 master playlist
|
||||
|
@ -24,7 +24,7 @@ from StreamingCommunity.Api.Player.ddl import VideoSource
|
||||
|
||||
|
||||
# Variable
|
||||
from .costant import ROOT_PATH, SITE_NAME, SERIES_FOLDER
|
||||
from .costant import ROOT_PATH, SERIES_FOLDER
|
||||
table_show_manager = TVShowManager()
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ def download_video(index_episode_selected: int, scape_info_serie: GetSerieInfo,
|
||||
title_name = os_manager.get_sanitize_file(
|
||||
f"{map_episode_title(scape_info_serie.tv_name, None, index_episode_selected, obj_episode.get('name'))}.mp4"
|
||||
)
|
||||
mp4_path = os.path.join(ROOT_PATH, SITE_NAME, SERIES_FOLDER, scape_info_serie.tv_name)
|
||||
mp4_path = os.path.join(ROOT_PATH, SERIES_FOLDER, scape_info_serie.tv_name)
|
||||
|
||||
# Create output folder
|
||||
os_manager.create_path(mp4_path)
|
||||
|
@ -24,7 +24,7 @@ from StreamingCommunity.Api.Player.supervideo import VideoSource
|
||||
|
||||
|
||||
# Variable
|
||||
from .costant import ROOT_PATH, SITE_NAME, SERIES_FOLDER
|
||||
from .costant import ROOT_PATH, SERIES_FOLDER
|
||||
table_show_manager = TVShowManager()
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ def download_video(index_season_selected: int, index_episode_selected: int, scap
|
||||
|
||||
# Define filename and path for the downloaded video
|
||||
mp4_name = f"{map_episode_title(scape_info_serie.tv_name, index_season_selected, index_episode_selected, obj_episode.get('name'))}.mp4"
|
||||
mp4_path = os.path.join(ROOT_PATH, SITE_NAME, SERIES_FOLDER, scape_info_serie.tv_name, f"S{index_season_selected}")
|
||||
mp4_path = os.path.join(ROOT_PATH, SERIES_FOLDER, scape_info_serie.tv_name, f"S{index_season_selected}")
|
||||
|
||||
# Setup video source
|
||||
video_source = VideoSource(obj_episode.get('url'))
|
||||
|
@ -15,7 +15,7 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
||||
|
||||
|
||||
# Config
|
||||
from .costant import ROOT_PATH, SITE_NAME, MOVIE_FOLDER
|
||||
from .costant import ROOT_PATH, MOVIE_FOLDER
|
||||
|
||||
|
||||
def download_title(select_title: MediaItem):
|
||||
@ -33,7 +33,7 @@ def download_title(select_title: MediaItem):
|
||||
# Define output path
|
||||
title_name = os_manager.get_sanitize_file(select_title.name)
|
||||
mp4_path = os_manager.get_sanitize_path(
|
||||
os.path.join(ROOT_PATH, SITE_NAME, MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
||||
os.path.join(ROOT_PATH, MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
||||
)
|
||||
|
||||
# Create output folder
|
||||
|
@ -73,7 +73,7 @@ def download_film(movie_details: Json_film) -> str:
|
||||
|
||||
# Define output path
|
||||
title_name = os_manager.get_sanitize_file(movie_details.title) + ".mp4"
|
||||
mp4_path = os.path.join(ROOT_PATH, SITE_NAME, MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
||||
mp4_path = os.path.join(ROOT_PATH, MOVIE_FOLDER, title_name.replace(".mp4", ""))
|
||||
|
||||
# Get m3u8 master playlist
|
||||
master_playlist = video_source.get_playlist()
|
||||
|
@ -52,7 +52,7 @@ def download_film(select_title: MediaItem) -> str:
|
||||
|
||||
# Define the filename and path for the downloaded film
|
||||
title_name = os_manager.get_sanitize_file(select_title.slug) + ".mp4"
|
||||
mp4_path = os.path.join(ROOT_PATH, SITE_NAME, MOVIE_FOLDER, select_title.slug)
|
||||
mp4_path = os.path.join(ROOT_PATH, MOVIE_FOLDER, select_title.slug)
|
||||
|
||||
# Download the film using the m3u8 playlist, and output filename
|
||||
r_proc = HLS_Downloader(
|
||||
|
@ -49,7 +49,7 @@ def download_video(index_season_selected: int, index_episode_selected: int, scra
|
||||
|
||||
# Define filename and path for the downloaded video
|
||||
mp4_name = f"{map_episode_title(scrape_serie.series_name, index_season_selected, index_episode_selected, obj_episode.name)}.mp4"
|
||||
mp4_path = os.path.join(ROOT_PATH, SITE_NAME, SERIES_FOLDER, scrape_serie.series_name, f"S{index_season_selected}")
|
||||
mp4_path = os.path.join(ROOT_PATH, SERIES_FOLDER, scrape_serie.series_name, f"S{index_season_selected}")
|
||||
|
||||
# Retrieve scws and if available master playlist
|
||||
video_source.get_iframe(obj_episode.id)
|
||||
|
@ -257,7 +257,7 @@ class M3U8_Segments:
|
||||
|
||||
with httpx.Client(proxies=proxy, verify=REQUEST_VERIFY) as client:
|
||||
if 'key_base_url' in self.__dict__:
|
||||
response = client.get(
|
||||
response = client.get(
|
||||
url=ts_url,
|
||||
headers=random_headers(self.key_base_url),
|
||||
timeout=max_timeout,
|
||||
|
@ -5,7 +5,7 @@
|
||||
"log_to_file": true,
|
||||
"show_message": true,
|
||||
"clean_console": true,
|
||||
"root_path": "Video",
|
||||
"root_path": "D:\\StreamingDownload\\Downloads",
|
||||
"movie_folder_name": "Movie",
|
||||
"serie_folder_name": "TV",
|
||||
"map_episode_name": "%(tv_name)_S%(season)E%(episode)_%(episode_name)",
|
||||
|
Loading…
x
Reference in New Issue
Block a user