yutipy 2.2.11__py3-none-any.whl → 2.2.12__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 CHANGED
@@ -183,17 +183,14 @@ class Itunes:
183
183
  tuple
184
184
  The extracted album title and type.
185
185
  """
186
- try:
187
- album_title, album_type = result["collectionName"].split("-")
188
- return album_title.strip(), album_type.strip()
189
- except ValueError:
190
- guess = guess_album_type(result.get("trackCount", 1))
191
- guessed_right = are_strings_similar(
192
- result.get("wrapperType", "x"), guess, use_translation=False
193
- )
194
- return result["collectionName"], (
195
- result["wrapperType"] if guessed_right else guess
196
- )
186
+
187
+ guess = guess_album_type(result.get("trackCount", 1))
188
+ guessed_right = are_strings_similar(
189
+ result.get("wrapperType", "x"), guess, use_translation=False
190
+ )
191
+ return result["collectionName"], (
192
+ result["wrapperType"] if guessed_right else guess
193
+ )
197
194
 
198
195
  def _format_release_date(self, release_date: str) -> str:
199
196
  """
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"),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yutipy
3
- Version: 2.2.11
3
+ Version: 2.2.12
4
4
  Summary: A simple Python package to interact with various music platforms APIs.
5
5
  Author: Cheap Nightbot
6
6
  Author-email: Cheap Nightbot <hi@cheapnightbot.slmail.me>
@@ -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=nApU4l3iGyAwFgPfjIJ71L1hXeN1yw7pUX_w3xgLrx0,7517
5
+ yutipy/itunes.py,sha256=FAHZDUn6Mvk2t5Ws5rF0hQMzIKZAIflR49lhEPIUyLs,7317
6
6
  yutipy/kkbox.py,sha256=Pfx-ZgAI9F1cbxjr7MCsMi-QulNt67t60L7y9lNmo5g,11503
7
- yutipy/lastfm.py,sha256=RP8OeWZnCCDENhtEc-JvypJCDsnM9aBLx77C2gmnd5Y,5938
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.11.dist-info/licenses/LICENSE,sha256=_89JsS2QnBG8tAb5-VWbJDj_uJ002zPJAYBJJdh3DPY,1071
19
- yutipy-2.2.11.dist-info/METADATA,sha256=vyjR03xuclUZlGwQPbSUIcXXf7oGIk57wkLJEoeOMWw,6369
20
- yutipy-2.2.11.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
21
- yutipy-2.2.11.dist-info/entry_points.txt,sha256=BrgmanaPjQqKQ3Ip76JLcsPgGANtrBSURf5CNIxl1HA,106
22
- yutipy-2.2.11.dist-info/top_level.txt,sha256=t2A5V2_mUcfnHkbCy6tAQlb3909jDYU5GQgXtA4756I,7
23
- yutipy-2.2.11.dist-info/RECORD,,
18
+ yutipy-2.2.12.dist-info/licenses/LICENSE,sha256=_89JsS2QnBG8tAb5-VWbJDj_uJ002zPJAYBJJdh3DPY,1071
19
+ yutipy-2.2.12.dist-info/METADATA,sha256=OY5NoPGtT3vZZGs_5oleKfzPlwFQuTlk1SH5c2zbFJI,6369
20
+ yutipy-2.2.12.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
21
+ yutipy-2.2.12.dist-info/entry_points.txt,sha256=BrgmanaPjQqKQ3Ip76JLcsPgGANtrBSURf5CNIxl1HA,106
22
+ yutipy-2.2.12.dist-info/top_level.txt,sha256=t2A5V2_mUcfnHkbCy6tAQlb3909jDYU5GQgXtA4756I,7
23
+ yutipy-2.2.12.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.3.1)
2
+ Generator: setuptools (80.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5