mirror of
https://github.com/rutgersc/m3u8-rs.git
synced 2024-11-15 21:21:08 +00:00
fixed issue with #EXTINF without titles
in #EXTINF tag, when comma `,` after segment duration immediately follows by `\n` the `title` is not getting populated and is not printed with `writeln!` The problem is created by the nom 5 conversion, where `take_until_either_and_consume!` macro was replaced with `is_not!` + `take!(1)`. However, in case when `opt!(take_until_either_and_consume!` is used, everything gets way too hairy. I couldn't to expressed that in a fairly elegant manner and instead fixed the data presentation, when a new manifest is produced. While storing `\n` in a form of `title` is a nice hack, I'm also convinced this is a better approach to data handling.
This commit is contained in:
parent
4ed378772b
commit
b810687652
1 changed files with 2 additions and 0 deletions
|
@ -622,6 +622,8 @@ impl MediaSegment {
|
|||
|
||||
if let Some(ref v) = self.title {
|
||||
writeln!(w, "{}", v)?;
|
||||
} else {
|
||||
write!(w, "\n");
|
||||
}
|
||||
|
||||
writeln!(w, "{}", self.uri)
|
||||
|
|
Loading…
Reference in a new issue