Entire response fails when chapters
doesn't exist
#139
Labels
bug
Something isn't working
medium priority
A high-priority issue noticeable by the user but he can still work around it.
quick
A task that should take less than two hours to complete.
If
chapters
are not defined for a video, the API endpoint returns junk -- either a500
failure or a200
with an empty response.This presents a problem when asking for multiple
part
s , as the entire response fails...To test, take two videos:
One with chapters -- https://www.youtube.com/watch?v=ygAqYC8JOQI
One without -- https://www.youtube.com/watch?v=OmnkUlh6fzo
Video with chapters, asking for chapters along with other data: success!
https://yt.lemnoslife.com/videos?part=id,status,contentDetails,mostReplayed,chapters&id=ygAqYC8JOQI
Video without chapters, asking for chapters along with other data, entire response fails [either a 500 or an empty 200 response]:
https://yt.lemnoslife.com/videos?part=id,status,contentDetails,mostReplayed,chapters&id=OmnkUlh6fzo
...and just as a sanity test, the video without chapters but asking for just non-chapters data is a success!
https://yt.lemnoslife.com/videos?part=id,status,contentDetails,mostReplayed&id=OmnkUlh6fzo
I imagine an appropriate fix might just return
"chapters": null
Current workaround: One could ask for
part=chapters
in a separate request, but perhaps that's extra server overhead for your hosted API?BTW, thanks for creating and maintaining this repo, its very useful and much appreciated.
The text was updated successfully, but these errors were encountered: