stefanodvx / crunpyroll

Async API wrapper for Crunchyroll
MIT License
74 stars 21 forks source link

fix for KeyError SegmentTemplate #27

Open dbalague opened 6 months ago

dbalague commented 6 months ago

When trying to obtain the manifest I would encounter a KeyError with the SegmentTemplate key. That happened when parsing the MPD file if there was a subtitle stream in the manifest. The fix I propose is to check if the SegmentTemplate key exists (that means that the aset is either a video or audio stream), and if that is not the case, then it falls into a subtitle stream for which I added a list in the Manifest class.