Skip to content

Correctly parse file lines which include negative durations#2

Open
sethhochberg wants to merge 1 commit intodirble:masterfrom
sethhochberg:allow-negative-duration-parsing
Open

Correctly parse file lines which include negative durations#2
sethhochberg wants to merge 1 commit intodirble:masterfrom
sethhochberg:allow-negative-duration-parsing

Conversation

@sethhochberg
Copy link
Copy Markdown

Many implementations of M3U and PLS will consider a negative length to be "unknown" or "ignore" - this is particularly common with internet streams, but is occasionally seen with actual files, too. The current regex match here will fail when attempting to parse file lines with these negative durations.

http://forums.winamp.com/showthread.php?threadid=65772

m3uzi-451f6d7a767f/lib/m3uzi.rb:329:in `parse_file_tag': undefined method `values_at' for nil:NilClass (NoMethodError)

This PR fixes the regex to detect negative durations when present, and parse them correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant