mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-06 19:45: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">
|
||||
<img src="https://img.shields.io/badge/-Windows_x64-blue.svg?style=for-the-badge&logo=windows" alt="Windows">
|
||||
</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">
|
||||
<img src="https://img.shields.io/badge/-Source_tar-green.svg?style=for-the-badge" alt="Source Tarball">
|
||||
</a>
|
||||
@ -471,10 +468,10 @@ The `run-container` command mounts also the `config.json` file, so any change to
|
||||
| Website | Status |
|
||||
|:-------------------|:------:|
|
||||
| [1337xx](https://1337xx.to/) | ✅ |
|
||||
| [AltadefinizioneGratis](https://altadefinizionegratis.site/) | ✅ |
|
||||
| [AltadefinizioneGratis](https://altadefinizionegratis.pro/) | ✅ |
|
||||
| [AnimeUnity](https://animeunity.so/) | ✅ |
|
||||
| [Ilcorsaronero](https://ilcorsaronero.link/) | ✅ |
|
||||
| [CB01New](https://cb01new.video/) | ✅ |
|
||||
| [CB01New](https://cb01new.media/) | ✅ |
|
||||
| [DDLStreamItaly](https://ddlstreamitaly.co/) | ✅ |
|
||||
| [GuardaSerie](https://guardaserie.meme/) | ✅ |
|
||||
| [MostraGuarda](https://mostraguarda.stream/) | ✅ |
|
||||
|
@ -1,22 +1,19 @@
|
||||
# 02.07.24
|
||||
|
||||
import sys
|
||||
import subprocess
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.HelpTg.telegram_bot import get_bot_instance
|
||||
|
||||
|
||||
# Logic class
|
||||
from .site import title_search, run_get_select_title, media_search_manager
|
||||
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
|
||||
indice = 8
|
||||
@ -24,7 +21,7 @@ _useFor = "film_serie"
|
||||
_deprecate = False
|
||||
_priority = 2
|
||||
_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):
|
||||
@ -32,23 +29,24 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||
Main function of the application for film and series.
|
||||
"""
|
||||
if TELEGRAM_BOT:
|
||||
bot = get_bot_instance()
|
||||
bot = get_bot_instance()
|
||||
|
||||
# Chiedi la scelta all'utente con il bot Telegram
|
||||
string_to_search = bot.ask(
|
||||
"key_search",
|
||||
f"Inserisci la parola da cercare\noppure 🔙 back per tornare alla scelta: ",
|
||||
None
|
||||
)
|
||||
# Chiedi la scelta all'utente con il bot Telegram
|
||||
string_to_search = bot.ask(
|
||||
"key_search",
|
||||
f"Inserisci la parola da cercare\noppure 🔙 back per tornare alla scelta: ",
|
||||
None
|
||||
)
|
||||
|
||||
if string_to_search == 'back':
|
||||
# Riavvia lo script
|
||||
# Chiude il processo attuale e avvia una nuova istanza dello script
|
||||
subprocess.Popen([sys.executable] + sys.argv)
|
||||
sys.exit()
|
||||
if string_to_search == 'back':
|
||||
# Riavvia lo script
|
||||
# Chiude il processo attuale e avvia una nuova istanza dello script
|
||||
subprocess.Popen([sys.executable] + sys.argv)
|
||||
sys.exit()
|
||||
|
||||
else:
|
||||
if string_to_search is None:
|
||||
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
||||
if string_to_search is None:
|
||||
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
||||
|
||||
# Search on database
|
||||
len_database = title_search(quote_plus(string_to_search))
|
||||
@ -69,4 +67,4 @@ def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||
console.print(f"\n[red]Nothing matching was found for[white]: [purple]{string_to_search}")
|
||||
|
||||
# Retry
|
||||
search()
|
||||
search()
|
@ -12,4 +12,6 @@ ROOT_PATH = config_manager.get('DEFAULT', 'root_path')
|
||||
DOMAIN_NOW = config_manager.get_dict('SITE', SITE_NAME)['domain']
|
||||
|
||||
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
|
||||
|
||||
import sys
|
||||
import subprocess
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.HelpTg.telegram_bot import get_bot_instance
|
||||
|
||||
|
||||
# Logic class
|
||||
from .site import title_search, run_get_select_title, media_search_manager
|
||||
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
|
||||
indice = 2
|
||||
@ -22,33 +21,34 @@ _useFor = "film"
|
||||
_deprecate = False
|
||||
_priority = 2
|
||||
_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):
|
||||
"""
|
||||
Main function of the application for film and series.
|
||||
"""
|
||||
|
||||
if TELEGRAM_BOT:
|
||||
bot = get_bot_instance()
|
||||
|
||||
if string_to_search is None:
|
||||
# Chiedi la scelta all'utente con il bot Telegram
|
||||
string_to_search = bot.ask(
|
||||
"key_search",
|
||||
f"Inserisci la parola da cercare\noppure 🔙 back per tornare alla scelta: ",
|
||||
None
|
||||
)
|
||||
|
||||
# Chiedi la scelta all'utente con il bot Telegram
|
||||
string_to_search = bot.ask(
|
||||
"key_search",
|
||||
f"Inserisci la parola da cercare\noppure 🔙 back per tornare alla scelta: ",
|
||||
None
|
||||
)
|
||||
|
||||
if string_to_search == 'back':
|
||||
# Riavvia lo script
|
||||
# Chiude il processo attuale e avvia una nuova istanza dello script
|
||||
subprocess.Popen([sys.executable] + sys.argv)
|
||||
sys.exit()
|
||||
|
||||
if string_to_search == 'back':
|
||||
# Riavvia lo script
|
||||
# Chiude il processo attuale e avvia una nuova istanza dello script
|
||||
subprocess.Popen([sys.executable] + sys.argv)
|
||||
sys.exit()
|
||||
else:
|
||||
if string_to_search is None:
|
||||
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
||||
if string_to_search is None:
|
||||
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
||||
|
||||
# Search on database
|
||||
len_database = title_search(quote_plus(string_to_search))
|
||||
|
@ -16,4 +16,6 @@ MOVIE_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'movie_fold
|
||||
|
||||
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'))
|
||||
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
|
||||
|
||||
import sys
|
||||
import subprocess
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.HelpTg.telegram_bot import get_bot_instance
|
||||
|
||||
|
||||
# Logic class
|
||||
from .site import title_search, run_get_select_title, media_search_manager
|
||||
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
|
||||
indice = 1
|
||||
@ -25,30 +21,31 @@ _useFor = "anime"
|
||||
_deprecate = False
|
||||
_priority = 2
|
||||
_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):
|
||||
|
||||
if TELEGRAM_BOT:
|
||||
bot = get_bot_instance()
|
||||
bot = get_bot_instance()
|
||||
|
||||
if string_to_search is None:
|
||||
# Chiedi la scelta all'utente con il bot Telegram
|
||||
string_to_search = bot.ask(
|
||||
"key_search",
|
||||
f"Inserisci la parola da cercare\noppure 🔙 back per tornare alla scelta: ",
|
||||
None
|
||||
)
|
||||
if string_to_search is None:
|
||||
# Chiedi la scelta all'utente con il bot Telegram
|
||||
string_to_search = bot.ask(
|
||||
"key_search",
|
||||
f"Inserisci la parola da cercare\noppure 🔙 back per tornare alla scelta: ",
|
||||
None
|
||||
)
|
||||
|
||||
if string_to_search == 'back':
|
||||
# Riavvia lo script
|
||||
# Chiude il processo attuale e avvia una nuova istanza dello script
|
||||
subprocess.Popen([sys.executable] + sys.argv)
|
||||
sys.exit()
|
||||
|
||||
if string_to_search == 'back':
|
||||
# Riavvia lo script
|
||||
# Chiude il processo attuale e avvia una nuova istanza dello script
|
||||
subprocess.Popen([sys.executable] + sys.argv)
|
||||
sys.exit()
|
||||
else:
|
||||
if string_to_search is None:
|
||||
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
||||
if string_to_search is None:
|
||||
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
||||
|
||||
# Search on database
|
||||
len_database = title_search(string_to_search)
|
||||
|
@ -16,4 +16,6 @@ ANIME_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'anime_fold
|
||||
|
||||
if config_manager.get_bool("DEFAULT", "add_siteName"):
|
||||
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
|
||||
|
||||
from urllib.parse import quote_plus
|
||||
import subprocess
|
||||
import sys
|
||||
import subprocess
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.HelpTg.telegram_bot import get_bot_instance
|
||||
|
||||
|
||||
# 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 .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
|
||||
indice = 0
|
||||
@ -24,30 +22,30 @@ _useFor = "film_serie"
|
||||
_deprecate = False
|
||||
_priority = 1
|
||||
_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):
|
||||
"""
|
||||
Main function of the application for film and series.
|
||||
"""
|
||||
|
||||
if TELEGRAM_BOT:
|
||||
bot = get_bot_instance()
|
||||
bot = get_bot_instance()
|
||||
|
||||
if string_to_search is None:
|
||||
# Chiedi la scelta all'utente con il bot Telegram
|
||||
string_to_search = bot.ask(
|
||||
"key_search",
|
||||
f"Inserisci la parola da cercare\noppure 🔙 back per tornare alla scelta: ",
|
||||
None
|
||||
)
|
||||
if string_to_search is None:
|
||||
# Chiedi la scelta all'utente con il bot Telegram
|
||||
string_to_search = bot.ask(
|
||||
"key_search",
|
||||
f"Inserisci la parola da cercare\noppure 🔙 back per tornare alla scelta: ",
|
||||
None
|
||||
)
|
||||
|
||||
if string_to_search == 'back':
|
||||
# Riavvia lo script
|
||||
# Chiude il processo attuale e avvia una nuova istanza dello script
|
||||
subprocess.Popen([sys.executable] + sys.argv)
|
||||
sys.exit()
|
||||
if string_to_search == 'back':
|
||||
# Riavvia lo script
|
||||
# Chiude il processo attuale e avvia una nuova istanza dello script
|
||||
subprocess.Popen([sys.executable] + sys.argv)
|
||||
sys.exit()
|
||||
|
||||
else:
|
||||
if string_to_search is None:
|
||||
string_to_search = msg.ask(f"\n[purple]Insert word to search in [green]{SITE_NAME}").strip()
|
||||
|
@ -16,4 +16,6 @@ MOVIE_FOLDER = os.path.join(ROOT_PATH, config_manager.get('DEFAULT', 'movie_fold
|
||||
|
||||
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'))
|
||||
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,
|
||||
"show_message": false,
|
||||
"clean_console": true,
|
||||
"root_path": "/home/giuseppepiccolo/Develop/docker/jellyfin/media/",
|
||||
"root_path": "Video",
|
||||
"movie_folder_name": "Movie",
|
||||
"serie_folder_name": "Serie",
|
||||
"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": {
|
||||
"host": "192.168.5.172",
|
||||
"host": "192.168.5.99",
|
||||
"port": "8080",
|
||||
"user": "admin",
|
||||
"pass": "adminadmin"
|
||||
@ -19,23 +19,23 @@
|
||||
"add_siteName": false,
|
||||
"disable_searchDomain": false,
|
||||
"not_close": false,
|
||||
"telegram_bot": true
|
||||
"telegram_bot": false
|
||||
},
|
||||
"REQUESTS": {
|
||||
"timeout": 30,
|
||||
"timeout": 20,
|
||||
"max_retry": 8,
|
||||
"proxy_start_min": 0.1,
|
||||
"proxy_start_max": 0.5
|
||||
},
|
||||
"M3U8_DOWNLOAD": {
|
||||
"tqdm_delay": 0.12,
|
||||
"tqdm_delay": 0.15,
|
||||
"default_video_workser": 12,
|
||||
"default_audio_workser": 12,
|
||||
"merge_audio": true,
|
||||
"specific_list_audio": [
|
||||
"ita"
|
||||
],
|
||||
"merge_subs": false,
|
||||
"merge_subs": true,
|
||||
"specific_list_subtitles": [
|
||||
"eng",
|
||||
"spa"
|
||||
@ -79,7 +79,7 @@
|
||||
"domain": "so"
|
||||
},
|
||||
"cb01new": {
|
||||
"domain": "mobi"
|
||||
"domain": "media"
|
||||
},
|
||||
"1337xx": {
|
||||
"domain": "to"
|
||||
|
@ -11,6 +11,6 @@ pycryptodomex
|
||||
googlesearch-python
|
||||
fake-useragent
|
||||
qbittorrent-api
|
||||
python-qbittorrent
|
||||
pyTelegramBotAPI
|
||||
Pillow
|
||||
python-qbittorrent
|
||||
Pillow
|
||||
pyTelegramBotAPI
|
@ -11,5 +11,4 @@ request_manager.clear_file()
|
||||
script_id = sys.argv[1] if len(sys.argv) > 1 else "unknown"
|
||||
|
||||
set_session(script_id)
|
||||
|
||||
main(script_id)
|
Loading…
x
Reference in New Issue
Block a user