yutipy 2.2.11__tar.gz → 2.2.13__tar.gz

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.

Files changed (62) hide show
  1. {yutipy-2.2.11 → yutipy-2.2.13}/PKG-INFO +1 -1
  2. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/itunes.py +11 -13
  3. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/lastfm.py +1 -1
  4. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy.egg-info/PKG-INFO +1 -1
  5. {yutipy-2.2.11 → yutipy-2.2.13}/.gitattributes +0 -0
  6. {yutipy-2.2.11 → yutipy-2.2.13}/.github/FUNDING.yml +0 -0
  7. {yutipy-2.2.11 → yutipy-2.2.13}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  8. {yutipy-2.2.11 → yutipy-2.2.13}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  9. {yutipy-2.2.11 → yutipy-2.2.13}/.github/dependabot.yml +0 -0
  10. {yutipy-2.2.11 → yutipy-2.2.13}/.github/workflows/pytest-unit-testing.yml +0 -0
  11. {yutipy-2.2.11 → yutipy-2.2.13}/.github/workflows/release.yml +0 -0
  12. {yutipy-2.2.11 → yutipy-2.2.13}/.gitignore +0 -0
  13. {yutipy-2.2.11 → yutipy-2.2.13}/.readthedocs.yaml +0 -0
  14. {yutipy-2.2.11 → yutipy-2.2.13}/LICENSE +0 -0
  15. {yutipy-2.2.11 → yutipy-2.2.13}/MANIFEST.in +0 -0
  16. {yutipy-2.2.11 → yutipy-2.2.13}/README.md +0 -0
  17. {yutipy-2.2.11 → yutipy-2.2.13}/docs/Makefile +0 -0
  18. {yutipy-2.2.11 → yutipy-2.2.13}/docs/_static/yutipy_header.png +0 -0
  19. {yutipy-2.2.11 → yutipy-2.2.13}/docs/_static/yutipy_logo.png +0 -0
  20. {yutipy-2.2.11 → yutipy-2.2.13}/docs/api_reference.rst +0 -0
  21. {yutipy-2.2.11 → yutipy-2.2.13}/docs/available_platforms.rst +0 -0
  22. {yutipy-2.2.11 → yutipy-2.2.13}/docs/cli.rst +0 -0
  23. {yutipy-2.2.11 → yutipy-2.2.13}/docs/conf.py +0 -0
  24. {yutipy-2.2.11 → yutipy-2.2.13}/docs/faq.rst +0 -0
  25. {yutipy-2.2.11 → yutipy-2.2.13}/docs/index.rst +0 -0
  26. {yutipy-2.2.11 → yutipy-2.2.13}/docs/installation.rst +0 -0
  27. {yutipy-2.2.11 → yutipy-2.2.13}/docs/make.bat +0 -0
  28. {yutipy-2.2.11 → yutipy-2.2.13}/docs/requirements.txt +0 -0
  29. {yutipy-2.2.11 → yutipy-2.2.13}/docs/usage_examples.rst +0 -0
  30. {yutipy-2.2.11 → yutipy-2.2.13}/pyproject.toml +0 -0
  31. {yutipy-2.2.11 → yutipy-2.2.13}/requirements-dev.txt +0 -0
  32. {yutipy-2.2.11 → yutipy-2.2.13}/requirements.txt +0 -0
  33. {yutipy-2.2.11 → yutipy-2.2.13}/setup.cfg +0 -0
  34. {yutipy-2.2.11 → yutipy-2.2.13}/tests/__init__.py +0 -0
  35. {yutipy-2.2.11 → yutipy-2.2.13}/tests/test_deezer.py +0 -0
  36. {yutipy-2.2.11 → yutipy-2.2.13}/tests/test_itunes.py +0 -0
  37. {yutipy-2.2.11 → yutipy-2.2.13}/tests/test_kkbox.py +0 -0
  38. {yutipy-2.2.11 → yutipy-2.2.13}/tests/test_lastfm.py +0 -0
  39. {yutipy-2.2.11 → yutipy-2.2.13}/tests/test_models.py +0 -0
  40. {yutipy-2.2.11 → yutipy-2.2.13}/tests/test_musicyt.py +0 -0
  41. {yutipy-2.2.11 → yutipy-2.2.13}/tests/test_spotify.py +0 -0
  42. {yutipy-2.2.11 → yutipy-2.2.13}/tests/test_utils.py +0 -0
  43. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/__init__.py +0 -0
  44. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/base_clients.py +0 -0
  45. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/cli/__init__.py +0 -0
  46. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/cli/config.py +0 -0
  47. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/cli/search.py +0 -0
  48. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/deezer.py +0 -0
  49. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/exceptions.py +0 -0
  50. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/kkbox.py +0 -0
  51. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/logger.py +0 -0
  52. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/models.py +0 -0
  53. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/musicyt.py +0 -0
  54. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/spotify.py +0 -0
  55. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/utils/__init__.py +0 -0
  56. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/utils/helpers.py +0 -0
  57. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy/yutipy_music.py +0 -0
  58. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy.egg-info/SOURCES.txt +0 -0
  59. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy.egg-info/dependency_links.txt +0 -0
  60. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy.egg-info/entry_points.txt +0 -0
  61. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy.egg-info/requires.txt +0 -0
  62. {yutipy-2.2.11 → yutipy-2.2.13}/yutipy.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yutipy
3
- Version: 2.2.11
3
+ Version: 2.2.13
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>
@@ -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=result["artistName"],
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
- 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
- )
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
  """
@@ -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.13
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>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes