From 19f5439c0f50fbe7e16bfb3206a836c67e091695 Mon Sep 17 00:00:00 2001 From: Lovi <62809003+Lovi-0@users.noreply.github.com> Date: Sun, 16 Jun 2024 15:51:24 +0200 Subject: [PATCH] Better costant with os. --- Src/Api/4kTitle/__init__.py | 15 +++++++++++++++ Src/Api/4kTitle/costant.py | 15 +++++++++++++++ Src/Api/Altadefinizione/__init__.py | 1 + Src/Api/Altadefinizione/costant.py | 5 ++++- Src/Api/Animeunity/costant.py | 5 ++++- Src/Api/Ddlstreamitaly/costant.py | 5 ++++- Src/Api/Guardaserie/costant.py | 5 ++++- Src/Api/Streamingcommunity/__init__.py | 1 + Src/Api/Streamingcommunity/costant.py | 5 ++++- config.json | 11 ++++++----- 10 files changed, 58 insertions(+), 10 deletions(-) create mode 100644 Src/Api/4kTitle/__init__.py create mode 100644 Src/Api/4kTitle/costant.py diff --git a/Src/Api/4kTitle/__init__.py b/Src/Api/4kTitle/__init__.py new file mode 100644 index 0000000..7d2f70f --- /dev/null +++ b/Src/Api/4kTitle/__init__.py @@ -0,0 +1,15 @@ +# 16.06.24 + +# Internal utilities +from Src.Util.console import console, msg + + +# Variable +indice = 5 + + +def search(): + """ + Main function of the application for film and series. + """ + pass \ No newline at end of file diff --git a/Src/Api/4kTitle/costant.py b/Src/Api/4kTitle/costant.py new file mode 100644 index 0000000..15e7393 --- /dev/null +++ b/Src/Api/4kTitle/costant.py @@ -0,0 +1,15 @@ +# 26.05.24 + +import os + + +# Internal utilities +from Src.Util._jsonConfig import config_manager + + +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('SITE', SITE_NAME) + +MOVIE_FOLDER = "Movie" +SERIE_FOLDER = "Serie" \ No newline at end of file diff --git a/Src/Api/Altadefinizione/__init__.py b/Src/Api/Altadefinizione/__init__.py index 8ea1a52..27a9885 100644 --- a/Src/Api/Altadefinizione/__init__.py +++ b/Src/Api/Altadefinizione/__init__.py @@ -12,6 +12,7 @@ from .film import download_film # Variable indice = 2 + def search(): """ Main function of the application for film and series. diff --git a/Src/Api/Altadefinizione/costant.py b/Src/Api/Altadefinizione/costant.py index 9b6c8b5..aa9d6eb 100644 --- a/Src/Api/Altadefinizione/costant.py +++ b/Src/Api/Altadefinizione/costant.py @@ -1,10 +1,13 @@ # 26.05.24 +import os + + # Internal utilities from Src.Util._jsonConfig import config_manager -SITE_NAME = "altadefinizione" +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('SITE', SITE_NAME) diff --git a/Src/Api/Animeunity/costant.py b/Src/Api/Animeunity/costant.py index 8587dd8..6275469 100644 --- a/Src/Api/Animeunity/costant.py +++ b/Src/Api/Animeunity/costant.py @@ -1,10 +1,13 @@ # 26.05.24 +import os + + # Internal utilities from Src.Util._jsonConfig import config_manager -SITE_NAME = "animeunity" +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('SITE', SITE_NAME) diff --git a/Src/Api/Ddlstreamitaly/costant.py b/Src/Api/Ddlstreamitaly/costant.py index 0cc185d..9c7e339 100644 --- a/Src/Api/Ddlstreamitaly/costant.py +++ b/Src/Api/Ddlstreamitaly/costant.py @@ -1,10 +1,13 @@ # 09.06.24 +import os + + # Internal utilities from Src.Util._jsonConfig import config_manager -SITE_NAME = "ddlstreamitaly" +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('SITE', SITE_NAME) diff --git a/Src/Api/Guardaserie/costant.py b/Src/Api/Guardaserie/costant.py index cd7ffe1..4072af4 100644 --- a/Src/Api/Guardaserie/costant.py +++ b/Src/Api/Guardaserie/costant.py @@ -1,10 +1,13 @@ # 09.06.24 +import os + + # Internal utilities from Src.Util._jsonConfig import config_manager -SITE_NAME = "guardaserie" +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('SITE', SITE_NAME) diff --git a/Src/Api/Streamingcommunity/__init__.py b/Src/Api/Streamingcommunity/__init__.py index 065fce9..078449a 100644 --- a/Src/Api/Streamingcommunity/__init__.py +++ b/Src/Api/Streamingcommunity/__init__.py @@ -18,6 +18,7 @@ from .series import download_series # Variable indice = 0 + def search(): """ Main function of the application for film and series. diff --git a/Src/Api/Streamingcommunity/costant.py b/Src/Api/Streamingcommunity/costant.py index 1743da0..68f52fc 100644 --- a/Src/Api/Streamingcommunity/costant.py +++ b/Src/Api/Streamingcommunity/costant.py @@ -1,10 +1,13 @@ # 26.05.24 +import os + + # Internal utilities from Src.Util._jsonConfig import config_manager -SITE_NAME = "streamingcommunity" +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('SITE', SITE_NAME) diff --git a/config.json b/config.json index 0d2caa8..6018f7f 100644 --- a/config.json +++ b/config.json @@ -52,10 +52,11 @@ "force_resolution": -1 }, "SITE": { - "streamingcommunity": "foo", - "animeunity": "to", - "altadefinizione": "vodka", - "guardaserie": "ceo", - "ddlstreamitaly": "co" + "Streamingcommunity": "foo", + "Animeunity": "to", + "Altadefinizione": "vodka", + "Guardaserie": "ceo", + "Ddlstreamitaly": "co", + "4kTitle": "foo" } } \ No newline at end of file