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