diff options
| author | Robert Honz <exislow+github@gmail.com> | 2024-01-19 11:16:33 +0100 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2024-01-19 11:16:33 +0100 |
| commit | 1e4d89aac8a6e2932e75687ebfbc1993a15bf143 (patch) | |
| tree | 08d25b7a328fac7dad0b906850a7cdc2832ec97f | |
| parent | d39bcc9292590639b1f61035c9386c4550a198d7 (diff) | |
| download | tidal-dl-ng-1e4d89aac8a6e2932e75687ebfbc1993a15bf143.tar.gz | |
✨ Windows taskbar icon workaround.
| -rw-r--r-- | tidal_dl_ng/gui.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tidal_dl_ng/gui.py b/tidal_dl_ng/gui.py index 810672a..598a8d9 100644 --- a/tidal_dl_ng/gui.py +++ b/tidal_dl_ng/gui.py @@ -484,6 +484,17 @@ def gui_activate(tidal: Tidal | None = None): icon: QtGui.QIcon = QtGui.QIcon(pixmap) app.setWindowIcon(icon) + # This bit gets the taskbar icon working properly in Windows + if sys.platform.startswith("win"): + import ctypes + + # Make sure Pyinstaller icons are still grouped + if not sys.argv[0].endswith(".exe"): + # Arbitrary string + ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID( + "CompanyName.ProductName.SubProduct.VersionInformation" + ) + window = MainWindow(tidal=tidal) window.show() |
