Merge pull request #67 from exislow/62-bug-version-info-not-displayed
🛠️ Version will be shown correctly.
This commit is contained in:
Generated
+26
-1
@@ -1926,6 +1926,17 @@ files = [
|
||||
{file = "tokenize_rt-5.2.0.tar.gz", hash = "sha256:9fe80f8a5c1edad2d3ede0f37481cc0cc1538a2f442c9c2f9e4feacd2792d054"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.10.2"
|
||||
description = "Python Library for Tom's Obvious, Minimal Language"
|
||||
optional = false
|
||||
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
|
||||
files = [
|
||||
{file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"},
|
||||
{file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tomli"
|
||||
version = "2.0.1"
|
||||
@@ -2042,6 +2053,20 @@ h2 = ["h2 (>=4,<5)"]
|
||||
socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"]
|
||||
zstd = ["zstandard (>=0.18.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "usingversion"
|
||||
version = "0.1.2"
|
||||
description = "A package to make it easy for other packages to report their version."
|
||||
optional = false
|
||||
python-versions = ">=3.9,<4.0"
|
||||
files = [
|
||||
{file = "usingversion-0.1.2-py3-none-any.whl", hash = "sha256:9ed8256e68d0b169f00c70f64f9a74a2d668a575032c30b12b3d13a97512fbde"},
|
||||
{file = "usingversion-0.1.2.tar.gz", hash = "sha256:d254068f7080eaa6d28a7d602d27828da3bc1a8b3bc10911f5cbb9b46877e7c8"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
toml = ">=0.10.2,<0.11.0"
|
||||
|
||||
[[package]]
|
||||
name = "virtualenv"
|
||||
version = "20.25.1"
|
||||
@@ -2109,4 +2134,4 @@ gui = ["pyqtdarktheme", "pyside6"]
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = ">=3.10,<3.12"
|
||||
content-hash = "afbc25683e33c66610043ec5d9b008491ce6d83cc8a4239605af35d91919d7cf"
|
||||
content-hash = "2db1405cc187edc07636904cbfcba15f7e4ae5f7c3f96fcfebc239c7f84f79cc"
|
||||
|
||||
+2
-1
@@ -40,6 +40,7 @@ pyside6 = {version = "^6.6.2", optional = true}
|
||||
pyqtdarktheme = {version = "^2.1.0", optional = true}
|
||||
mpegdash = "^0.4.0"
|
||||
rich = "^13.7.1"
|
||||
usingversion = "^0.1.2"
|
||||
|
||||
[tool.poetry.extras]
|
||||
gui = ["pyside6", "pyqtdarktheme"]
|
||||
@@ -170,7 +171,7 @@ profile = "black"
|
||||
multi_line_output = 3
|
||||
indent = 4
|
||||
color_output = true
|
||||
known_third_party = ["Crypto", "PySide6", "coloredlogs", "dataclasses_json", "ffmpeg", "helper", "m3u8", "mpegdash", "mutagen", "pathvalidate", "requests", "rich", "tidalapi", "typer"]
|
||||
known_third_party = ["Crypto", "PySide6", "coloredlogs", "dataclasses_json", "ffmpeg", "helper", "m3u8", "mpegdash", "mutagen", "pathvalidate", "requests", "rich", "tidalapi", "typer", "usingversion"]
|
||||
|
||||
[tool.mypy]
|
||||
# https://mypy.readthedocs.io/en/latest/config_file.html#using-a-pyproject-toml-file
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
import importlib.metadata
|
||||
from usingversion import getattr_with_version
|
||||
|
||||
try:
|
||||
# __package__ allows for the case where __name__ is "__main__"
|
||||
__version__ = importlib.metadata.version(__package__ or __name__)
|
||||
__name_display__ = importlib.metadata.metadata(__package__ or __name__).json["name"]
|
||||
except importlib.metadata.PackageNotFoundError:
|
||||
__version__ = "0.0.0"
|
||||
__name_display__ = __package__ or __name__
|
||||
__getattr__ = getattr_with_version("mypackage", __file__, __name__)
|
||||
__name_display__ = __package__ or __name__
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ from rich.panel import Panel
|
||||
from rich.progress import BarColumn, Console, Progress, SpinnerColumn, TextColumn
|
||||
from rich.table import Table
|
||||
|
||||
from tidal_dl_ng import __version__
|
||||
from tidal_dl_ng import version
|
||||
from tidal_dl_ng.config import Settings, Tidal
|
||||
from tidal_dl_ng.constants import CTX_TIDAL, MediaType
|
||||
from tidal_dl_ng.download import Download
|
||||
@@ -22,7 +22,7 @@ app = typer.Typer(context_settings={"help_option_names": ["-h", "--help"]}, add_
|
||||
|
||||
def version_callback(value: bool):
|
||||
if value:
|
||||
print(f"{__version__}")
|
||||
print(f"{version}")
|
||||
raise typer.Exit()
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ from helper.path import is_installed_ffmpeg
|
||||
from PySide6 import QtCore, QtGui, QtWidgets
|
||||
from tidalapi import Quality as QualityAudio
|
||||
|
||||
from tidal_dl_ng import __version__
|
||||
from tidal_dl_ng import version
|
||||
from tidal_dl_ng.config import Settings
|
||||
from tidal_dl_ng.constants import CoverDimensions, QualityVideo, SkipExisting
|
||||
from tidal_dl_ng.model.cfg import HelpSettings
|
||||
@@ -30,7 +30,7 @@ class DialogVersion(QtWidgets.QDialog):
|
||||
# Run the .setupUi() method to show the GUI
|
||||
self.ui.setupUi(self)
|
||||
# Set the version.
|
||||
self.ui.l_version.setText("v" + __version__)
|
||||
self.ui.l_version.setText("v" + version)
|
||||
# Show
|
||||
self.exec()
|
||||
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@ from collections.abc import Callable
|
||||
|
||||
from requests.exceptions import HTTPError
|
||||
|
||||
from tidal_dl_ng import __version__
|
||||
from tidal_dl_ng import version
|
||||
from tidal_dl_ng.dialog import DialogLogin, DialogPreferences, DialogVersion
|
||||
from tidal_dl_ng.helper.exceptions import MediaUnknown
|
||||
from tidal_dl_ng.helper.path import get_format_template
|
||||
@@ -629,7 +629,7 @@ def gui_activate(tidal: Tidal | None = None):
|
||||
# Make sure Pyinstaller icons are still grouped
|
||||
if not sys.argv[0].endswith(".exe"):
|
||||
# Arbitrary string
|
||||
my_app_id: str = "exislow.tidal.dl-ng." + __version__
|
||||
my_app_id: str = "exislow.tidal.dl-ng." + version
|
||||
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(my_app_id)
|
||||
|
||||
window = MainWindow(tidal=tidal)
|
||||
|
||||
Reference in New Issue
Block a user