mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-07 20:15:24 +00:00
Add betterer formattation and ffmpeg installation testing
This commit is contained in:
parent
d7d137ed4e
commit
2ba6ae4512
@ -58,9 +58,6 @@
|
|||||||
<a href="https://github.com/Lovi-0/StreamingCommunity/releases/latest/download/StreamingCommunity.exe">
|
<a href="https://github.com/Lovi-0/StreamingCommunity/releases/latest/download/StreamingCommunity.exe">
|
||||||
<img src="https://img.shields.io/badge/-Windows_x64-blue.svg?style=for-the-badge&logo=windows" alt="Windows">
|
<img src="https://img.shields.io/badge/-Windows_x64-blue.svg?style=for-the-badge&logo=windows" alt="Windows">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://pypi.org/project/StreamingCommunity">
|
|
||||||
<img src="https://img.shields.io/badge/-PyPI-blue.svg?logo=pypi&labelColor=555555&style=for-the-badge" alt="PyPI">
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/Lovi-0/StreamingCommunity/releases/latest/download/StreamingCommunity.zip">
|
<a href="https://github.com/Lovi-0/StreamingCommunity/releases/latest/download/StreamingCommunity.zip">
|
||||||
<img src="https://img.shields.io/badge/-Source_tar-green.svg?style=for-the-badge" alt="Source Tarball">
|
<img src="https://img.shields.io/badge/-Source_tar-green.svg?style=for-the-badge" alt="Source Tarball">
|
||||||
</a>
|
</a>
|
||||||
@ -471,10 +468,10 @@ The `run-container` command mounts also the `config.json` file, so any change to
|
|||||||
| Website | Status |
|
| Website | Status |
|
||||||
|:-------------------|:------:|
|
|:-------------------|:------:|
|
||||||
| [1337xx](https://1337xx.to/) | ✅ |
|
| [1337xx](https://1337xx.to/) | ✅ |
|
||||||
| [AltadefinizioneGratis](https://altadefinizionegratis.site/) | ✅ |
|
| [AltadefinizioneGratis](https://altadefinizionegratis.pro/) | ✅ |
|
||||||
| [AnimeUnity](https://animeunity.so/) | ✅ |
|
| [AnimeUnity](https://animeunity.so/) | ✅ |
|
||||||
| [Ilcorsaronero](https://ilcorsaronero.link/) | ✅ |
|
| [Ilcorsaronero](https://ilcorsaronero.link/) | ✅ |
|
||||||
| [CB01New](https://cb01new.video/) | ✅ |
|
| [CB01New](https://cb01new.media/) | ✅ |
|
||||||
| [DDLStreamItaly](https://ddlstreamitaly.co/) | ✅ |
|
| [DDLStreamItaly](https://ddlstreamitaly.co/) | ✅ |
|
||||||
| [GuardaSerie](https://guardaserie.meme/) | ✅ |
|
| [GuardaSerie](https://guardaserie.meme/) | ✅ |
|
||||||
| [MostraGuarda](https://mostraguarda.stream/) | ✅ |
|
| [MostraGuarda](https://mostraguarda.stream/) | ✅ |
|
||||||
|
@ -1,22 +1,19 @@
|
|||||||
# 02.07.24
|
# 02.07.24
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
from urllib.parse import quote_plus
|
from urllib.parse import quote_plus
|
||||||
|
|
||||||
|
|
||||||
# Internal utilities
|
# Internal utilities
|
||||||
from StreamingCommunity.Util.console import console, msg
|
from StreamingCommunity.Util.console import console, msg
|
||||||
|
from StreamingCommunity.HelpTg.telegram_bot import get_bot_instance
|
||||||
|
|
||||||
|
|
||||||
# Logic class
|
# Logic class
|
||||||
from .site import title_search, run_get_select_title, media_search_manager
|
from .site import title_search, run_get_select_title, media_search_manager
|
||||||
from .title import download_title
|
from .title import download_title
|
||||||
|
|
||||||
# Telegram bot instance
|
|
||||||
from StreamingCommunity.HelpTg.telegram_bot import get_bot_instance
|
|
||||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
||||||
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
|
||||||
import sys
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
# Variable
|
# Variable
|
||||||
indice = 8
|
indice = 8
|
||||||
@ -24,7 +21,7 @@ _useFor = "film_serie"
|
|||||||
_deprecate = False
|
_deprecate = False
|
||||||
_priority = 2
|
_priority = 2
|
||||||
_engineDownload = "tor"
|
_engineDownload = "tor"
|
||||||
from .costant import SITE_NAME
|
from .costant import SITE_NAME, TELEGRAM_BOT
|
||||||
|
|
||||||
|
|
||||||
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||||
@ -46,6 +43,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
|||||||
# Chiude il processo attuale e avvia una nuova istanza dello script
|
# Chiude il processo attuale e avvia una nuova istanza dello script
|
||||||
subprocess.Popen([sys.executable] + sys.argv)
|
subprocess.Popen([sys.executable] + sys.argv)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if string_to_search is None:
|
if string_to_search is None:
|
||||||
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
||||||
|
@ -13,3 +13,5 @@ DOMAIN_NOW = config_manager.get_dict('SITE', SITE_NAME)['domain']
|
|||||||
|
|
||||||
SERIES_FOLDER = config_manager.get('DEFAULT', 'serie_folder_name')
|
SERIES_FOLDER = config_manager.get('DEFAULT', 'serie_folder_name')
|
||||||
MOVIE_FOLDER = config_manager.get('DEFAULT', 'movie_folder_name')
|
MOVIE_FOLDER = config_manager.get('DEFAULT', 'movie_folder_name')
|
||||||
|
|
||||||
|
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
@ -1,20 +1,19 @@
|
|||||||
# 26.05.24
|
# 26.05.24
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
from urllib.parse import quote_plus
|
from urllib.parse import quote_plus
|
||||||
|
|
||||||
|
|
||||||
# Internal utilities
|
# Internal utilities
|
||||||
from StreamingCommunity.Util.console import console, msg
|
from StreamingCommunity.Util.console import console, msg
|
||||||
|
from StreamingCommunity.HelpTg.telegram_bot import get_bot_instance
|
||||||
|
|
||||||
|
|
||||||
# Logic class
|
# Logic class
|
||||||
from .site import title_search, run_get_select_title, media_search_manager
|
from .site import title_search, run_get_select_title, media_search_manager
|
||||||
from .film import download_film
|
from .film import download_film
|
||||||
|
|
||||||
# Telegram bot instance
|
|
||||||
from StreamingCommunity.HelpTg.telegram_bot import get_bot_instance
|
|
||||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
||||||
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
|
||||||
|
|
||||||
# Variable
|
# Variable
|
||||||
indice = 2
|
indice = 2
|
||||||
@ -22,18 +21,18 @@ _useFor = "film"
|
|||||||
_deprecate = False
|
_deprecate = False
|
||||||
_priority = 2
|
_priority = 2
|
||||||
_engineDownload = "hls"
|
_engineDownload = "hls"
|
||||||
from .costant import SITE_NAME
|
from .costant import SITE_NAME, TELEGRAM_BOT
|
||||||
|
|
||||||
|
|
||||||
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||||
"""
|
"""
|
||||||
Main function of the application for film and series.
|
Main function of the application for film and series.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if TELEGRAM_BOT:
|
if TELEGRAM_BOT:
|
||||||
bot = get_bot_instance()
|
bot = get_bot_instance()
|
||||||
|
|
||||||
if string_to_search is None:
|
if string_to_search is None:
|
||||||
|
|
||||||
# Chiedi la scelta all'utente con il bot Telegram
|
# Chiedi la scelta all'utente con il bot Telegram
|
||||||
string_to_search = bot.ask(
|
string_to_search = bot.ask(
|
||||||
"key_search",
|
"key_search",
|
||||||
@ -46,6 +45,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
|||||||
# Chiude il processo attuale e avvia una nuova istanza dello script
|
# Chiude il processo attuale e avvia una nuova istanza dello script
|
||||||
subprocess.Popen([sys.executable] + sys.argv)
|
subprocess.Popen([sys.executable] + sys.argv)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if string_to_search is None:
|
if string_to_search is None:
|
||||||
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
||||||
|
@ -17,3 +17,5 @@ MOVIE_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'movie_fold
|
|||||||
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
||||||
SERIES_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'serie_folder_name'))
|
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'))
|
MOVIE_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'movie_folder_name'))
|
||||||
|
|
||||||
|
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
@ -1,23 +1,19 @@
|
|||||||
# 21.05.24
|
# 21.05.24
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
from urllib.parse import quote_plus
|
from urllib.parse import quote_plus
|
||||||
|
|
||||||
|
|
||||||
# Internal utilities
|
# Internal utilities
|
||||||
from StreamingCommunity.Util.console import console, msg
|
from StreamingCommunity.Util.console import console, msg
|
||||||
|
from StreamingCommunity.HelpTg.telegram_bot import get_bot_instance
|
||||||
|
|
||||||
|
|
||||||
# Logic class
|
# Logic class
|
||||||
from .site import title_search, run_get_select_title, media_search_manager
|
from .site import title_search, run_get_select_title, media_search_manager
|
||||||
from .film_serie import download_film, download_series
|
from .film_serie import download_film, download_series
|
||||||
|
|
||||||
# Telegram bot instance
|
|
||||||
from StreamingCommunity.HelpTg.telegram_bot import get_bot_instance
|
|
||||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
||||||
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
|
||||||
import sys
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
|
|
||||||
# Variable
|
# Variable
|
||||||
indice = 1
|
indice = 1
|
||||||
@ -25,7 +21,7 @@ _useFor = "anime"
|
|||||||
_deprecate = False
|
_deprecate = False
|
||||||
_priority = 2
|
_priority = 2
|
||||||
_engineDownload = "mp4"
|
_engineDownload = "mp4"
|
||||||
from .costant import SITE_NAME
|
from .costant import SITE_NAME, TELEGRAM_BOT
|
||||||
|
|
||||||
|
|
||||||
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||||
@ -46,6 +42,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
|||||||
# Chiude il processo attuale e avvia una nuova istanza dello script
|
# Chiude il processo attuale e avvia una nuova istanza dello script
|
||||||
subprocess.Popen([sys.executable] + sys.argv)
|
subprocess.Popen([sys.executable] + sys.argv)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if string_to_search is None:
|
if string_to_search is None:
|
||||||
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
||||||
|
@ -17,3 +17,5 @@ ANIME_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'anime_fold
|
|||||||
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
||||||
MOVIE_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'movie_folder_name'))
|
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'))
|
ANIME_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'anime_folder_name'))
|
||||||
|
|
||||||
|
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
@ -1,11 +1,13 @@
|
|||||||
# 21.05.24
|
# 21.05.24
|
||||||
|
|
||||||
from urllib.parse import quote_plus
|
|
||||||
import subprocess
|
|
||||||
import sys
|
import sys
|
||||||
|
import subprocess
|
||||||
|
from urllib.parse import quote_plus
|
||||||
|
|
||||||
|
|
||||||
# Internal utilities
|
# Internal utilities
|
||||||
from StreamingCommunity.Util.console import console, msg
|
from StreamingCommunity.Util.console import console, msg
|
||||||
|
from StreamingCommunity.HelpTg.telegram_bot import get_bot_instance
|
||||||
|
|
||||||
|
|
||||||
# Logic class
|
# Logic class
|
||||||
@ -13,10 +15,6 @@ from .site import get_version_and_domain, title_search, run_get_select_title, me
|
|||||||
from .film import download_film
|
from .film import download_film
|
||||||
from .series import download_series
|
from .series import download_series
|
||||||
|
|
||||||
# Telegram bot instance
|
|
||||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
|
||||||
from StreamingCommunity.HelpTg.telegram_bot import get_bot_instance
|
|
||||||
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
|
||||||
|
|
||||||
# Variable
|
# Variable
|
||||||
indice = 0
|
indice = 0
|
||||||
@ -24,14 +22,13 @@ _useFor = "film_serie"
|
|||||||
_deprecate = False
|
_deprecate = False
|
||||||
_priority = 1
|
_priority = 1
|
||||||
_engineDownload = "hls"
|
_engineDownload = "hls"
|
||||||
from .costant import SITE_NAME
|
from .costant import SITE_NAME, TELEGRAM_BOT
|
||||||
|
|
||||||
|
|
||||||
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||||
"""
|
"""
|
||||||
Main function of the application for film and series.
|
Main function of the application for film and series.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if TELEGRAM_BOT:
|
if TELEGRAM_BOT:
|
||||||
bot = get_bot_instance()
|
bot = get_bot_instance()
|
||||||
|
|
||||||
@ -48,6 +45,7 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
|||||||
# Chiude il processo attuale e avvia una nuova istanza dello script
|
# Chiude il processo attuale e avvia una nuova istanza dello script
|
||||||
subprocess.Popen([sys.executable] + sys.argv)
|
subprocess.Popen([sys.executable] + sys.argv)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if string_to_search is None:
|
if string_to_search is None:
|
||||||
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
||||||
|
@ -17,3 +17,5 @@ MOVIE_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'movie_fold
|
|||||||
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
||||||
SERIES_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'serie_folder_name'))
|
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'))
|
MOVIE_FOLDER = os.path.join(ROOT_PATH, SITE_NAME, config_manager.get('DEFAULT', 'movie_folder_name'))
|
||||||
|
|
||||||
|
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
29
Test/Util/ffmpegVersion.py
Normal file
29
Test/Util/ffmpegVersion.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# 05.02.25
|
||||||
|
|
||||||
|
# Fix import
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
src_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
|
||||||
|
sys.path.append(src_path)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
from StreamingCommunity.Util.ffmpeg_installer import FFMPEGDownloader
|
||||||
|
|
||||||
|
|
||||||
|
def test_ffmpeg_downloader():
|
||||||
|
|
||||||
|
# Create an instance of the downloader
|
||||||
|
downloader = FFMPEGDownloader()
|
||||||
|
|
||||||
|
# Check if the download method works and fetches the executables
|
||||||
|
ffmpeg, ffprobe, ffplay = downloader.download()
|
||||||
|
|
||||||
|
# Output the destination paths
|
||||||
|
print(f"FFmpeg path: {ffmpeg}")
|
||||||
|
print(f"FFprobe path: {ffprobe}")
|
||||||
|
print(f"FFplay path: {ffplay}")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
test_ffmpeg_downloader()
|
16
config.json
16
config.json
@ -5,13 +5,13 @@
|
|||||||
"log_to_file": false,
|
"log_to_file": false,
|
||||||
"show_message": false,
|
"show_message": false,
|
||||||
"clean_console": true,
|
"clean_console": true,
|
||||||
"root_path": "/home/giuseppepiccolo/Develop/docker/jellyfin/media/",
|
"root_path": "Video",
|
||||||
"movie_folder_name": "Movie",
|
"movie_folder_name": "Movie",
|
||||||
"serie_folder_name": "Serie",
|
"serie_folder_name": "Serie",
|
||||||
"anime_folder_name": "Anime",
|
"anime_folder_name": "Anime",
|
||||||
"map_episode_name": "%(tv_name)_S%(season)E%(episode)_%(episode_name)",
|
"map_episode_name": "S%(season)E%(episode)_%(episode_name)",
|
||||||
"config_qbit_tor": {
|
"config_qbit_tor": {
|
||||||
"host": "192.168.5.172",
|
"host": "192.168.5.99",
|
||||||
"port": "8080",
|
"port": "8080",
|
||||||
"user": "admin",
|
"user": "admin",
|
||||||
"pass": "adminadmin"
|
"pass": "adminadmin"
|
||||||
@ -19,23 +19,23 @@
|
|||||||
"add_siteName": false,
|
"add_siteName": false,
|
||||||
"disable_searchDomain": false,
|
"disable_searchDomain": false,
|
||||||
"not_close": false,
|
"not_close": false,
|
||||||
"telegram_bot": true
|
"telegram_bot": false
|
||||||
},
|
},
|
||||||
"REQUESTS": {
|
"REQUESTS": {
|
||||||
"timeout": 30,
|
"timeout": 20,
|
||||||
"max_retry": 8,
|
"max_retry": 8,
|
||||||
"proxy_start_min": 0.1,
|
"proxy_start_min": 0.1,
|
||||||
"proxy_start_max": 0.5
|
"proxy_start_max": 0.5
|
||||||
},
|
},
|
||||||
"M3U8_DOWNLOAD": {
|
"M3U8_DOWNLOAD": {
|
||||||
"tqdm_delay": 0.12,
|
"tqdm_delay": 0.15,
|
||||||
"default_video_workser": 12,
|
"default_video_workser": 12,
|
||||||
"default_audio_workser": 12,
|
"default_audio_workser": 12,
|
||||||
"merge_audio": true,
|
"merge_audio": true,
|
||||||
"specific_list_audio": [
|
"specific_list_audio": [
|
||||||
"ita"
|
"ita"
|
||||||
],
|
],
|
||||||
"merge_subs": false,
|
"merge_subs": true,
|
||||||
"specific_list_subtitles": [
|
"specific_list_subtitles": [
|
||||||
"eng",
|
"eng",
|
||||||
"spa"
|
"spa"
|
||||||
@ -79,7 +79,7 @@
|
|||||||
"domain": "so"
|
"domain": "so"
|
||||||
},
|
},
|
||||||
"cb01new": {
|
"cb01new": {
|
||||||
"domain": "mobi"
|
"domain": "media"
|
||||||
},
|
},
|
||||||
"1337xx": {
|
"1337xx": {
|
||||||
"domain": "to"
|
"domain": "to"
|
||||||
|
@ -12,5 +12,5 @@ googlesearch-python
|
|||||||
fake-useragent
|
fake-useragent
|
||||||
qbittorrent-api
|
qbittorrent-api
|
||||||
python-qbittorrent
|
python-qbittorrent
|
||||||
pyTelegramBotAPI
|
|
||||||
Pillow
|
Pillow
|
||||||
|
pyTelegramBotAPI
|
@ -11,5 +11,4 @@ request_manager.clear_file()
|
|||||||
script_id = sys.argv[1] if len(sys.argv) > 1 else "unknown"
|
script_id = sys.argv[1] if len(sys.argv) > 1 else "unknown"
|
||||||
|
|
||||||
set_session(script_id)
|
set_session(script_id)
|
||||||
|
|
||||||
main(script_id)
|
main(script_id)
|
Loading…
x
Reference in New Issue
Block a user