summaryrefslogtreecommitdiff
path: root/tidal_dl_ng/helper
diff options
context:
space:
mode:
authorexislow <exislow@users.noreply.github.com>2025-01-12 17:42:48 +0100
committerGitHub <noreply@github.com>2025-01-12 17:42:48 +0100
commit891ad626e8ab517988b2360468363b1bd7db121f (patch)
tree2dfa6d8aa867404a8ace5559ad9f9bb512ce6e41 /tidal_dl_ng/helper
parente723b81892aed1a23c49cdd61ebb066d9f8654af (diff)
parent2055606d0b66f303c98468849eeee80e4969e44c (diff)
downloadtidal-dl-ng-891ad626e8ab517988b2360468363b1bd7db121f.tar.gz
Merge pull request #334 from exislow/322-bug-skip_existing-not-working-for-flacs
👷 File extension guesser improved. Fixes #322
Diffstat (limited to 'tidal_dl_ng/helper')
-rw-r--r--tidal_dl_ng/helper/gui.py22
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