[GH-ISSUE #837] Title cannot be parsed from audio drama albums #516

Closed
opened 2026-02-27 23:01:13 +03:00 by kerem · 0 comments
Owner

Originally created by @MarvinSchenkel on GitHub (Nov 25, 2025).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/837

  • I confirm that I have read the FAQ

Describe the bug

There are some audio drama albums that fail to parse, as they are missing the album name, which is why the following piece of code inside parsers/playlists.py -> parse_audio_playlist() throws an error: playlist["title"] = playlist["tracks"][0]["album"]["name"]

An example of a failing album is the movie audio from Madagascar 2. I was thinking we might be able to fallback to the playlist name in case the album name of any of the tracks is None. In case of the Madagascar album, this will be Madagascar (Das Original-Hörspiel zum Kinofilm)

Image

I did some digging and we can grab this info from:

Root Object
└── musicResponsiveListItemRenderer
    └── flexColumns (array)
        └── [2] (third element)
            └── musicResponsiveListItemFlexColumnRenderer
                └── text
                    └── runs (array)
                        └── [0] (first element)
                            └── text: "Madagascar (Das Original-Hörspiel zum Kinofilm)"

I am more than happy to open a PR for this, but I will need some guidance on how to properly fit this into all the nav logic.

ytmusicapi version

1.11.2

To Reproduce

Steps to reproduce the behavior:
Simply call ytm.get_playlist("OLAK5uy_nT1mL8aZvxqfIRFN9L8FgIzfvk6HUkd0I")

Additional context

Add any other context about the problem here, such as a code sample.

Originally created by @MarvinSchenkel on GitHub (Nov 25, 2025). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/837 - [x] I confirm that I have read the [FAQ](https://ytmusicapi.readthedocs.io/en/stable/faq.html#why-is-ytmusicapi-returning-more-results-than-requested-with-the-limit-parameter) **Describe the bug** There are some audio drama albums that fail to parse, as they are missing the album name, which is why the following piece of code inside `parsers/playlists.py -> parse_audio_playlist()` throws an error: `playlist["title"] = playlist["tracks"][0]["album"]["name"]` An example of a failing album is the movie audio from [Madagascar 2](https://music.youtube.com/playlist?list=OLAK5uy_nT1mL8aZvxqfIRFN9L8FgIzfvk6HUkd0I). I was thinking we might be able to fallback to the playlist name in case the album name of any of the tracks is `None`. In case of the Madagascar album, this will be `Madagascar (Das Original-Hörspiel zum Kinofilm)` <img width="1173" height="570" alt="Image" src="https://github.com/user-attachments/assets/1ee7e10b-402c-4121-bd53-ce9dde161e9a" /> I did some digging and we can grab this info from: ``` Root Object └── musicResponsiveListItemRenderer └── flexColumns (array) └── [2] (third element) └── musicResponsiveListItemFlexColumnRenderer └── text └── runs (array) └── [0] (first element) └── text: "Madagascar (Das Original-Hörspiel zum Kinofilm)" ``` I am more than happy to open a PR for this, but I will need some guidance on how to properly fit this into all the `nav` logic. **ytmusicapi version** 1.11.2 **To Reproduce** Steps to reproduce the behavior: Simply call `ytm.get_playlist("OLAK5uy_nT1mL8aZvxqfIRFN9L8FgIzfvk6HUkd0I")` **Additional context** Add any other context about the problem here, such as a code sample.
kerem 2026-02-27 23:01:13 +03:00
  • closed this issue
  • added the
    bug
    label
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#516
No description provided.