diff --git a/.github/media/logo.ico b/.github/media/logo.ico deleted file mode 100644 index ff16d28..0000000 Binary files a/.github/media/logo.ico and /dev/null differ diff --git a/StreamingCommunity/Lib/Downloader/HLS/downloader.py b/StreamingCommunity/Lib/Downloader/HLS/downloader.py index a6ed152..eee41dc 100644 --- a/StreamingCommunity/Lib/Downloader/HLS/downloader.py +++ b/StreamingCommunity/Lib/Downloader/HLS/downloader.py @@ -189,10 +189,16 @@ class M3U8Manager: tuple_available_resolution = self.parser._video.get_list_resolution() list_available_resolution = [f"{r[0]}x{r[1]}" for r in tuple_available_resolution] + # Check if self.video_res is not None + if self.video_res is not None: + video_resolution = f"{self.video_res[0]}x{self.video_res[1]}" + else: + video_resolution = "Not set" + console.print( f"[cyan bold]Video [/cyan bold] [green]Available:[/green] [purple]{', '.join(list_available_resolution)}[/purple] | " f"[red]Set:[/red] [purple]{FILTER_CUSTOM_REOLUTION}[/purple] | " - f"[yellow]Downloadable:[/yellow] [purple]{self.video_res[0]}x{self.video_res[1]}[/purple]" + f"[yellow]Downloadable:[/yellow] [purple]{video_resolution}[/purple]" ) if self.parser.codec is not None: diff --git a/StreamingCommunity/Upload/update.py b/StreamingCommunity/Upload/update.py index dc40ce2..031ba56 100644 --- a/StreamingCommunity/Upload/update.py +++ b/StreamingCommunity/Upload/update.py @@ -43,6 +43,13 @@ def update(): timeout=config_manager.get_int("REQUESTS", "timeout"), follow_redirects=True ).json() + + response_commits = httpx.get( + url=f"https://api.github.com/repos/{__author__}/{__title__}/commits", + headers={'user-agent': get_userAgent()}, + timeout=config_manager.get_int("REQUESTS", "timeout"), + follow_redirects=True + ).json() except Exception as e: console.print(f"[red]Error accessing GitHub API: {e}") @@ -66,11 +73,23 @@ def update(): else: percentual_stars = 0 - # Check installed version - if str(__version__).replace('v', '') != str(last_version).replace('v', '') : + # Get the current version (installed version) + current_version = __version__ + + # Get commit details + latest_commit = response_commits[0] if response_commits else None + if latest_commit: + latest_commit_message = latest_commit.get('commit', {}).get('message', 'No commit message') + else: + latest_commit_message = 'No commit history available' + + console.print(f"\n[cyan]Current installed version: [yellow]{current_version}") + console.print(f"[cyan]Last commit: [yellow]{latest_commit_message}") + + if str(current_version).replace('v', '') != str(last_version).replace('v', ''): console.print(f"\n[cyan]New version available: [yellow]{last_version}") 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) + time.sleep(3) \ No newline at end of file