Skip to content

Releases: sigma67/ytmusicapi

v0.16.0

22 Apr 11:55
Compare
Choose a tag to compare

Features ✨

  • get_album_browse_id: get an album's browseId based on it's audioPlaylistId (OLAK...). This is based on the redirect that happens when you open a link in YouTube Music with an audioPlaylistId

Changes βš’

  • BREAKING get_album endpoint has changed for some users due to an ongoing YouTube beta (#173). With this release, get_album will always work, but the format of the data might look different from the documentation if you have the update. Please check if this applies to your account. The documentation will be updated for the new format once the beta is released to all users. For reference, an example of the new format is provided below. A big thanks to @jake-g for providing access to his account to test this update ahead of time.

Fixes 🐞

  • search: fixed a crash if the playlist author was missing for a playlist
  • search: for songs with artists without browseId, these artists are now also returned in the result. This also applies to get_watch_playlist
  • get_artist_albums: fixed an exception for singles missing a release year (#188, thanks @grray )
  • get_artist: fix crash if related artist is missing subscriber number
  • fixed feedbackTokens, which were incorrectly None when a song was already in the library. Now the correct tokens are returned regardless of the current library status

New get_album format

{
  "title": "Revival",
  "type": "Album",
  "thumbnails": [
    {
      "url": "https://lh3.googleusercontent.com/b-euORTq-_MSzc3SyI0QOjLqnCBJbWuMmH1YlyJKAVvJfOpPqv3bFH-KSDoQwV9e8Xey1X2NRo9xZ2U=w60-h60-l90-rj",
      "width": 60,
      "height": 60
    }
  ],
  "description": "Revival is the ninth studio ...",
  "artists": [
    {
      "name": "Eminem",
      "id": "UCedvOgsKFzcK3hA5taf3KoQ"
    }
  ],
  "year": "2017",
  "trackCount": 19,
  "duration": "1 hour, 17 minutes",
  "audioPlaylistId": "OLAK5uy_nMr9h2VlS-2PULNz3M3XVXQj_P3C2bqaY",
  "tracks": [
    {
      "videoId": "iKLU7z_xdYQ",
      "title": "Walk On Water (feat. BeyoncΓ©)",
      "artists": [
        {
          "name": "Eminem",
          "id": "UCedvOgsKFzcK3hA5taf3KoQ"
        }
      ],
      "album": null,
      "likeStatus": "INDIFFERENT",
      "thumbnails": null,
      "isAvailable": true,
      "isExplicit": true,
      "duration": "5:03",
      "feedbackTokens": {
        "add": "AB9zfpJC...",
        "remove": "AB9zfpJT..."
      }
    }
  ]
}

0.15.1

07 Apr 11:39
Compare
Choose a tag to compare

Fixes 🐞

  • search: fixed a crash if a playlist is missing the author

v0.15.0

25 Mar 12:33
Compare
Choose a tag to compare

Features ✨

  • added related artist section to get_artist (thanks @mikefreemanwd )

Changes βš’

  • get_watch_playlist: also accepts playlist browse ids as parameter (starting with "VLPL")
  • BREAKING get_watch_playlist: associated radio playlist is now at the top level of the dictionary as it is the same for every video in the list
  • get_artist: ValueError is now returned if the provided channel Id has no music content (thanks @mikefreemanwd )

Note: get_album may be broken right now for some users due to ongoing testing of a data structure on YouTube's side. A fix is currently being worked on and will be release when the change is live for all users (#173).

v0.14.3

17 Feb 14:53
Compare
Choose a tag to compare

Fixes 🐞

  • search results for songs and albums are more consistent and has default value None for year and album if they are missing
  • added optional videoId parameter to get_watch_playlist_shuffle

v0.14.2

04 Feb 13:52
Compare
Choose a tag to compare

Fixes 🐞

  • get_artist no longer crashes for artists with missing shuffle/radio mix
  • get_library_albums, get_library_artists, get_library_artists, get_library_playlists correctly return continuations again (was broken temporarily in 0.14.0 and 0.14.1)

v0.14.1

01 Feb 16:27
Compare
Choose a tag to compare

Fixes 🐞

  • search parsing was overhauled for song/video results. It should be more reliable and crash less often. If you find any problem or missing information, please open an issue
  • search correctly parses station results. These usually appear when your search includes the term "mix"
  • locale is now correctly set when a language is provided on initialization. This should prevent crashes when using get_playlist with a different language

v0.14.0

29 Jan 17:11
Compare
Choose a tag to compare

Features ✨

  • requests sessions are now used by all requests except uploads per default. This improves performance by pooling TCP connections across requests on the same instance of YTMusic(). You can configure this behavior with the requests_session parameter of YTMusic()
  • added shuffleId, radioId for artist results [search, get_artist, get_library_artists, get_library_subscriptions, get_library_upload_artists] (thanks @PhracturedBlue )
  • added isExplicit key to album and song search results
  • added FAQ in docs

Fixes 🐞

  • get_artist_albums, get_artist_singles and get_user_playlists now work again after a YouTube update
  • fixed a search edge case where unavailable songs could cause the search to crash
  • auth sanity check actually works now. It runs on functions that require being logged in and returns an exception if the user didn't provide authenticated headers

v0.13.1

14 Jan 22:47
Compare
Choose a tag to compare

Fixes 🐞

  • more fixes for video search edge cases (#149)
  • fix get_watch_playlist edge case where length field is missing

v0.13.0

14 Jan 17:14
Compare
Choose a tag to compare

As always, thanks to all contributors for providing helpful debug information and bringing feature requests to my attention. This release contains some minor new features for existing functions and several important bug fixes.

Features ✨

  • get_library_upload_artist: added limit parameter for continuations
  • get_watch_playlist: added artists, album, feedbackTokens and likeStatus
  • isExplicit key is now available on most endpoints returning songs, most notably search, get_playlist and get_album

Changes βš’

  • BREAKING get_lyrics behavior changed. If there are no lyrics, get_watch_playlist will now return None for the lyrics key. The lyricsFound key no longer exists. Instead, get_lyrics will raise an exception if None is passed as the browseId
  • 4xx HTTP error codes from the YouTube Music API will now raise an exception right away, instead of somewhat confusing error messages from parsing errors

Fixes 🐞

  • stop continuation requests if continuation contents are empty (fixes some crashes with continuations)
  • fixed view/duration for video search results with missing duration (#149)
  • fixed get_library_albums error if a library album has no year

v0.12.2

18 Dec 11:49
Compare
Choose a tag to compare

A release a day keeps the bugs away... hopefully.

Changes βš’

  • potentially breaking video search results returned by search now contain an artists key, since videos can now have multiple artists. As with other endpoints, each list entry contains name and id of the artist.
  • if a song search result does not contain an album, the key album will be None again, as it was before 0.12

Fixes 🐞

  • fixed several additional bugs that could cause search to throw an Exception
  • video search results now have correct views and duration fields
  • fixed an issue with parsing the trackCount of playlists (get_playlist) if locale was not set correctly (#125)