Skip to content

Commit

Permalink
v1.4.12.34
Browse files Browse the repository at this point in the history
  • Loading branch information
sebdelsol committed Mar 5, 2024
1 parent 6c7ce3a commit 4ad129c
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 82 deletions.
3 changes: 1 addition & 2 deletions .vscode/extension.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"recommendations": [
"ms-python.black-formatter",
"ms-python.isort",
"charliermarsh.ruff",
"ms-python.pylint",
"ms-python.python",
"ms-python.vscode-pylance",
Expand Down
10 changes: 4 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,19 @@
// type checking (pylance)
"python.analysis.typeCheckingMode": "basic",
"python.analysis.diagnosticMode": "workspace",
// black
"black-formatter.args": [
"--line-length=115"
],
"ruff.format.args": ["--line-length=115"],
// isort
"isort.args": [
"--profile",
"black"
],
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
"source.organizeImports": "explicit",
"source.fixAll": "explicit",
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.rulers": [
{
"column": 89,
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

[^1]: External EPG doesn't work with **local** m3u accounts.
# Download
[<img src="https://custom-icon-badges.demolab.com/badge/Sfvip All v1.4.12.33-informational.svg?logo=download-cloud&logoSource=feather&logoColor=white&style=flat-square" height="28"><img src="https://img.shields.io/badge/x64-informational.svg?logo=Windows10&logoColor=lightblue&style=flat-square" height="28"><img src="https://custom-icon-badges.demolab.com/badge/clean-brightgreen.svg?logo=shield-check&logoColor=white&style=flat-square" height="28">](https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.33/Install.Sfvip.All.1.4.12.33.x64.exe)
<sup><sup>_by MS Defender • 1.1.24010.10 • 1.405.697.0_</sup></sup>
[<img src="https://custom-icon-badges.demolab.com/badge/Sfvip All v1.4.12.34-informational?logo=download-cloud&logoSource=feather&logoColor=white&style=flat-square" height="28"><img src="https://img.shields.io/badge/x64-informational?logo=Windows10&logoColor=lightblue&style=flat-square" height="28"><img src="https://custom-icon-badges.demolab.com/badge/clean-brightgreen?logo=shield-check&logoColor=white&style=flat-square" height="28">](https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.34/Install.Sfvip.All.1.4.12.34.x64.exe)
<sup><sup>_by MS Defender • 1.1.24010.10 • 1.405.1029.0_</sup></sup>

[<img src="https://custom-icon-badges.demolab.com/badge/Sfvip All v1.4.12.33-informational.svg?logo=download-cloud&logoSource=feather&logoColor=white&style=flat-square" height="28"><img src="https://img.shields.io/badge/x86-informational.svg?logo=Windows10&logoColor=lightblue&style=flat-square" height="28"><img src="https://custom-icon-badges.demolab.com/badge/clean-brightgreen.svg?logo=shield-check&logoColor=white&style=flat-square" height="28">](https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.33/Install.Sfvip.All.1.4.12.33.x86.exe)
<sup><sup>_by MS Defender • 1.1.24010.10 • 1.405.697.0_</sup></sup>
[<img src="https://custom-icon-badges.demolab.com/badge/Sfvip All v1.4.12.34-informational?logo=download-cloud&logoSource=feather&logoColor=white&style=flat-square" height="28"><img src="https://img.shields.io/badge/x86-informational?logo=Windows10&logoColor=lightblue&style=flat-square" height="28"><img src="https://custom-icon-badges.demolab.com/badge/clean-brightgreen?logo=shield-check&logoColor=white&style=flat-square" height="28">](https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.34/Install.Sfvip.All.1.4.12.34.x86.exe)
<sup><sup>_by MS Defender • 1.1.24010.10 • 1.405.1029.0_</sup></sup>

[![download](https://img.shields.io/github/downloads/sebdelsol/sfvip-all/total?color=informational)](https://tooomm.github.io/github-release-stats/?username=sebdelsol&repository=sfvip-all)
[![issues](https://img.shields.io/github/issues/sebdelsol/sfvip-all)](https://github.com/sebdelsol/sfvip-all/issues?q=is%3Aopen)
[![download](https://img.shields.io/github/downloads/sebdelsol/sfvip-all/total?color=informational&logo=github&labelColor=informational)](https://tooomm.github.io/github-release-stats/?username=sebdelsol&repository=sfvip-all)
[![issues](https://img.shields.io/github/issues/sebdelsol/sfvip-all?logo=github&labelColor=success)](https://github.com/sebdelsol/sfvip-all/issues?q=is%3Aopen)


Check the [***changelog***](build/changelog.md) and ***notes***[^2].
Expand All @@ -32,13 +32,13 @@ The logs are to be found in the app folder:
<kbd><img src="resources/logs.png" width="400"></kbd>

# Build
[![Python](https://img.shields.io/badge/Python-3.11.8-fbdf79?logo=python&logoColor=fbdf79)](https://www.python.org/downloads/release/python-3118/)
[![mitmproxy](https://custom-icon-badges.demolab.com/badge/Mitmproxy-10.2.2-informational.svg?logo=mitmproxy)](https://mitmproxy.org/)
[![Style](https://custom-icon-badges.demolab.com/badge/Style-Black-000000.svg?logo=file-code&logoColor=a0a0a0)](https://black.readthedocs.io/en/stable/)
[![Sloc](https://custom-icon-badges.demolab.com/badge/Sloc-7967-000000.svg?logo=file-code&logoColor=a0a0a0)](https://api.codetabs.com/v1/loc/?github=sebdelsol/sfvip-all)
[![Nsis](https://img.shields.io/badge/Nsis-3.09-informational?logo=NSIS&logoColor=fbdf79)](https://nsis.sourceforge.io/Download)
[![Nuitka](https://custom-icon-badges.demolab.com/badge/Nuitka-2.0.5-informational.svg?logo=tools&logoColor=61dafb)](https://nuitka.net/)
[![PyInstaller](https://custom-icon-badges.demolab.com/badge/PyInstaller-6.4.0-informational.svg?logo=tools&logoColor=61dafb)](https://pyinstaller.org/en/stable/)
[![Python](https://custom-icon-badges.demolab.com/badge/Python%203.11.8-ghostwhite?logo=python-color)](https://www.python.org/downloads/release/python-3118/)
[![mitmproxy](https://custom-icon-badges.demolab.com/badge/Mitmproxy%2010.2.2-ghostwhite?logo=mitmproxy-black)](https://mitmproxy.org/)
[![Nsis](https://custom-icon-badges.demolab.com/badge/Nsis%203.09-ghostwhite?logo=nsis-color)](https://nsis.sourceforge.io/Download)
[![Nuitka](https://custom-icon-badges.demolab.com/badge/Nuitka%202.1-ghostwhite?logo=nuitka)](https://nuitka.net/)
[![PyInstaller](https://custom-icon-badges.demolab.com/badge/PyInstaller%206.4.0-ghostwhite?logo=pyinstaller-windowed)](https://pyinstaller.org/en/stable/)
[![Ruff](https://custom-icon-badges.demolab.com/badge/Ruff-ghostwhite?logo=ruff-color)](https://github.com/astral-sh/ruff)
[![Sloc](https://custom-icon-badges.demolab.com/badge/Sloc%207964-ghostwhite?logo=file-code&logoColor=909090)](https://api.codetabs.com/v1/loc/?github=sebdelsol/sfvip-all)

[***NSIS***](https://nsis.sourceforge.io/Download) will be automatically installed if missing.
Check the [***build config***](build_config.py).
Expand Down
4 changes: 4 additions & 0 deletions build/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.4.12.34
* Bump _Nuitka_ to 2.1.
* Fix libmpv update UI.

## 1.4.12.33
* Info window stays longer.
* Bump _Nuitka_ to 2.0.5.
Expand Down
6 changes: 3 additions & 3 deletions build/update_x64.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"url": "https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.33/Install.Sfvip.All.1.4.12.33.x64.exe",
"md5": "56c83b643f4d8217742c608aee4d3e07",
"version": "1.4.12.33"
"url": "https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.34/Install.Sfvip.All.1.4.12.34.x64.exe",
"md5": "75c9bc30b48d9a743c902bcf078fab6f",
"version": "1.4.12.34"
}
6 changes: 3 additions & 3 deletions build/update_x86.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"url": "https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.33/Install.Sfvip.All.1.4.12.33.x86.exe",
"md5": "74097b26b8867e9e0b2fe8ffb661f72e",
"version": "1.4.12.33"
"url": "https://github.com/sebdelsol/sfvip-all/releases/download/Sfvip.All.1.4.12.34/Install.Sfvip.All.1.4.12.34.x86.exe",
"md5": "59a8335c3644a14da316272cc0c97cdb",
"version": "1.4.12.34"
}
2 changes: 1 addition & 1 deletion build_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Build:
main: ClassVar = "sfvip_all.py"
company: ClassVar = "sebdelsol"
name: ClassVar = "Sfvip All"
version: ClassVar = "1.4.12.33"
version: ClassVar = "1.4.12.34"
dir: ClassVar = "build"
enable_console: ClassVar = False
logs_dir: ClassVar = "../logs"
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ watchdog>=3.0.0
# for downloading the player and libmpv
feedparser>=6.0.10
py-cpuinfo>=9.0.0
py7zr>=0.20.6
py7zr>=0.21.0 # https://github.com/miurahr/py7zr/pull/558
requests>=2.31.0
# for EPG
keyboard>=0.13.5
Expand Down
22 changes: 11 additions & 11 deletions resources/README_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

[^1]: External EPG doesn't work with **local** m3u accounts.
# Download
[<img src="https://custom-icon-badges.demolab.com/badge/{name} v{version_x64}-informational.svg?logo=download-cloud&logoSource=feather&logoColor=white&style=flat-square" height="{h_download}"><img src="https://img.shields.io/badge/x64-informational.svg?logo=Windows10&logoColor=lightblue&style=flat-square" height="{h_download}"><img src="https://custom-icon-badges.demolab.com/badge/{exe_x64_clean}.svg?logo=shield-check&logoColor=white&style=flat-square" height="{h_download}">]({exe_x64_release})
[<img src="https://custom-icon-badges.demolab.com/badge/{name} v{version_x64}-informational?logo=download-cloud&logoSource=feather&logoColor=white&style=flat-square" height="{h_download}"><img src="https://img.shields.io/badge/x64-informational?logo=Windows10&logoColor=lightblue&style=flat-square" height="{h_download}"><img src="https://custom-icon-badges.demolab.com/badge/{exe_x64_clean}?logo=shield-check&logoColor=white&style=flat-square" height="{h_download}">]({exe_x64_release})
<sup><sup>_by MS Defender • {exe_x64_engine} • {exe_x64_signature}_</sup></sup>

[<img src="https://custom-icon-badges.demolab.com/badge/{name} v{version_x86}-informational.svg?logo=download-cloud&logoSource=feather&logoColor=white&style=flat-square" height="{h_download}"><img src="https://img.shields.io/badge/x86-informational.svg?logo=Windows10&logoColor=lightblue&style=flat-square" height="{h_download}"><img src="https://custom-icon-badges.demolab.com/badge/{exe_x86_clean}.svg?logo=shield-check&logoColor=white&style=flat-square" height="{h_download}">]({exe_x86_release})
[<img src="https://custom-icon-badges.demolab.com/badge/{name} v{version_x86}-informational?logo=download-cloud&logoSource=feather&logoColor=white&style=flat-square" height="{h_download}"><img src="https://img.shields.io/badge/x86-informational?logo=Windows10&logoColor=lightblue&style=flat-square" height="{h_download}"><img src="https://custom-icon-badges.demolab.com/badge/{exe_x86_clean}?logo=shield-check&logoColor=white&style=flat-square" height="{h_download}">]({exe_x86_release})
<sup><sup>_by MS Defender • {exe_x86_engine} • {exe_x86_signature}_</sup></sup>

[![download](https://img.shields.io/github/downloads/{github_path}/total?color=informational)](https://tooomm.github.io/github-release-stats/?username={github_owner}&repository={github_repo})
[![issues](https://img.shields.io/github/issues/sebdelsol/sfvip-all)](https://github.com/sebdelsol/sfvip-all/issues?q=is%3Aopen)
[![download](https://img.shields.io/github/downloads/{github_path}/total?color=informational&logo=github&labelColor=informational)](https://tooomm.github.io/github-release-stats/?username={github_owner}&repository={github_repo})
[![issues](https://img.shields.io/github/issues/sebdelsol/sfvip-all?logo=github&labelColor=success)](https://github.com/sebdelsol/sfvip-all/issues?q=is%3Aopen)


Check the [***changelog***](build/changelog.md) and ***notes***[^2].
Expand All @@ -32,13 +32,13 @@ The logs are to be found in the app folder:
<kbd><img src="resources/logs.png" width="400"></kbd>

# Build
[![Python](https://img.shields.io/badge/Python-{py_version}-fbdf79?logo=python&logoColor=fbdf79)](https://www.python.org/downloads/release/python-{py_version_compact}/)
[![mitmproxy](https://custom-icon-badges.demolab.com/badge/Mitmproxy-{mitmproxy_version}-informational.svg?logo=mitmproxy)](https://mitmproxy.org/)
[![Style](https://custom-icon-badges.demolab.com/badge/Style-Black-000000.svg?logo=file-code&logoColor=a0a0a0)](https://black.readthedocs.io/en/stable/)
[![Sloc](https://custom-icon-badges.demolab.com/badge/Sloc-{sloc}-000000.svg?logo=file-code&logoColor=a0a0a0)](https://api.codetabs.com/v1/loc/?github={github_path})
[![Nsis](https://img.shields.io/badge/Nsis-{nsis_version}-informational?logo=NSIS&logoColor=fbdf79)](https://nsis.sourceforge.io/Download)
[![Nuitka](https://custom-icon-badges.demolab.com/badge/Nuitka-{nuitka_version}-informational.svg?logo=tools&logoColor=61dafb)](https://nuitka.net/)
[![PyInstaller](https://custom-icon-badges.demolab.com/badge/PyInstaller-{pyinstaller_version}-informational.svg?logo=tools&logoColor=61dafb)](https://pyinstaller.org/en/stable/)
[![Python](https://custom-icon-badges.demolab.com/badge/Python%20{py_version}-ghostwhite?logo=python-color)](https://www.python.org/downloads/release/python-{py_version_compact}/)
[![mitmproxy](https://custom-icon-badges.demolab.com/badge/Mitmproxy%20{mitmproxy_version}-ghostwhite?logo=mitmproxy-black)](https://mitmproxy.org/)
[![Nsis](https://custom-icon-badges.demolab.com/badge/Nsis%20{nsis_version}-ghostwhite?logo=nsis-color)](https://nsis.sourceforge.io/Download)
[![Nuitka](https://custom-icon-badges.demolab.com/badge/Nuitka%20{nuitka_version}-ghostwhite?logo=nuitka)](https://nuitka.net/)
[![PyInstaller](https://custom-icon-badges.demolab.com/badge/PyInstaller%20{pyinstaller_version}-ghostwhite?logo=pyinstaller-windowed)](https://pyinstaller.org/en/stable/)
[![Ruff](https://custom-icon-badges.demolab.com/badge/Ruff-ghostwhite?logo=ruff-color)](https://github.com/astral-sh/ruff)
[![Sloc](https://custom-icon-badges.demolab.com/badge/Sloc%20{sloc}-ghostwhite?logo=file-code&logoColor=909090)](https://api.codetabs.com/v1/loc/?github={github_path})

[***NSIS***](https://nsis.sourceforge.io/Download) will be automatically installed if missing.
Check the [***build config***](build_config.py).
Expand Down
1 change: 0 additions & 1 deletion src/sfvip/ui/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,3 @@ def set_progress(percent: float) -> None:
self._progressbar["value"] = max(0, min(percent, 100))

yield set_progress
self._set_progress_mode(ProgressMode.UNKNOWN)
46 changes: 23 additions & 23 deletions src/sfvip/utils/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,37 @@
)


def _unpack_7z(archive: Path, extract_dir: Path, set_percent: TPercentFunc) -> None:
class _ExtractCallback(py7zr.callbacks.ExtractCallback):
def __init__(self) -> None:
self.extracted_size = 0
self.failed = False
class _7zCallback(py7zr.callbacks.ExtractCallback):
def __init__(self, zf: py7zr.SevenZipFile, set_percent: TPercentFunc) -> None:
self.total_size: int = zf.archiveinfo().uncompressed # type: ignore
self.set_percent = set_percent
self.extracted_size = 0
self.failed = False

def report_end(self, *_) -> None: ...

def report_end(self, processing_file_path: str, wrote_bytes: int | str) -> None:
self.extracted_size += int(wrote_bytes)
try:
set_percent(100 * self.extracted_size / uncompress_size)
except tk.TclError:
self.failed = True
def report_start_preparation(self) -> None: ...

def report_start_preparation(self) -> None:
pass
def report_start(self, *_) -> None: ...

def report_start(self, *_) -> None:
pass
def report_postprocess(self) -> None: ...

def report_postprocess(self) -> None:
pass
def report_warning(self, _: str) -> None: ...

def report_warning(self, message: str) -> None:
pass
def report_update(self, decompressed_bytes: str) -> None:
try:
self.extracted_size += int(decompressed_bytes)
self.set_percent(100 * self.extracted_size / self.total_size)
except (tk.TclError, ValueError, ZeroDivisionError):
self.failed = True


def _unpack_7z(archive: Path, extract_dir: Path, set_percent: TPercentFunc) -> None:
with py7zr.SevenZipFile(archive) as zf:
uncompress_size: int = zf.archiveinfo().uncompressed # type: ignore
callback = _ExtractCallback()
callback = _7zCallback(zf, set_percent)
zf.extractall(path=extract_dir, callback=callback)
if callback.failed:
raise py7zr.exceptions.ArchiveError("progress failed")
if callback.failed:
raise py7zr.exceptions.ArchiveError("progress failed")


def _unpack_zip(archive: Path, extract_dir: Path, set_percent: TPercentFunc) -> None:
Expand Down
Loading

0 comments on commit 4ad129c

Please sign in to comment.