mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-07-20 09:00:01 +00:00
Fix requirements
This commit is contained in:
parent
3b01dcaf65
commit
6ede093624
@ -506,7 +506,6 @@ class HLS_Downloader:
|
||||
file_size = internet_manager.format_file_size(os.path.getsize(self.path_manager.output_path))
|
||||
duration = print_duration_table(self.path_manager.output_path, description=False, return_string=True)
|
||||
|
||||
print()
|
||||
panel_content = (
|
||||
f"[cyan]File size: [bold red]{file_size}[/bold red]\n"
|
||||
f"[cyan]Duration: [bold]{duration}[/bold]\n"
|
||||
|
@ -391,8 +391,7 @@ class M3U8_Segments:
|
||||
f"{Colors.YELLOW}[HLS] {Colors.WHITE}({Colors.CYAN}{description}{Colors.WHITE}): "
|
||||
f"{Colors.RED}{{percentage:.2f}}% "
|
||||
f"{Colors.MAGENTA}{{bar}} "
|
||||
f"{Colors.WHITE}[ {Colors.YELLOW}{{n_fmt}}{Colors.WHITE} / {Colors.RED}{{total_fmt}} {Colors.WHITE}] "
|
||||
f"{Colors.YELLOW}{{elapsed}} {Colors.WHITE}< {Colors.CYAN}{{remaining}}{{postfix}} {Colors.WHITE}]"
|
||||
f"{Colors.WHITE}[ {Colors.YELLOW}{{elapsed}}{Colors.WHITE} < {Colors.CYAN}{{remaining}}{Colors.WHITE}{{postfix}}{Colors.WHITE} ]"
|
||||
)
|
||||
|
||||
def _get_worker_count(self, stream_type: str) -> int:
|
||||
|
@ -106,12 +106,12 @@ class M3U8_Ts_Estimator:
|
||||
try:
|
||||
self.add_ts_file(total_downloaded * self.total_segments, total_downloaded, duration)
|
||||
|
||||
downloaded_file_size_str = internet_manager.format_file_size(self.now_downloaded_size)
|
||||
#downloaded_file_size_str = internet_manager.format_file_size(self.now_downloaded_size)
|
||||
file_total_size = self.calculate_total_size()
|
||||
|
||||
number_file_downloaded = downloaded_file_size_str.split(' ')[0]
|
||||
#number_file_downloaded = downloaded_file_size_str.split(' ')[0]
|
||||
number_file_total_size = file_total_size.split(' ')[0]
|
||||
units_file_downloaded = downloaded_file_size_str.split(' ')[1]
|
||||
#units_file_downloaded = downloaded_file_size_str.split(' ')[1]
|
||||
units_file_total_size = file_total_size.split(' ')[1]
|
||||
|
||||
if USE_LARGE_BAR:
|
||||
@ -124,19 +124,17 @@ class M3U8_Ts_Estimator:
|
||||
average_internet_speed = "N/A"
|
||||
average_internet_unit = ""
|
||||
|
||||
# Retrieve retry count from segments_instance
|
||||
retry_count = self.segments_instance.active_retries if self.segments_instance else 0
|
||||
progress_str = (
|
||||
f"{Colors.WHITE}[ {Colors.GREEN}{number_file_downloaded} {Colors.WHITE}< "
|
||||
#f"{Colors.WHITE}[ {Colors.GREEN}{number_file_downloaded} {Colors.WHITE}< "
|
||||
f"{Colors.GREEN}{number_file_total_size} {Colors.RED}{units_file_total_size} "
|
||||
f"{Colors.WHITE}| {Colors.CYAN}{average_internet_speed} {Colors.RED}{average_internet_unit} "
|
||||
f"{Colors.WHITE}| {Colors.GREEN}CRR {Colors.RED}{retry_count}"
|
||||
)
|
||||
else:
|
||||
# Retrieve retry count from segments_instance
|
||||
retry_count = self.segments_instance.active_retries if self.segments_instance else 0
|
||||
progress_str = (
|
||||
f"{Colors.WHITE}[ {Colors.GREEN}{number_file_downloaded} {Colors.WHITE}< "
|
||||
#f"{Colors.WHITE}[ {Colors.GREEN}{number_file_downloaded} {Colors.WHITE}< "
|
||||
f"{Colors.GREEN}{number_file_total_size} {Colors.RED}{units_file_total_size} "
|
||||
f"{Colors.WHITE}| {Colors.GREEN}CRR {Colors.RED}{retry_count}"
|
||||
)
|
||||
|
@ -461,7 +461,7 @@ class OsSummary:
|
||||
optional_libraries = [line.strip().split("=")[0] for line in open(requirements_file, 'r', encoding='utf-8-sig')]
|
||||
|
||||
for lib in optional_libraries:
|
||||
installed_version = self.get_library_version(lib)
|
||||
installed_version = self.get_library_version(lib.split("<")[0])
|
||||
if 'not installed' in installed_version:
|
||||
user_response = msg.ask(f"{lib} is not installed. Do you want to install it? (yes/no)", default="y")
|
||||
if user_response.lower().strip() in ["yes", "y"]:
|
||||
|
@ -178,7 +178,7 @@ def force_exit():
|
||||
os._exit(0)
|
||||
|
||||
|
||||
def main(script_id):
|
||||
def main(script_id = 0):
|
||||
|
||||
if TELEGRAM_BOT:
|
||||
bot = get_bot_instance()
|
||||
|
2
setup.py
2
setup.py
@ -10,7 +10,7 @@ with open("requirements.txt", "r", encoding="utf-8-sig") as f:
|
||||
|
||||
setup(
|
||||
name="StreamingCommunity",
|
||||
version="2.5.6",
|
||||
version="2.5.7",
|
||||
long_description=read_readme(),
|
||||
long_description_content_type="text/markdown",
|
||||
author="Lovi-0",
|
||||
|
@ -18,4 +18,4 @@ if TELEGRAM_BOT:
|
||||
main(script_id)
|
||||
|
||||
else:
|
||||
main(0)
|
||||
main()
|
Loading…
x
Reference in New Issue
Block a user