Skip to content

Commit 95edec2

Browse files
authored
Merge pull request #141 from Nokse22/update-tidalapi
Update tidalapi
2 parents 32dda70 + d35912f commit 95edec2

File tree

2 files changed

+20
-33
lines changed

2 files changed

+20
-33
lines changed

build-aux/python3-tidalapi.json

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22
"name": "python3-tidalapi",
33
"buildsystem": "simple",
44
"build-commands": [
5-
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"urllib3[socks]\" --no-build-isolation",
6-
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"tidalapi\" --no-build-isolation"
5+
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"urllib3[socks]\" \"tidalapi\" --no-build-isolation"
76
],
87
"sources": [
98
{
109
"type": "file",
11-
"url": "https://files.pythonhosted.org/packages/a5/32/8f6669fc4798494966bf446c8c4a162e0b5d893dff088afddf76414f70e1/certifi-2024.12.14-py3-none-any.whl",
12-
"sha256": "1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"
10+
"url": "https://files.pythonhosted.org/packages/e5/48/1549795ba7742c948d2ad169c1c8cdbae65bc450d6cd753d124b17c8cd32/certifi-2025.8.3-py3-none-any.whl",
11+
"sha256": "f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5"
1312
},
1413
{
1514
"type": "file",
16-
"url": "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz",
17-
"sha256": "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"
15+
"url": "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz",
16+
"sha256": "6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14"
1817
},
1918
{
2019
"type": "file",
@@ -43,18 +42,18 @@
4342
},
4443
{
4544
"type": "file",
46-
"url": "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl",
47-
"sha256": "70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"
45+
"url": "https://files.pythonhosted.org/packages/7c/e4/56027c4a6b4ae70ca9de302488c5ca95ad4a39e190093d6c1a8ace08341b/requests-2.32.4-py3-none-any.whl",
46+
"sha256": "27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c"
4847
},
4948
{
5049
"type": "file",
51-
"url": "https://files.pythonhosted.org/packages/db/a6/efe5044ab4e84e945a3b84e40af3e4ff68f17de20c1fe2d58ed821b1d267/tidalapi-0.8.3-py3-none-any.whl",
52-
"sha256": "b6698e308cc9f4edac4b9c1bc22773f040d4de0bbac212defcbe33a93f66b3c7"
50+
"url": "https://files.pythonhosted.org/packages/7e/fc/8612dde17f43b8358e872ad2dcc23c6d295fcf030389adf4012e71f4a271/tidalapi-0.8.5-py3-none-any.whl",
51+
"sha256": "208f9ca47d012563f7038764a44ae46d68ae38d6c2a527e15fab50f5670bda9f"
5352
},
5453
{
5554
"type": "file",
56-
"url": "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl",
57-
"sha256": "04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"
55+
"url": "https://files.pythonhosted.org/packages/b5/00/d631e67a838026495268c2f6884f3711a15a9a2a96cd244fdaea53b823fb/typing_extensions-4.14.1-py3-none-any.whl",
56+
"sha256": "d1e1e3b58374dc93031d6eda2420a48ea44a36c2b4766a4fdeb3710755731d76"
5857
},
5958
{
6059
"type": "file",
@@ -63,8 +62,8 @@
6362
},
6463
{
6564
"type": "file",
66-
"url": "https://files.pythonhosted.org/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl",
67-
"sha256": "1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"
65+
"url": "https://files.pythonhosted.org/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl",
66+
"sha256": "e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc"
6867
}
6968
]
70-
}
69+
}

src/pages/generic_page.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,8 @@
2222
from tidalapi.page import TextBlock, PageLinks, ItemList
2323
from tidalapi.media import Track
2424

25-
# Import newer classes with fallback for older versions
26-
try:
27-
from tidalapi.page import TrackList, ShortcutList
28-
from tidalapi.page import HorizontalListWithContext, HorizontalList
29-
except ImportError:
30-
TrackList = None
31-
ShortcutList = None
32-
HorizontalListWithContext = None
33-
HorizontalList = None
25+
from tidalapi.page import TrackList, ShortcutList
26+
from tidalapi.page import HorizontalListWithContext, HorizontalList
3427

3528
from .page import Page
3629
from ..widgets import HTShorcutsWidget
@@ -78,9 +71,7 @@ def _load_finish(self) -> None:
7871
self.set_title("")
7972

8073
for index, category in enumerate(self.page.categories):
81-
if isinstance(category.items[0], Track) or (
82-
TrackList and isinstance(category, TrackList)
83-
):
74+
if isinstance(category.items[0], Track) or isinstance(category, TrackList):
8475
self.new_track_list_for(category.title, category.items)
8576
elif isinstance(category, TextBlock):
8677
self.append(
@@ -99,14 +90,11 @@ def _load_finish(self) -> None:
9990
self.new_link_carousel_for(
10091
category.title if category.title else _("More"), category.items
10192
)
102-
elif ShortcutList and isinstance(category, ShortcutList):
93+
elif isinstance(category, ShortcutList):
10394
self.append(HTShorcutsWidget(category.items))
10495
elif (
10596
isinstance(category, ItemList)
106-
or (HorizontalList and isinstance(category, HorizontalList))
107-
or (
108-
HorizontalListWithContext
109-
and isinstance(category, HorizontalListWithContext)
110-
)
97+
or isinstance(category, HorizontalList)
98+
or isinstance(category, HorizontalListWithContext)
11199
):
112100
self.new_carousel_for(category.title, category.items)

0 commit comments

Comments
 (0)