m3u8-rs icon indicating copy to clipboard operation
m3u8-rs copied to clipboard

WIP: Adding lenient parsing

Open vagetman opened this issue 2 years ago • 6 comments

@sdroege how does this approach sound to you?

vagetman avatar Feb 14 '23 17:02 vagetman

I would either make that the normal behaviour, or make it a runtime parameter. Using a cargo feature for this sounds potentially problematic and surprising because it would be enabled once at least one crate in your dependency tree uses it.

sdroege avatar Feb 14 '23 17:02 sdroege

I would either make that the normal behaviour, or make it a runtime parameter. Using a cargo feature for this sounds potentially problematic and surprising because it would be enabled once at least one crate in your dependency tree uses it.

Hm... a runtime parameter to an app would mean another methods or additional parameters to existing functions (the latter is worse because it'd break dependencies and we would have to cut another version)

vagetman avatar Feb 14 '23 17:02 vagetman

I think I'd simply make it the default and only behaviour as long as it's for things like this where it's basically impossible for it to cause misbehaviour.

sdroege avatar Feb 15 '23 07:02 sdroege

If I'm hearing you right you're suggesting to ingest manifests as is but won't render wrong attributes back if they shouldn't be there in the first place (aka not by the standard). Is it correct summary?

vagetman avatar Feb 15 '23 15:02 vagetman

Yes, unless those wrong attributes are specifically added to other_attributes or similar. That way we can parse more things but at least won't produce garbage unless the user explicitly asks for it.

sdroege avatar Feb 15 '23 16:02 sdroege

How should we proceed here?

sdroege avatar Apr 13 '23 06:04 sdroege