emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] emms-seek and emms-seek-to


From: Yoni Rabkin
Subject: Re: [PATCH] emms-seek and emms-seek-to
Date: Tue, 06 Sep 2022 14:12:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)

Petteri Hintsanen <petterih@iki.fi> writes:

> Hello Emms people,
>
> While playing longer recordings I found out that emms seeking could be
> improved.  So please find attached a patch that modifies emms-seek and
> emms-seek-to functions to accept timestamps in addition to seconds (as
> they do now).  Timespec format follows ffmpeg (see ffmpeg-utils(5) and
> Time Duration there):
>
> - Single number is interpreted as seconds to seek.  This is equivalent
>   to the current behavior.
>
> - Timestamp format is "hh:mm:ss" where hh part is optional.  It is
>   either relative (emms-seek) or absolute (emms-seek-to).  Relative
>   timestamp can be negative, e.g.:
>   . "-1:14:22" means "seek 1 hour 14 minutes and 22 seconds backwards"
>   .  "23:12.5" means "seek 23 minutes and 12.5 seconds forwards"
>
> The implementation is lax: it does not do any error checking and relies
> on string-to-number to handle nonsensical inputs (in which case
> string-to-number returns zero).  So one can specify meaningless
> timestamps like "1+:xz:-22" which is interpreted as "1:00:22" => 3622
> seconds.  I'm not sure if this is what we want, but OTOH I think we
> shouldn't be too strict either.
>
> What do you think, does this make sense?

Yes, I think that this is a good idea. I've applied it to the git repo
so that others can try it out and provide feedback ahead of the next
release.


-- 
   "Cut your own wood and it will warm you twice"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]