mirror of
https://github.com/v0l/m3u8-rs.git
synced 2025-06-22 03:02:50 +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:

committed by
GitHub

parent
4ed378772b
commit
b810687652
@ -622,6 +622,8 @@ impl MediaSegment {
|
|||||||
|
|
||||||
if let Some(ref v) = self.title {
|
if let Some(ref v) = self.title {
|
||||||
writeln!(w, "{}", v)?;
|
writeln!(w, "{}", v)?;
|
||||||
|
} else {
|
||||||
|
write!(w, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
writeln!(w, "{}", self.uri)
|
writeln!(w, "{}", self.uri)
|
||||||
|
Reference in New Issue
Block a user