Update readme (#248)

This commit is contained in:
Dark1291 2025-02-05 15:00:55 +01:00 committed by GitHub
parent d5fe421d32
commit 4edb6d6e5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 40 additions and 37 deletions

View File

@ -1,3 +1,6 @@
<p align="center">
<img src="https://i.ibb.co/xtkv1JQk/ss1.png" alt="Project Logo" width="700"/>
</p>
<p align="center">
<a href="https://pypi.org/project/streamingcommunity">
@ -6,23 +9,23 @@
<a href="https://www.paypal.com/donate/?hosted_button_id=UXTWMT8P6HE2C">
<img src="https://img.shields.io/badge/_-Donate-red.svg?logo=githubsponsors&labelColor=555555&style=for-the-badge" alt="Donate"/>
</a>
<a href="https://github.com/Abc-dc/StreamingCommunity/commits">
<img src="https://img.shields.io/github/commit-activity/m/Abc-dc/StreamingCommunity?label=commits&style=for-the-badge" alt="Commits"/>
<a href="https://github.com/Arrowar/StreamingCommunity/commits">
<img src="https://img.shields.io/github/commit-activity/m/Arrowar/StreamingCommunity?label=commits&style=for-the-badge" alt="Commits"/>
</a>
<a href="https://github.com/Abc-dc/StreamingCommunity/commits">
<img src="https://img.shields.io/github/last-commit/Abc-dc/StreamingCommunity/main?label=&style=for-the-badge&display_timestamp=committer" alt="Last Commit"/>
<a href="https://github.com/Arrowar/StreamingCommunity/commits">
<img src="https://img.shields.io/github/last-commit/Arrowar/StreamingCommunity/main?label=&style=for-the-badge&display_timestamp=committer" alt="Last Commit"/>
</a>
</p>
<p align="center">
<a href="https://github.com/Abc-dc/StreamingCommunity/blob/main/LICENSE">
<a href="https://github.com/Arrowar/StreamingCommunity/blob/main/LICENSE">
<img src="https://img.shields.io/badge/License-GPL_3.0-blue.svg?style=for-the-badge" alt="License"/>
</a>
<a href="https://pypi.org/project/streamingcommunity">
<img src="https://img.shields.io/pypi/dm/streamingcommunity?style=for-the-badge" alt="PyPI Downloads"/>
</a>
<a href="https://github.com/Abc-dc/StreamingCommunity">
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Abc-dc/StreamingCommunity/main/Test/Util/loc-badge.json&style=for-the-badge" alt="Lines of Code"/>
<a href="https://github.com/Arrowar/StreamingCommunity">
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Arrowar/StreamingCommunity/main/Test/Util/loc-badge.json&style=for-the-badge" alt="Lines of Code"/>
</a>
</p>
@ -55,13 +58,13 @@
# Installation
<p align="center">
<a href="https://github.com/Abc-dc/StreamingCommunity/releases/latest/download/StreamingCommunity.exe">
<a href="https://github.com/Arrowar/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://github.com/Abc-dc/StreamingCommunity/releases/latest/download/StreamingCommunity.zip">
<a href="https://github.com/Arrowar/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>
<a href="https://github.com/Abc-dc/StreamingCommunity/releases">
<a href="https://github.com/Arrowar/StreamingCommunity/releases">
<img src="https://img.shields.io/badge/-All_Versions-lightgrey.svg?style=for-the-badge" alt="All Versions">
</a>
</p>
@ -551,7 +554,7 @@ python3 telegram_bot.py
# To Do
- Finish [website API](https://github.com/Abc-dc/StreamingCommunity/tree/test_gui_1)
- Finish [website API](https://github.com/Arrowar/StreamingCommunity/tree/test_gui_1)
# Contributing
@ -569,6 +572,6 @@ This software is provided "as is", without warranty of any kind, express or impl
## Contributors
<a href="https://github.com/Abc-dc/StreamingCommunity/graphs/contributors" alt="View Contributors">
<img src="https://contrib.rocks/image?repo=Abc-dc/StreamingCommunity&max=1000&columns=10" alt="Contributors" />
<a href="https://github.com/Arrowar/StreamingCommunity/graphs/contributors" alt="View Contributors">
<img src="https://contrib.rocks/image?repo=Arrowar/StreamingCommunity&max=1000&columns=10" alt="Contributors" />
</a>

View File

@ -36,11 +36,13 @@ from .segments import M3U8_Segments
# Config
ENABLE_AUDIO = config_manager.get_bool('M3U8_DOWNLOAD', 'download_audio')
ENABLE_SUBTITLE = config_manager.get_bool('M3U8_DOWNLOAD', 'download_subtitle')
DOWNLOAD_SPECIFIC_AUDIO = config_manager.get_list('M3U8_DOWNLOAD', 'specific_list_audio')
DOWNLOAD_SPECIFIC_SUBTITLE = config_manager.get_list('M3U8_DOWNLOAD', 'specific_list_subtitles')
MERGE_AUDIO = config_manager.get_bool('M3U8_DOWNLOAD', 'merge_audio')
MERGE_SUBTITLE = config_manager.get_bool('M3U8_DOWNLOAD', 'merge_subs')
REMOVE_SEGMENTS_FOLDER = config_manager.get_bool('M3U8_DOWNLOAD', 'cleanup_tmp_folder')
CLEANUP_TMP = config_manager.get_bool('M3U8_DOWNLOAD', 'cleanup_tmp_folder')
FILTER_CUSTOM_REOLUTION = config_manager.get_int('M3U8_PARSER', 'force_resolution')
GET_ONLY_LINK = config_manager.get_bool('M3U8_PARSER', 'get_only_link')
RETRY_LIMIT = config_manager.get_int('REQUESTS', 'max_retry')
@ -121,7 +123,7 @@ class PathManager:
def cleanup(self):
"""Removes temporary directories if configured to do so."""
if REMOVE_SEGMENTS_FOLDER:
if CLEANUP_TMP:
os_manager.remove_folder(self.temp_dir)
@ -157,32 +159,33 @@ class M3U8Manager:
If it's a master playlist, only selects video stream.
"""
if not self.is_master:
# For master playlist, only get the video stream
if FILTER_CUSTOM_REOLUTION != -1:
self.video_url, self.video_res = self.parser._video.get_custom_uri(y_resolution=FILTER_CUSTOM_REOLUTION)
else:
self.video_url, self.video_res = self.parser._video.get_best_uri()
# Don't process audio or subtitles for master playlist
self.audio_streams = []
self.sub_streams = []
else:
# For media playlist, process all streams as before
if FILTER_CUSTOM_REOLUTION != -1:
self.video_url, self.video_res = self.parser._video.get_custom_uri(y_resolution=FILTER_CUSTOM_REOLUTION)
else:
self.video_url, self.video_res = self.parser._video.get_best_uri()
self.audio_streams = [
s for s in (self.parser._audio.get_all_uris_and_names() or [])
if s.get('language') in DOWNLOAD_SPECIFIC_AUDIO
]
self.audio_streams = []
if ENABLE_AUDIO:
self.audio_streams = [
s for s in (self.parser._audio.get_all_uris_and_names() or [])
if s.get('language') in DOWNLOAD_SPECIFIC_AUDIO
]
self.sub_streams = [
s for s in (self.parser._subtitle.get_all_uris_and_names() or [])
if s.get('language') in DOWNLOAD_SPECIFIC_SUBTITLE
]
self.sub_streams = []
if ENABLE_SUBTITLE:
self.sub_streams = [
s for s in (self.parser._subtitle.get_all_uris_and_names() or [])
if s.get('language') in DOWNLOAD_SPECIFIC_SUBTITLE
]
def log_selection(self):
if FILTER_CUSTOM_REOLUTION == -1:

View File

@ -25,9 +25,6 @@ def update():
"""
Check for updates on GitHub and display relevant information.
"""
console.print("\n[cyan]→ [green]Checking GitHub version ...")
# Make the GitHub API requests and handle potential errors
try:
response_reposity = httpx.get(f"https://api.github.com/repos/{__author__}/{__title__}").json()
response_releases = httpx.get(f"https://api.github.com/repos/{__author__}/{__title__}/releases").json()
@ -56,11 +53,9 @@ def update():
# Check installed version
if str(__version__).replace('v', '') != str(last_version).replace('v', '') :
console.print(f"[red]New version available: [yellow]{last_version} \n")
else:
console.print(f" [red]Everything is up to date \n")
console.print(f"\n[red]New version available: [yellow]{last_version}")
console.print(f"[red]{__title__} has been downloaded [yellow]{total_download_count} [red]times, but only [yellow]{percentual_stars}% [red]of users have starred it.\n\
console.print(f"\n[red]{__title__} has been downloaded [yellow]{total_download_count} [red]times, but only [yellow]{percentual_stars}% [red]of users have starred it.\n\
[cyan]Help the repository grow today by leaving a [yellow]star [cyan]and [yellow]sharing [cyan]it with others online!")
time.sleep(3)

View File

@ -1,5 +1,5 @@
__title__ = 'StreamingCommunity'
__version__ = '2.5.0'
__author__ = 'Abc-dc'
__author__ = 'Arrowar'
__description__ = 'A command-line program to download film'
__copyright__ = 'Copyright 2024'

View File

@ -34,7 +34,7 @@ class ConfigManager:
else:
logging.info("Configuration file does not exist. Downloading...")
self.download_requirements(
'https://raw.githubusercontent.com/Abc-dc/StreamingCommunity/refs/heads/main/config.json',
'https://raw.githubusercontent.com/Arrowar/StreamingCommunity/refs/heads/main/config.json',
self.file_path
)

View File

@ -476,7 +476,7 @@ class OsSummary:
if not os.path.exists(requirements_file):
self.download_requirements(
'https://raw.githubusercontent.com/Abc-dc/StreamingCommunity/refs/heads/main/requirements.txt',
'https://raw.githubusercontent.com/Arrowar/StreamingCommunity/refs/heads/main/requirements.txt',
requirements_file
)

View File

@ -28,13 +28,15 @@
"proxy_start_max": 0.5
},
"M3U8_DOWNLOAD": {
"tqdm_delay": 0.12,
"tqdm_delay": 0.05,
"default_video_workser": 12,
"default_audio_workser": 12,
"download_audio": true,
"merge_audio": true,
"specific_list_audio": [
"ita"
],
"download_subtitle": true,
"merge_subs": true,
"specific_list_subtitles": [
"eng",