diff --git a/README.md b/README.md index 2c62075..a4ff161 100644 --- a/README.md +++ b/README.md @@ -67,12 +67,12 @@ match parsed { } ``` -Currently the parser will succeed even if REQUIRED attributes/tags are missing from a playlist (such as the `#EXT-X-VERSION` tag). +Currently, the parser will succeed even if REQUIRED attributes/tags are missing from a playlist (such as the `#EXT-X-VERSION` tag). The option to abort parsing when attributes/tags are missing may be something to add later on. # Structure Summary -All of the details about the structs are taken from https://tools.ietf.org/html/draft-pantos-http-live-streaming-19. +All the details about the structs are taken from https://tools.ietf.org/html/draft-pantos-http-live-streaming-19. ```rust @@ -91,6 +91,8 @@ pub struct MasterPlaylist { pub session_key: Option, pub start: Option, pub independent_segments: bool, + pub alternatives: Vec, + pub unknown_tags: Vec, } pub struct MediaPlaylist { @@ -131,6 +133,7 @@ pub struct MediaSegment { pub map: Option, pub program_date_time: Option, pub daterange: Option, + pub unknown_tags: Vec, } ``` diff --git a/src/playlist.rs b/src/playlist.rs index a1c71d0..9bd2f17 100644 --- a/src/playlist.rs +++ b/src/playlist.rs @@ -715,7 +715,7 @@ mod test { }; let mut output = Vec::new(); - write!(output, "{}", cue_out_tag); + write!(output, "{}", cue_out_tag).unwrap(); assert_eq!(std::str::from_utf8(output.as_slice()).unwrap(), "#EXT-X-CUE-OUT:DURATION=30") } @@ -728,7 +728,7 @@ mod test { }; let mut output = Vec::new(); - write!(output, "{}", cue_in_tag); + write!(output, "{}", cue_in_tag).unwrap(); assert_eq!(std::str::from_utf8(output.as_slice()).unwrap(), "#EXT-X-CUE-IN") }