diff options
| author | Robert Honz <exislow+github@gmail.com> | 2025-01-12 17:42:09 +0100 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2025-01-12 17:42:09 +0100 |
| commit | 2055606d0b66f303c98468849eeee80e4969e44c (patch) | |
| tree | 2dfa6d8aa867404a8ace5559ad9f9bb512ce6e41 /tidal_dl_ng/helper/gui.py | |
| parent | e723b81892aed1a23c49cdd61ebb066d9f8654af (diff) | |
| download | tidal-dl-ng-2055606d0b66f303c98468849eeee80e4969e44c.tar.gz | |
👷 File extension guesser improved. Fixes #322
Diffstat (limited to 'tidal_dl_ng/helper/gui.py')
| -rw-r--r-- | tidal_dl_ng/helper/gui.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tidal_dl_ng/helper/gui.py b/tidal_dl_ng/helper/gui.py index 187f6a8..d680b19 100644 --- a/tidal_dl_ng/helper/gui.py +++ b/tidal_dl_ng/helper/gui.py @@ -1,10 +1,13 @@ import re +from typing import cast from PySide6 import QtCore, QtGui, QtWidgets from tidalapi import Album, Mix, Playlist, Track, UserPlaylist, Video from tidalapi.artist import Artist from tidalapi.media import Quality +from tidal_dl_ng.constants import QualityVideo + def get_table_data( item: QtWidgets.QTreeWidgetItem, column: int @@ -46,8 +49,25 @@ def get_queue_download_media( def get_queue_download_quality( item: QtWidgets.QTreeWidgetItem, + column: int, +) -> str: + result: str = get_table_text(item, column) + + return result + + +def get_queue_download_quality_audio( + item: QtWidgets.QTreeWidgetItem, ) -> Quality: - result: Quality = get_table_text(item, 4) + result: Quality = cast(Quality, get_queue_download_quality(item, 4)) + + return result + + +def get_queue_download_quality_video( + item: QtWidgets.QTreeWidgetItem, +) -> QualityVideo: + result: QualityVideo = cast(QualityVideo, get_queue_download_quality(item, 5)) return result |
