yutipy 2.2.11__py3-none-any.whl → 2.2.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of yutipy might be problematic. Click here for more details.
- yutipy/itunes.py +11 -13
- yutipy/lastfm.py +1 -1
- {yutipy-2.2.11.dist-info → yutipy-2.2.13.dist-info}/METADATA +1 -1
- {yutipy-2.2.11.dist-info → yutipy-2.2.13.dist-info}/RECORD +8 -8
- {yutipy-2.2.11.dist-info → yutipy-2.2.13.dist-info}/WHEEL +1 -1
- {yutipy-2.2.11.dist-info → yutipy-2.2.13.dist-info}/entry_points.txt +0 -0
- {yutipy-2.2.11.dist-info → yutipy-2.2.13.dist-info}/licenses/LICENSE +0 -0
- {yutipy-2.2.11.dist-info → yutipy-2.2.13.dist-info}/top_level.txt +0 -0
yutipy/itunes.py
CHANGED
|
@@ -9,7 +9,7 @@ import requests
|
|
|
9
9
|
from yutipy.exceptions import InvalidValueException, ItunesException
|
|
10
10
|
from yutipy.logger import logger
|
|
11
11
|
from yutipy.models import MusicInfo
|
|
12
|
-
from yutipy.utils.helpers import are_strings_similar, guess_album_type, is_valid_string
|
|
12
|
+
from yutipy.utils.helpers import are_strings_similar, guess_album_type, is_valid_string, separate_artists
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class Itunes:
|
|
@@ -149,12 +149,13 @@ class Itunes:
|
|
|
149
149
|
|
|
150
150
|
album_title, album_type = self._extract_album_info(result)
|
|
151
151
|
release_date = self._format_release_date(result["releaseDate"])
|
|
152
|
+
artists = separate_artists(result["artistName"])
|
|
152
153
|
|
|
153
154
|
return MusicInfo(
|
|
154
155
|
album_art=result["artworkUrl100"],
|
|
155
156
|
album_title=album_title,
|
|
156
157
|
album_type=album_type.lower(),
|
|
157
|
-
artists=
|
|
158
|
+
artists=", ".join(artists),
|
|
158
159
|
genre=result["primaryGenreName"],
|
|
159
160
|
id=result.get("trackId", result["collectionId"]),
|
|
160
161
|
isrc=None,
|
|
@@ -183,17 +184,14 @@ class Itunes:
|
|
|
183
184
|
tuple
|
|
184
185
|
The extracted album title and type.
|
|
185
186
|
"""
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
return result["collectionName"], (
|
|
195
|
-
result["wrapperType"] if guessed_right else guess
|
|
196
|
-
)
|
|
187
|
+
|
|
188
|
+
guess = guess_album_type(result.get("trackCount", 1))
|
|
189
|
+
guessed_right = are_strings_similar(
|
|
190
|
+
result.get("wrapperType", "x"), guess, use_translation=False
|
|
191
|
+
)
|
|
192
|
+
return result["collectionName"], (
|
|
193
|
+
result["wrapperType"] if guessed_right else guess
|
|
194
|
+
)
|
|
197
195
|
|
|
198
196
|
def _format_release_date(self, release_date: str) -> str:
|
|
199
197
|
"""
|
yutipy/lastfm.py
CHANGED
|
@@ -154,7 +154,7 @@ class LastFm:
|
|
|
154
154
|
artists=", ".join(
|
|
155
155
|
separate_artists(result.get("artist", {}).get("#text"))
|
|
156
156
|
),
|
|
157
|
-
id=result.get("mbid"),
|
|
157
|
+
id=result.get("mbid") if result.get("mbid") else None,
|
|
158
158
|
timestamp=result.get("date", {}).get("uts") or time(),
|
|
159
159
|
title=result.get("name"),
|
|
160
160
|
url=result.get("url"),
|
|
@@ -2,9 +2,9 @@ yutipy/__init__.py,sha256=Zrw3cr_6khXp1IgQdZxGcUM9A64GYgPs-6rlqSukW5Q,294
|
|
|
2
2
|
yutipy/base_clients.py,sha256=FHCyCUQ-qE2Jo5JH-DZCxupoZTlb5ADs8XKDbHDVHwA,21687
|
|
3
3
|
yutipy/deezer.py,sha256=ZI1C5gam8NiNznyyagn5r0Potpg25MXja8UXg-9i9ug,10463
|
|
4
4
|
yutipy/exceptions.py,sha256=zz0XyyZr5xRcmRyw3hdTGaVRcwRn_RSYZdmwmuO0sEM,1379
|
|
5
|
-
yutipy/itunes.py,sha256=
|
|
5
|
+
yutipy/itunes.py,sha256=dOkz7RqUCIaGggrNWOyxJebrv0f-mF1s9VOG2PVuFbY,7394
|
|
6
6
|
yutipy/kkbox.py,sha256=Pfx-ZgAI9F1cbxjr7MCsMi-QulNt67t60L7y9lNmo5g,11503
|
|
7
|
-
yutipy/lastfm.py,sha256=
|
|
7
|
+
yutipy/lastfm.py,sha256=hOFQOZdf51Gp2m02b4NjKRmQ9yQZ9Yas6MaM78c-oCg,5970
|
|
8
8
|
yutipy/logger.py,sha256=GyLBlfQZ6pLNJ5MbyQSvcD_PkxmFdX41DPq5aeG1z68,1316
|
|
9
9
|
yutipy/models.py,sha256=45M-bNHusaAan_Ta_E9DyvsWujsT-ivbJqIfy2-i3R8,2343
|
|
10
10
|
yutipy/musicyt.py,sha256=n3yaH9qyGlsW2HKPAmqYQNGzhuDH4s5Gh0R5v4JPoeg,9472
|
|
@@ -15,9 +15,9 @@ yutipy/cli/config.py,sha256=e5RIq6RxVxxzx30nKVMa06gwyQ258s7U0WA1xvJuR_0,4543
|
|
|
15
15
|
yutipy/cli/search.py,sha256=8SQw0bjRzRqAg-FuVz9aWjB2KBZqmCf38SyKAQ3rx5E,3025
|
|
16
16
|
yutipy/utils/__init__.py,sha256=AZaqvs6AJwnqwJuodbGnHu702WSUqc8plVC16SppOcU,239
|
|
17
17
|
yutipy/utils/helpers.py,sha256=-iH0bx_sxW3Y3jjl6eTbY6QOBoG5t4obRcp7GGyw3ro,7476
|
|
18
|
-
yutipy-2.2.
|
|
19
|
-
yutipy-2.2.
|
|
20
|
-
yutipy-2.2.
|
|
21
|
-
yutipy-2.2.
|
|
22
|
-
yutipy-2.2.
|
|
23
|
-
yutipy-2.2.
|
|
18
|
+
yutipy-2.2.13.dist-info/licenses/LICENSE,sha256=_89JsS2QnBG8tAb5-VWbJDj_uJ002zPJAYBJJdh3DPY,1071
|
|
19
|
+
yutipy-2.2.13.dist-info/METADATA,sha256=_-4JjBVmG2gTAL9LgxHJ5eCQBiXJNx1DuripBYUuO9A,6369
|
|
20
|
+
yutipy-2.2.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
21
|
+
yutipy-2.2.13.dist-info/entry_points.txt,sha256=BrgmanaPjQqKQ3Ip76JLcsPgGANtrBSURf5CNIxl1HA,106
|
|
22
|
+
yutipy-2.2.13.dist-info/top_level.txt,sha256=t2A5V2_mUcfnHkbCy6tAQlb3909jDYU5GQgXtA4756I,7
|
|
23
|
+
yutipy-2.2.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|