Skip to content

Releases: sigma67/ytmusicapi

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)

v0.12.1

17 Dec 08:29
Compare
Choose a tag to compare

Fixes 🐞

  • some remaining bugs with search are fixed in this update (#121, #122, #123, #124)

v0.12.0

16 Dec 11:27
Compare
Choose a tag to compare

Features ✨

  • get_lyrics: Thanks to @alexmercerind we now have get_lyrics, which returns the lyrics for a given song. To retrieve the required browseId, call get_watch_playlist to get the corresponding

  • edit_song_library_status: Adding songs to library is now possible. YouTube Music recently separated this feature from the Like Button for individual songs. You can now add or remove songs from your library by passing feedbackTokens, which are returned by endpoints that return songs (search,get_playlist,get_library_songs,get_album)

Changes ⚒

  • BREAKING get_watch_playlist no longer directly returns a list of tracks. Instead, a dictionary is now returned with a tracks key containing the same data it returned before. This change was made to provide additional data returned by the next endpoint, which can now be used with get_lyrics
  • get_song result now has a category field (thanks @maraid )

Fixes 🐞

  • search results parsing was broken by a YouTube Music update on December 16. 0.12.0 fixes any errors introduced by this update
  • get_liked_songs now returns the correct trackCount (previously erroneously in the duration field)
  • artist results returned by search now have a browseId again
  • get_artist works again with channel IDs returned by get_library_artists (future plans include a separate endpoint to list the songs in the library by a specific artist, a recently introduced YouTube Music feature)

v0.11.0

30 Nov 15:05
Compare
Choose a tag to compare

Features ✨

  • support continuations for search and search_uploads with new limit parameter (#95, thanks @natumbri )
  • add option to ignore spelling correction for search (#91, thanks @osum4est )
  • added sort order option to library functions get_library_songs, get_library_albums, get_library_artists, get_library_subscriptions, get_library_upload_songs, get_library_upload_albums, get_library_upload_artists (#102, thanks @ide-an )
  • new get_streaming_data call to get authenticated AAC stream data for subscribed users (#108, thanks @corrmaan )

Fixes 🐞

  • Small documentation fix for get_library_artists

v0.10.2

09 Nov 10:58
Compare
Choose a tag to compare

Features ✨

  • added isAvailable flag for songs in playlists (thanks @czifumasa )
  • added duration for uploaded items

Changes 🛠

  • The origin header is now used instead of x-origin. This should not break existing setups
  • 3PAPISID is now used instead of SAPISID for authorization, assuming that they are always equal. If not, please create an issue
  • added X-Goog-AuthUser to required headers (for users with multiple Google accounts)

Fixes 🐞

  • fixed uploads search (server-side changes)
  • updated default headers to fix get_artist_albums and get_user_playlists for non-authenticated users
  • remove_playlist_items: invalid items are now removed from the provided list
  • fixed possible key error in get_continuations if YouTube does not provide data as requested

v0.10.1

04 Oct 18:36
Compare
Choose a tag to compare

Changes ⚒

  • potentially breaking: changed get_library_albums returned artists key to dict with name/id

Fixes 🐞

  • update get_library_albums parsing to new YT Web display format - the values now correspond to the keys
  • get_playlist: parse setVideoId for unplayable items (allows removing unplayable items from playlists)

v0.10.0

17 Sep 12:36
Compare
Choose a tag to compare

Features ✨

  • validated requests are now available for get_library_songs (#52, thanks @czifumasa ). This opt-in behavior allows requests to be repeated up to 3 times since the API is often unreliable and provides less than the expected 25 items
  • search now supports an "uploads" filter to search your uploads
  • added support for Python's with statements (@alexmercerind). Usage:
from ytmusicapi import YTMusic

with YTMusic() as ytmusic:
    print(ytmusic.search('NoCopyrightSounds'))
  • (since 0.9.2) new method remove_history_items allows removing items from history
  • (since 0.9.2) add_playlist_items now supports source playlists, duplicate check

Fixes 🐞

  • get_library_songs, get_library_upload_songs, get_library_artists now return an empty list if the library is empty (instead of an error)
  • fixed an error that would occur when continuation_contents were missing from a continuation (sometimes occurs for get_library_songs)
  • unauthenticated requests to get_album now always contain all tracks (#75, thanks @alexmercerind )
  • using upload_song no longer pollutes the YTMusic instance headers - it should be fine now to reuse the instance after uploading a song (#79)
  • potentially breaking: fixed get_watch_playlist, which was broken by server-side lyrics update

v0.9.2

27 Aug 11:24
Compare
Choose a tag to compare

Features ✨

  • add_playlist_items now supports source playlists, duplicate check
  • new method remove_history_items: Remove items from your account's play history (must be retrieved with get_history before)

Fixes 🐞

  • Fix watch_playlist byline argument - broken by YouTube Music update (#54)
  • Fix get_song if release/production missing
  • Local setup fixed on MacOS (en_US.UTF-8)
  • lowercase is used when parsing headers for better compability with users copying headers from Chromium

v0.9.1

24 Jul 20:33
Compare
Choose a tag to compare

This release fixes a packaging issue with v0.9.0 and makes the package usable again. Below the changes for the 0.9.0 release.

Features ✨

  • get_watch_playlist, get_watch_playlist_shuffle: You can now get watch playlists. Watch playlists are the the playlists of suggested songs that appear in YouTube Music when you press play on a song
  • get_user, get_user_playlists: You can now get information about other users and their uploaded videos and playlists
  • Song metadata is now available via get_song
  • Additional languages are supported since v0.8.1 (fr,it,es,de,ja)

Changes ⚒

  • Potentially breaking: get_playlist now returns a dictionary instead of a string for the author key. It contain's the author's channel id along and the name it previously provided in separate keys id and name

Fixes 🐞

  • Many fixes for get_artist to work with more artists (thanks @grray )
    • Fix exception when album has no year (on artist page)
    • Fix exception when artist has no thumbnail
    • Fix for albums without publication year
    • Fix for artist page, if it has no buttons
    • Fixed: KeyError when artist doesn't have subscribers count
  • Fix continuations to always retrieve at least the specified limit, even if YTMusic returns less than per_page. The get_library_songs endpoint is currently unreliable on YouTube's end, so the behavior of continuations was changed to always fetch more than limit songs, even if the API returns less than expected
  • User-provided headers are no longer rejected. Previously only the cookie would be kept, which meant users using a non-primary Google Account with YouTube Music were unable to use the API (#46)