[GH-ISSUE #306] {0.23/0.24} [get_watch_playlist] Unable to retreive album key #238

Closed
opened 2026-02-27 22:08:46 +03:00 by kerem · 1 comment
Owner

Originally created by @JibayMcs on GitHub (Oct 4, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/306

Hi !

According to the documentation on get_watch_playlist() returned response have the key "album": {}

But in version 0.23 and 0.24 this key is missing in the response, example below:

Example response in 0.23/24
{
  "tracks": [
    {
      "videoId": "FGBhQbmPwH8",
      "title": "One More Time",
      "length": "5:22",
      "thumbnail": [
        {
          "url": "https://i.ytimg.com/vi/FGBhQbmPwH8/sddefault.jpg?sqp=-oaymwEWCJADEOEBIAQqCghqEJQEGHgg6AJIWg&rs=AMzJL3kGOAdh6xKcfNV2rDldmgWP0D2g_g",
          "width": 400,
          "height": 225
        },
        {
          "url": "https://i.ytimg.com/vi/FGBhQbmPwH8/hq720.jpg?sqp=-oaymwEXCKAGEMIDIAQqCwjVARCqCBh4INgESFo&rs=AMzJL3nx2N07RnrhIEIDo22JzTJmmJ0oRw",
          "width": 800,
          "height": 450
        },
        {
          "url": "https://i.ytimg.com/vi/FGBhQbmPwH8/hq720.jpg?sqp=-oaymwEXCNUGEOADIAQqCwjVARCqCBh4INgESFo&rs=AMzJL3mOjJTrYPz5tyqzSNVd1Lfd_xr7zQ",
          "width": 853,
          "height": 480
        }
      ],
      "feedbackTokens": null,
      "likeStatus": "INDIFFERENT",
      "videoType": "MUSIC_VIDEO_TYPE_OMV",
      "artists": [
        {
          "name": "Daft Punk",
          "id": "UCRr1xG_2WIDs18a6cIiCxeA"
        }
      ],
      "views": "2.5M",
      "counterpart": {
        "videoId": "fa5IWHDbftI",
        "title": "One More Time",
        "length": "5:21",
        "thumbnail": [
          {
            "url": "https://lh3.googleusercontent.com/6Qy_3-Unlf67FwRfF75ghzWw__5wmbJjAg7x6p8qQqMdRxvvFCEmyFlEedmbunivDbF-yUEXbb3AVI0=w60-h60-l90-rj",
            "width": 60,
            "height": 60
          },
          {
            "url": "https://lh3.googleusercontent.com/6Qy_3-Unlf67FwRfF75ghzWw__5wmbJjAg7x6p8qQqMdRxvvFCEmyFlEedmbunivDbF-yUEXbb3AVI0=w120-h120-l90-rj",
            "width": 120,
            "height": 120
          },
          {
            "url": "https://lh3.googleusercontent.com/6Qy_3-Unlf67FwRfF75ghzWw__5wmbJjAg7x6p8qQqMdRxvvFCEmyFlEedmbunivDbF-yUEXbb3AVI0=w180-h180-l90-rj",
            "width": 180,
            "height": 180
          },
          {
            "url": "https://lh3.googleusercontent.com/6Qy_3-Unlf67FwRfF75ghzWw__5wmbJjAg7x6p8qQqMdRxvvFCEmyFlEedmbunivDbF-yUEXbb3AVI0=w226-h226-l90-rj",
            "width": 226,
            "height": 226
          },
          {
            "url": "https://lh3.googleusercontent.com/6Qy_3-Unlf67FwRfF75ghzWw__5wmbJjAg7x6p8qQqMdRxvvFCEmyFlEedmbunivDbF-yUEXbb3AVI0=w302-h302-l90-rj",
            "width": 302,
            "height": 302
          },
          {
            "url": "https://lh3.googleusercontent.com/6Qy_3-Unlf67FwRfF75ghzWw__5wmbJjAg7x6p8qQqMdRxvvFCEmyFlEedmbunivDbF-yUEXbb3AVI0=w544-h544-l90-rj",
            "width": 544,
            "height": 544
          }
        ],
        "feedbackTokens": null,
        "likeStatus": "INDIFFERENT",
        "videoType": "MUSIC_VIDEO_TYPE_ATV",
        "artists": [
          {
            "name": "Daft Punk",
            "id": null
          }
        ]
      }
    },
    { [...] }
]
Example response from the documentation
{
    "tracks": [
        {
          "videoId": "9mWr4c_ig54",
          "title": "Foolish Of Me (feat. Jonathan Mendelsohn)",
          "length": "3:07",
          "thumbnail": [
            {
              "url": "https://lh3.googleusercontent.com/ulK2YaLtOW0PzcN7ufltG6e4ae3WZ9Bvg8CCwhe6LOccu1lCKxJy2r5AsYrsHeMBSLrGJCNpJqXgwczk=w60-h60-l90-rj",
              "width": 60,
              "height": 60
            }...
          ],
          "feedbackTokens": {
            "add": "AB9zfpIGg9XN4u2iJ...",
            "remove": "AB9zfpJdzWLcdZtC..."
          },
          "likeStatus": "INDIFFERENT",
          "videoType": "MUSIC_VIDEO_TYPE_ATV",
          "artists": [
            {
              "name": "Seven Lions",
              "id": "UCYd2yzYRx7b9FYnBSlbnknA"
            },
            {
              "name": "Jason Ross",
              "id": "UCVCD9Iwnqn2ipN9JIF6B-nA"
            },
            {
              "name": "Crystal Skies",
              "id": "UCTJZESxeZ0J_M7JXyFUVmvA"
            }
          ],
          "album": {
            "name": "Foolish Of Me",
            "id": "MPREb_C8aRK1qmsDJ"
          },
          "year": "2020",
          "counterpart": {
            "videoId": "E0S4W34zFMA",
            "title": "Foolish Of Me [ABGT404] (feat. Jonathan Mendelsohn)",
            "length": "3:07",
            "thumbnail": [...],
            "feedbackTokens": null,
            "likeStatus": "LIKE",
            "artists": [
              {
                "name": "Jason Ross",
                "id": null
              },
              {
                "name": "Seven Lions",
                "id": null
              },
              {
                "name": "Crystal Skies",
                "id": null
              }
            ],
            "views": "6.6K"
          }
        },...
    ],
    "playlistId": "RDAMVM4y33h81phKU",
    "lyrics": "MPLYt_HNNclO0Ddoc-17"
}

It's a normal behaviour ? Or something changed while retreiving informations from the core API ?
Maybe due to a newest version on the web page of Youtube Music ?

Thanks for your reply !

Originally created by @JibayMcs on GitHub (Oct 4, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/306 Hi ! According to the documentation on `get_watch_playlist()` returned response have the key `"album": {}` But in version 0.23 and 0.24 this key is missing in the response, example below: <details> <summary>Example response in 0.23/24</summary> ```json { "tracks": [ { "videoId": "FGBhQbmPwH8", "title": "One More Time", "length": "5:22", "thumbnail": [ { "url": "https://i.ytimg.com/vi/FGBhQbmPwH8/sddefault.jpg?sqp=-oaymwEWCJADEOEBIAQqCghqEJQEGHgg6AJIWg&rs=AMzJL3kGOAdh6xKcfNV2rDldmgWP0D2g_g", "width": 400, "height": 225 }, { "url": "https://i.ytimg.com/vi/FGBhQbmPwH8/hq720.jpg?sqp=-oaymwEXCKAGEMIDIAQqCwjVARCqCBh4INgESFo&rs=AMzJL3nx2N07RnrhIEIDo22JzTJmmJ0oRw", "width": 800, "height": 450 }, { "url": "https://i.ytimg.com/vi/FGBhQbmPwH8/hq720.jpg?sqp=-oaymwEXCNUGEOADIAQqCwjVARCqCBh4INgESFo&rs=AMzJL3mOjJTrYPz5tyqzSNVd1Lfd_xr7zQ", "width": 853, "height": 480 } ], "feedbackTokens": null, "likeStatus": "INDIFFERENT", "videoType": "MUSIC_VIDEO_TYPE_OMV", "artists": [ { "name": "Daft Punk", "id": "UCRr1xG_2WIDs18a6cIiCxeA" } ], "views": "2.5M", "counterpart": { "videoId": "fa5IWHDbftI", "title": "One More Time", "length": "5:21", "thumbnail": [ { "url": "https://lh3.googleusercontent.com/6Qy_3-Unlf67FwRfF75ghzWw__5wmbJjAg7x6p8qQqMdRxvvFCEmyFlEedmbunivDbF-yUEXbb3AVI0=w60-h60-l90-rj", "width": 60, "height": 60 }, { "url": "https://lh3.googleusercontent.com/6Qy_3-Unlf67FwRfF75ghzWw__5wmbJjAg7x6p8qQqMdRxvvFCEmyFlEedmbunivDbF-yUEXbb3AVI0=w120-h120-l90-rj", "width": 120, "height": 120 }, { "url": "https://lh3.googleusercontent.com/6Qy_3-Unlf67FwRfF75ghzWw__5wmbJjAg7x6p8qQqMdRxvvFCEmyFlEedmbunivDbF-yUEXbb3AVI0=w180-h180-l90-rj", "width": 180, "height": 180 }, { "url": "https://lh3.googleusercontent.com/6Qy_3-Unlf67FwRfF75ghzWw__5wmbJjAg7x6p8qQqMdRxvvFCEmyFlEedmbunivDbF-yUEXbb3AVI0=w226-h226-l90-rj", "width": 226, "height": 226 }, { "url": "https://lh3.googleusercontent.com/6Qy_3-Unlf67FwRfF75ghzWw__5wmbJjAg7x6p8qQqMdRxvvFCEmyFlEedmbunivDbF-yUEXbb3AVI0=w302-h302-l90-rj", "width": 302, "height": 302 }, { "url": "https://lh3.googleusercontent.com/6Qy_3-Unlf67FwRfF75ghzWw__5wmbJjAg7x6p8qQqMdRxvvFCEmyFlEedmbunivDbF-yUEXbb3AVI0=w544-h544-l90-rj", "width": 544, "height": 544 } ], "feedbackTokens": null, "likeStatus": "INDIFFERENT", "videoType": "MUSIC_VIDEO_TYPE_ATV", "artists": [ { "name": "Daft Punk", "id": null } ] } }, { [...] } ] ``` </details> <details> <summary>Example response from the documentation</summary> ```json { "tracks": [ { "videoId": "9mWr4c_ig54", "title": "Foolish Of Me (feat. Jonathan Mendelsohn)", "length": "3:07", "thumbnail": [ { "url": "https://lh3.googleusercontent.com/ulK2YaLtOW0PzcN7ufltG6e4ae3WZ9Bvg8CCwhe6LOccu1lCKxJy2r5AsYrsHeMBSLrGJCNpJqXgwczk=w60-h60-l90-rj", "width": 60, "height": 60 }... ], "feedbackTokens": { "add": "AB9zfpIGg9XN4u2iJ...", "remove": "AB9zfpJdzWLcdZtC..." }, "likeStatus": "INDIFFERENT", "videoType": "MUSIC_VIDEO_TYPE_ATV", "artists": [ { "name": "Seven Lions", "id": "UCYd2yzYRx7b9FYnBSlbnknA" }, { "name": "Jason Ross", "id": "UCVCD9Iwnqn2ipN9JIF6B-nA" }, { "name": "Crystal Skies", "id": "UCTJZESxeZ0J_M7JXyFUVmvA" } ], "album": { "name": "Foolish Of Me", "id": "MPREb_C8aRK1qmsDJ" }, "year": "2020", "counterpart": { "videoId": "E0S4W34zFMA", "title": "Foolish Of Me [ABGT404] (feat. Jonathan Mendelsohn)", "length": "3:07", "thumbnail": [...], "feedbackTokens": null, "likeStatus": "LIKE", "artists": [ { "name": "Jason Ross", "id": null }, { "name": "Seven Lions", "id": null }, { "name": "Crystal Skies", "id": null } ], "views": "6.6K" } },... ], "playlistId": "RDAMVM4y33h81phKU", "lyrics": "MPLYt_HNNclO0Ddoc-17" } ``` </details> It's a normal behaviour ? Or something changed while retreiving informations from the core API ? Maybe due to a newest version on the web page of Youtube Music ? Thanks for your reply !
kerem 2026-02-27 22:08:46 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@sigma67 commented on GitHub (Oct 5, 2022):

Each track has an album key, correct. The issue is that you're getting video type results (indicated by the views key, only present on videos currently). Actual videos don't have an album.

<!-- gh-comment-id:1268043163 --> @sigma67 commented on GitHub (Oct 5, 2022): Each track has an album key, correct. The issue is that you're getting video type results (indicated by the `views` key, only present on videos currently). Actual videos don't have an album.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#238
No description provided.