mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-06 11:35:29 +00:00
[UTIL] Remove "console.py"
This commit is contained in:
parent
39f5435318
commit
da7f3fdbbd
@ -8,11 +8,11 @@ from urllib.parse import urlparse, parse_qs, urlencode, urlunparse
|
||||
# External libraries
|
||||
import httpx
|
||||
from bs4 import BeautifulSoup
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.headers import get_userAgent
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from .Helper.Vixcloud.util import WindowVideo, WindowParameter, StreamsCollection
|
||||
from .Helper.Vixcloud.js_parser import JavaScriptParser
|
||||
@ -20,6 +20,7 @@ from .Helper.Vixcloud.js_parser import JavaScriptParser
|
||||
|
||||
# Variable
|
||||
MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
|
||||
console = Console()
|
||||
|
||||
|
||||
class VideoSource:
|
||||
|
@ -3,8 +3,12 @@
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.Api.Template import get_select_title
|
||||
|
||||
|
||||
@ -21,6 +25,9 @@ _deprecate = False
|
||||
_priority = 2
|
||||
_engineDownload = "tor"
|
||||
|
||||
console = Console()
|
||||
msg = Prompt()
|
||||
|
||||
|
||||
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||
"""
|
||||
|
@ -5,10 +5,10 @@ import sys
|
||||
# External libraries
|
||||
import httpx
|
||||
from bs4 import BeautifulSoup
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.headers import get_userAgent
|
||||
from StreamingCommunity.Util.table import TVShowManager
|
||||
@ -21,6 +21,7 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
media_search_manager = MediaManager()
|
||||
table_show_manager = TVShowManager()
|
||||
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
||||
|
@ -6,10 +6,10 @@ import os
|
||||
# External libraries
|
||||
import httpx
|
||||
from bs4 import BeautifulSoup
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util.os import os_manager
|
||||
from StreamingCommunity.Util.message import start_message
|
||||
from StreamingCommunity.Util.headers import get_userAgent
|
||||
@ -21,6 +21,9 @@ from StreamingCommunity.Api.Template.config_loader import site_constant
|
||||
from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
|
||||
|
||||
def download_title(select_title: MediaItem):
|
||||
"""
|
||||
|
@ -4,8 +4,12 @@ import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.Api.Template import get_select_title
|
||||
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
|
||||
|
||||
@ -23,6 +27,9 @@ _deprecate = False
|
||||
_priority = 2
|
||||
_engineDownload = "mp4"
|
||||
|
||||
msg = Prompt()
|
||||
console = Console()
|
||||
|
||||
|
||||
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||
|
||||
|
@ -5,8 +5,12 @@ import logging
|
||||
from typing import Tuple
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.Util.os import os_manager
|
||||
from StreamingCommunity.Util.message import start_message
|
||||
from StreamingCommunity.Lib.Downloader import MP4_downloader
|
||||
@ -25,6 +29,8 @@ from StreamingCommunity.Api.Player.vixcloud import VideoSourceAnime
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
msg = Prompt()
|
||||
KILL_HANDLER = bool(False)
|
||||
|
||||
|
||||
|
@ -7,10 +7,10 @@ import logging
|
||||
# External libraries
|
||||
import httpx
|
||||
from bs4 import BeautifulSoup
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.table import TVShowManager
|
||||
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
|
||||
@ -23,6 +23,7 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
media_search_manager = MediaManager()
|
||||
table_show_manager = TVShowManager()
|
||||
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
||||
|
@ -3,8 +3,12 @@
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.Api.Template import get_select_title
|
||||
|
||||
|
||||
@ -21,6 +25,9 @@ _deprecate = False
|
||||
_priority = 2
|
||||
_engineDownload = "mp4"
|
||||
|
||||
msg = Prompt()
|
||||
console = Console()
|
||||
|
||||
|
||||
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||
"""
|
||||
|
@ -3,8 +3,11 @@
|
||||
import os
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util.os import os_manager
|
||||
from StreamingCommunity.Util.message import start_message
|
||||
from StreamingCommunity.Lib.Downloader import HLS_Downloader
|
||||
@ -19,6 +22,9 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
||||
from StreamingCommunity.Api.Player.maxstream import VideoSource
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
|
||||
|
||||
def download_film(select_title: MediaItem) -> str:
|
||||
"""
|
||||
|
@ -2,13 +2,14 @@
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
# External libraries
|
||||
import httpx
|
||||
from bs4 import BeautifulSoup
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.headers import get_userAgent
|
||||
from StreamingCommunity.Util.table import TVShowManager
|
||||
@ -21,6 +22,7 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
media_search_manager = MediaManager()
|
||||
table_show_manager = TVShowManager()
|
||||
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
||||
|
@ -4,13 +4,17 @@ import logging
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.Api.Template import get_select_title
|
||||
from StreamingCommunity.Api.Template.config_loader import site_constant
|
||||
|
||||
|
||||
# Logic class
|
||||
from StreamingCommunity.Api.Template.config_loader import site_constant
|
||||
from .site import title_search, media_search_manager, table_show_manager
|
||||
from .series import download_thread
|
||||
|
||||
@ -22,6 +26,9 @@ _deprecate = False
|
||||
_priority = 2
|
||||
_engineDownload = "mp4"
|
||||
|
||||
msg = Prompt()
|
||||
console = Console()
|
||||
|
||||
|
||||
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||
"""
|
||||
|
@ -5,8 +5,11 @@ from urllib.parse import urlparse
|
||||
from typing import Tuple
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util.message import start_message
|
||||
from StreamingCommunity.Util.os import os_manager
|
||||
from StreamingCommunity.Lib.Downloader import MP4_downloader
|
||||
@ -28,6 +31,9 @@ from .util.ScrapeSerie import GetSerieInfo
|
||||
from StreamingCommunity.Api.Player.ddl import VideoSource
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
|
||||
|
||||
def download_video(index_episode_selected: int, scape_info_serie: GetSerieInfo, video_source: VideoSource) -> Tuple[str,bool]:
|
||||
"""
|
||||
|
@ -7,10 +7,10 @@ import logging
|
||||
# External libraries
|
||||
import httpx
|
||||
from bs4 import BeautifulSoup
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.headers import get_userAgent
|
||||
from StreamingCommunity.Util.table import TVShowManager
|
||||
@ -23,6 +23,7 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
media_search_manager = MediaManager()
|
||||
table_show_manager = TVShowManager()
|
||||
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
||||
|
@ -3,13 +3,17 @@
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.Api.Template import get_select_title
|
||||
from StreamingCommunity.Api.Template.config_loader import site_constant
|
||||
|
||||
|
||||
# Logic class
|
||||
from StreamingCommunity.Api.Template.config_loader import site_constant
|
||||
from .site import title_search, media_search_manager, table_show_manager
|
||||
from .series import download_series
|
||||
|
||||
@ -21,6 +25,9 @@ _deprecate = False
|
||||
_priority = 2
|
||||
_engineDownload = "hls"
|
||||
|
||||
msg = Prompt()
|
||||
console = Console()
|
||||
|
||||
|
||||
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||
"""
|
||||
|
@ -4,8 +4,12 @@ import os
|
||||
from typing import Tuple
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.Util.message import start_message
|
||||
from StreamingCommunity.Lib.Downloader import HLS_Downloader
|
||||
|
||||
@ -28,6 +32,10 @@ from .util.ScrapeSerie import GetSerieInfo
|
||||
from StreamingCommunity.Api.Player.supervideo import VideoSource
|
||||
|
||||
|
||||
# Variable
|
||||
msg = Prompt()
|
||||
console = Console()
|
||||
|
||||
|
||||
def download_video(index_season_selected: int, index_episode_selected: int, scape_info_serie: GetSerieInfo) -> Tuple[str,bool]:
|
||||
"""
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
# External libraries
|
||||
import httpx
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.headers import get_userAgent
|
||||
from StreamingCommunity.Util.table import TVShowManager
|
||||
@ -21,11 +21,13 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
media_search_manager = MediaManager()
|
||||
table_show_manager = TVShowManager()
|
||||
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
||||
|
||||
|
||||
|
||||
def title_search(word_to_search: str) -> int:
|
||||
"""
|
||||
Search for titles based on a search query.
|
||||
|
@ -3,8 +3,9 @@
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
# External library
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt, Confirm
|
||||
|
||||
|
||||
# Logic class
|
||||
@ -20,6 +21,9 @@ _deprecate = False
|
||||
_priority = 2
|
||||
_engineDownload = "hls"
|
||||
|
||||
msg = Prompt()
|
||||
console = Console()
|
||||
|
||||
|
||||
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||
"""
|
||||
|
@ -7,10 +7,10 @@ import logging
|
||||
# External libraries
|
||||
import httpx
|
||||
from bs4 import BeautifulSoup
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util.os import os_manager
|
||||
from StreamingCommunity.Util.message import start_message
|
||||
from StreamingCommunity.Util.headers import get_userAgent
|
||||
@ -27,6 +27,10 @@ from StreamingCommunity.Api.Template.config_loader import site_constant
|
||||
from StreamingCommunity.Lib.TMBD import Json_film
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
|
||||
|
||||
def download_film(movie_details: Json_film) -> str:
|
||||
"""
|
||||
Downloads a film using the provided tmbd id.
|
||||
|
@ -5,8 +5,12 @@ import subprocess
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.Api.Template import get_select_title
|
||||
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
|
||||
|
||||
@ -25,6 +29,9 @@ _deprecate = False
|
||||
_priority = 1
|
||||
_engineDownload = "hls"
|
||||
|
||||
msg = Prompt()
|
||||
console = Console()
|
||||
|
||||
|
||||
def search(string_to_search: str = None, get_onylDatabase: bool = False):
|
||||
"""
|
||||
|
@ -3,8 +3,11 @@
|
||||
import os
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util.os import os_manager
|
||||
from StreamingCommunity.Util.message import start_message
|
||||
from StreamingCommunity.Lib.Downloader import HLS_Downloader
|
||||
@ -20,6 +23,10 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
||||
from StreamingCommunity.Api.Player.vixcloud import VideoSource
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
|
||||
|
||||
def download_film(select_title: MediaItem) -> str:
|
||||
"""
|
||||
Downloads a film using the provided film ID, title name, and domain.
|
||||
|
@ -4,8 +4,12 @@ import os
|
||||
from typing import Tuple
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt, Confirm
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.Util.message import start_message
|
||||
from StreamingCommunity.Lib.Downloader import HLS_Downloader
|
||||
from StreamingCommunity.TelegramHelp.telegram_bot import TelegramSession, get_bot_instance
|
||||
@ -28,6 +32,11 @@ from StreamingCommunity.Api.Template.Class.SearchType import MediaItem
|
||||
from StreamingCommunity.Api.Player.vixcloud import VideoSource
|
||||
|
||||
|
||||
# Variable
|
||||
msg = Prompt()
|
||||
console = Console()
|
||||
|
||||
|
||||
def download_video(index_season_selected: int, index_episode_selected: int, scrape_serie: ScrapeSerie, video_source: VideoSource) -> Tuple[str,bool]:
|
||||
"""
|
||||
Download a single episode video.
|
||||
|
@ -5,10 +5,10 @@ import sys
|
||||
|
||||
# External libraries
|
||||
import httpx
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.headers import get_userAgent
|
||||
from StreamingCommunity.Util.table import TVShowManager
|
||||
@ -21,8 +21,8 @@ from StreamingCommunity.Api.Template.Util import search_domain
|
||||
from StreamingCommunity.Api.Template.Class.SearchType import MediaManager
|
||||
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
media_search_manager = MediaManager()
|
||||
table_show_manager = TVShowManager()
|
||||
max_timeout = config_manager.get_int("REQUESTS", "timeout")
|
||||
|
@ -7,15 +7,16 @@ from urllib.parse import urlparse, unquote
|
||||
|
||||
# External libraries
|
||||
import httpx
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.headers import get_headers
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
VERIFY = config_manager.get("REQUESTS", "verify")
|
||||
|
||||
|
||||
|
@ -5,14 +5,20 @@ import logging
|
||||
from typing import List
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.Util.os import os_manager
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.table import TVShowManager
|
||||
|
||||
|
||||
# Config
|
||||
# Variable
|
||||
msg = Prompt()
|
||||
console = Console()
|
||||
MAP_EPISODE = config_manager.get('OUT_FOLDER', 'map_episode_name')
|
||||
|
||||
|
||||
|
@ -3,11 +3,12 @@
|
||||
import sys
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
# External library
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
available_colors = ['red', 'magenta', 'yellow', 'cyan', 'green', 'blue', 'white']
|
||||
column_to_hide = ['Slug', 'Sub_ita', 'Last_air_date', 'Seasons_count', 'Url']
|
||||
|
||||
|
@ -10,17 +10,14 @@ from typing import Any, Dict, List, Optional
|
||||
|
||||
# External libraries
|
||||
import httpx
|
||||
from rich.console import Console
|
||||
from rich.panel import Panel
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.headers import get_userAgent
|
||||
from StreamingCommunity.Util.console import console, Panel
|
||||
from StreamingCommunity.Util.os import (
|
||||
compute_sha1_hash,
|
||||
os_manager,
|
||||
internet_manager
|
||||
)
|
||||
from StreamingCommunity.Util.os import compute_sha1_hash, os_manager, internet_manager
|
||||
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
|
||||
|
||||
|
||||
@ -49,6 +46,7 @@ RETRY_LIMIT = config_manager.get_int('REQUESTS', 'max_retry')
|
||||
MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
|
||||
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
||||
|
||||
console = Console()
|
||||
|
||||
|
||||
class HLSClient:
|
||||
|
@ -17,11 +17,11 @@ from typing import Dict
|
||||
# External libraries
|
||||
import httpx
|
||||
from tqdm import tqdm
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.color import Colors
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util.headers import get_userAgent
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.os import os_manager
|
||||
@ -48,6 +48,9 @@ SEGMENT_MAX_TIMEOUT = config_manager.get_int("M3U8_DOWNLOAD", "segment_timeout")
|
||||
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
|
||||
|
||||
class M3U8_Segments:
|
||||
def __init__(self, url: str, tmp_folder: str, is_index_url: bool = True):
|
||||
|
@ -12,12 +12,14 @@ from functools import partial
|
||||
# External libraries
|
||||
import httpx
|
||||
from tqdm import tqdm
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt
|
||||
from rich.panel import Panel
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.headers import get_userAgent
|
||||
from StreamingCommunity.Util.color import Colors
|
||||
from StreamingCommunity.Util.console import console, Panel
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.os import internet_manager
|
||||
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance
|
||||
@ -34,6 +36,10 @@ REQUEST_TIMEOUT = config_manager.get_float('REQUESTS', 'timeout')
|
||||
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
||||
|
||||
|
||||
# Variable
|
||||
msg = Prompt()
|
||||
console = Console()
|
||||
|
||||
|
||||
class InterruptHandler:
|
||||
def __init__(self):
|
||||
|
@ -9,10 +9,13 @@ import psutil
|
||||
import logging
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.color import Colors
|
||||
from StreamingCommunity.Util.os import internet_manager
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
|
||||
|
||||
@ -28,10 +31,10 @@ USERNAME = config_manager.get_dict('QBIT_CONFIG', 'user')
|
||||
PASSWORD = config_manager.get_dict('QBIT_CONFIG', 'pass')
|
||||
|
||||
|
||||
# Config
|
||||
# Variable
|
||||
USE_LARGE_BAR = not ("android" in sys.platform or "ios" in sys.platform)
|
||||
REQUEST_TIMEOUT = config_manager.get_float('REQUESTS', 'timeout')
|
||||
|
||||
console = Console()
|
||||
|
||||
|
||||
class TOR_downloader:
|
||||
|
@ -6,12 +6,16 @@ import threading
|
||||
import subprocess
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util.os import internet_manager
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
terminate_flag = threading.Event()
|
||||
|
||||
|
||||
|
@ -6,10 +6,13 @@ import subprocess
|
||||
from typing import List, Dict, Tuple, Optional
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.os import os_manager, os_summary, suppress_output
|
||||
from StreamingCommunity.Util.console import console
|
||||
|
||||
|
||||
# Logic class
|
||||
@ -32,7 +35,7 @@ FFMPEG_DEFAULT_PRESET = config_manager.get("M3U8_CONVERSION", "default_preset")
|
||||
# Variable
|
||||
USE_LARGE_BAR = not ("android" in sys.platform or "ios" in sys.platform)
|
||||
FFMPEG_PATH = os_summary.ffmpeg_path
|
||||
|
||||
console = Console()
|
||||
|
||||
|
||||
def check_subtitle_encoders() -> Tuple[Optional[bool], Optional[bool]]:
|
||||
|
@ -8,14 +8,17 @@ import logging
|
||||
from typing import Tuple
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util.os import os_summary
|
||||
|
||||
|
||||
# Variable
|
||||
FFPROB_PATH = os_summary.ffprobe_path
|
||||
|
||||
console = Console()
|
||||
|
||||
|
||||
def has_audio_stream(video_path: str) -> bool:
|
||||
|
@ -6,11 +6,12 @@ import logging
|
||||
import importlib.util
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
# External library
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Check if Cryptodome module is installed
|
||||
console = Console()
|
||||
crypto_spec = importlib.util.find_spec("Cryptodome")
|
||||
crypto_installed = crypto_spec is not None
|
||||
|
||||
|
@ -6,22 +6,22 @@ from typing import Dict
|
||||
|
||||
# External libraries
|
||||
import httpx
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from .obj_tmbd import Json_film
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.table import TVShowManager
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
table_show_manager = TVShowManager()
|
||||
api_key = "a800ed6c93274fb857ea61bd9e7256c5"
|
||||
MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
|
||||
|
||||
|
||||
|
||||
def get_select_title(table_show_manager, generic_obj):
|
||||
"""
|
||||
Display a selection of titles and prompt the user to choose one.
|
||||
|
@ -7,11 +7,11 @@ import time
|
||||
|
||||
# External library
|
||||
import httpx
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from .version import __version__, __author__, __title__
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.headers import get_userAgent
|
||||
|
||||
@ -22,6 +22,7 @@ if getattr(sys, 'frozen', False): # Modalità PyInstaller
|
||||
base_path = os.path.join(sys._MEIPASS, "StreamingCommunity")
|
||||
else:
|
||||
base_path = os.path.dirname(__file__)
|
||||
console = Console()
|
||||
|
||||
|
||||
def update():
|
||||
|
@ -1,12 +0,0 @@
|
||||
# 24.02.24
|
||||
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt, Confirm
|
||||
from rich.panel import Panel
|
||||
from rich.table import Table
|
||||
from rich.text import Text
|
||||
|
||||
|
||||
# Variable
|
||||
msg = Prompt()
|
||||
console = Console()
|
@ -3,12 +3,17 @@
|
||||
import os
|
||||
import platform
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.console import console
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
CLEAN = config_manager.get_bool('DEFAULT', 'clean_console')
|
||||
SHOW = config_manager.get_bool('DEFAULT', 'show_message')
|
||||
|
||||
|
@ -18,14 +18,19 @@ from pathlib import Path
|
||||
# External library
|
||||
import httpx
|
||||
from unidecode import unidecode
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt
|
||||
from pathvalidate import sanitize_filename, sanitize_filepath
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from .ffmpeg_installer import check_ffmpeg
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
|
||||
|
||||
# Variable
|
||||
msg = Prompt()
|
||||
console = Console()
|
||||
|
||||
|
||||
class OsManager:
|
||||
def __init__(self):
|
||||
|
@ -12,17 +12,18 @@ import threading, asyncio
|
||||
from typing import Callable
|
||||
|
||||
|
||||
# External library
|
||||
from rich.console import Console
|
||||
from rich.prompt import Prompt
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from StreamingCommunity.Util.message import start_message
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
from StreamingCommunity.Util.os import os_summary
|
||||
from StreamingCommunity.Util.logger import Logger
|
||||
from StreamingCommunity.Upload.update import update as git_update
|
||||
from StreamingCommunity.Lib.TMBD import tmdb
|
||||
|
||||
|
||||
# Telegram util
|
||||
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance, TelegramSession
|
||||
|
||||
|
||||
@ -32,6 +33,10 @@ CLOSE_CONSOLE = config_manager.get_bool('DEFAULT', 'not_close')
|
||||
TELEGRAM_BOT = config_manager.get_bool('DEFAULT', 'telegram_bot')
|
||||
|
||||
|
||||
# Variable
|
||||
console = Console()
|
||||
msg = Prompt()
|
||||
|
||||
|
||||
def run_function(func: Callable[..., None], close_console: bool = False, search_terms: str = None) -> None:
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user