From d6013fae0d886c0b16077542a35d76db770a7f39 Mon Sep 17 00:00:00 2001 From: Stefano Andreotti Date: Fri, 10 Jan 2025 16:58:44 +0100 Subject: [PATCH] Added Anime folder entry to config, Anime site download in Anime folder instead of Series folder (#223) --- StreamingCommunity/Api/Site/animeunity/costant.py | 6 +++--- StreamingCommunity/Api/Site/animeunity/film_serie.py | 4 ++-- config.json | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/StreamingCommunity/Api/Site/animeunity/costant.py b/StreamingCommunity/Api/Site/animeunity/costant.py index cb76a8b..4bb90f8 100644 --- a/StreamingCommunity/Api/Site/animeunity/costant.py +++ b/StreamingCommunity/Api/Site/animeunity/costant.py @@ -11,9 +11,9 @@ SITE_NAME = os.path.basename(os.path.dirname(os.path.abspath(__file__))) ROOT_PATH = config_manager.get('DEFAULT', 'root_path') DOMAIN_NOW = config_manager.get_dict('SITE', SITE_NAME)['domain'] -SERIES_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'serie_folder_name')) MOVIE_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'movie_folder_name')) +ANIME_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'anime_folder_name')) if config_manager.get_bool("DEFAULT", "add_siteName"): - SERIES_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'serie_folder_name')) - MOVIE_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'movie_folder_name')) \ No newline at end of file + MOVIE_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'movie_folder_name')) + ANIME_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'anime_folder_name')) \ No newline at end of file diff --git a/StreamingCommunity/Api/Site/animeunity/film_serie.py b/StreamingCommunity/Api/Site/animeunity/film_serie.py index ae62255..c7442bb 100644 --- a/StreamingCommunity/Api/Site/animeunity/film_serie.py +++ b/StreamingCommunity/Api/Site/animeunity/film_serie.py @@ -23,7 +23,7 @@ from StreamingCommunity.Api.Player.vixcloud import VideoSourceAnime # Variable -from .costant import SITE_NAME, SERIES_FOLDER, MOVIE_FOLDER +from .costant import SITE_NAME, ANIME_FOLDER, MOVIE_FOLDER @@ -54,7 +54,7 @@ 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(SERIES_FOLDER, scrape_serie.series_name) + os.path.join(ANIME_FOLDER, scrape_serie.series_name) ) else: mp4_path = os_manager.get_sanitize_path( diff --git a/config.json b/config.json index 770ec93..682ce37 100644 --- a/config.json +++ b/config.json @@ -8,6 +8,7 @@ "root_path": "Video", "movie_folder_name": "Movie", "serie_folder_name": "TV", + "anime_folder_name": "Anime", "map_episode_name": "E%(episode)_%(episode_name)", "config_qbit_tor": { "host": "192.168.1.99",