Skip to content

Builder with playlist without Program id crashes #4

@zigdanis

Description

@zigdanis

Hi! First of all thank you for this awesome library:)
Here is the issue that I've encountered while I was using it.
I was trying to parse Master Playlist from the string that I'm receiving from the server.
It crashes because of force unwrapping optional.
Bug related to the regex that I couldn't understand how to fix.

Here is the test case that reproduces the problem:

    func testBuilder_WithoutProgramID_ShouldNotFail() {
        let builder = ManifestBuilder()
        _ = builder.parseMasterPlaylistFromString("#EXTM3U\n#EXT-X-VERSION:2\n#EXT-X-STREAM-INF:BANDWIDTH=300000\ntrack_0_300/playlist.m3u8?t=1482930352&h=VBNpRGL+iqMhSUWVV3IQ4w==\n")
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions