lwilletts / mpvc

An mpc-like control interface for mpv.
MIT License
139 stars 18 forks source link

Build phraser to set absolute time of track with timestamp format. #10

Closed lwilletts closed 8 years ago

heckendorfc commented 8 years ago

Is c309e8a sufficient?

lwilletts commented 8 years ago

I think so, perhaps validate that the user has entered two digits when referring to minutes and seconds however? I'm not massively bothered but I think it would be nice.

heckendorfc commented 8 years ago

Committed 6e23261 with some validation. Feel free to reword/reformat the error message but is this close to what you had in mind?

lwilletts commented 8 years ago

That regex doesn't quite work if you use the '+' symbol in front of the signal digit value like this:

mpvc -t +1m

heckendorfc commented 8 years ago

I didn't think that was a valid syntax. Sign characters should be stripped out by setTimeRelative before passing them to parseTimeString anyway. Updated in cbc8e46.

lwilletts commented 8 years ago

No it wasn't really, the parser just 'ignored' it. Anyway, I think this is finished! Great moves, proud of you!