sigma67/ytmusicapi

`get_playlist` returns `None` for track title

abhishekmj303 opened this issue · 3 comments

Describe the bug
For some playlists in YT Music Featured playlists like: Indian Indie Essentials and Indie Rising returns None for some of the track titles.

For example:

{
    "videoId": "bSAlE_WgHxY",
    "title": null,
    "artists": [
        {
            "name": "Kanishk Seth",
            "id": "UC0PQFdpMlhl5TFYaUFy64yw"
        }
    ],
    "album": null,
    "likeStatus": "INDIFFERENT",
    "inLibrary": null,
    "thumbnails": [
        {
            "url": "https://i.ytimg.com/vi/bSAlE_WgHxY/sddefault.jpg?sqp=-oaymwEWCJADEOEBIAQqCghqEJQEGHgg6AJIWg&rs=AMzJL3nyvyq_o4DzAds4K5E5lFtH7Tynyg",
            "width": 400,
            "height": 225
        }
    ],
    "isAvailable": true,
    "isExplicit": false,
    "videoType": null,
    "views": null,
    "duration": "3:23",
    "duration_seconds": 203
}

Complete response: https://pastebin.com/rWCpb7uT

To Reproduce
Steps to reproduce the behavior:

  1. Create a YTMusic() object
  2. Call get_playlist(playlist_id, limit=None)
  3. Error in getting track's title

Additional context
ytmusicapi version: 1.7.5
Python version: 3.11.9

Edit:
Just tested with other versions, and version 1.7.3 seems to work fine.

I think it's the result of my changes in (#612). The playlist track from your example is not a song, but a podcast episode:
https://music.youtube.com/podcast/bSAlE_WgHxY

It needs another condition in a new logic. I created PR (#623) with a quick fix. After that, it should work the same as in 1.7.3.

@abhishekmj303 please verify that the fix works for you

@czifumasa @sigma67 Yeah, it seems to be working now! Thank You.