Closed maxcurzi closed 3 months ago
That looks fine my side!
One thing on my original commit, I wasn't too sure about calling the broker to initiate replay, if that might be called multiple times in the run loop until it takes effect. I can regress that, or if you want to tighten that up a little to prevent that.
One thing on my original commit, I wasn't too sure about calling the broker to initiate replay, if that might be called multiple times in the run loop until it takes effect. I can regress that, or if you want to tighten that up a little to prevent that.
you mean this bit?
if self.loops && frame.is_none() {
self.send_control(MediaControl::Replay)?;
}
That should just happen zero times or once at the end of playback I think (my memory is a bit rusty). I'll merge for now and if we find it's an issue we can address it with a follow up PR
Yes, it was to that I was referring.
thanks for implementing this feature @december1981 ! I'm sure many people will appreciate this new release :)
Not a problem, this is a great little app for fans of the terminal, glad to have contributed.
Thanks @december1981 for adding this feature. I make a couple of tweaks: 1) Implemented a stub "rewind" in case MPV is used. The audio won't loop but at least it will build. 2) Consolidated runner options in one structure 3) Renamed loops to loop_playback. I'm sad we can't use the "loop" keyword so I opted for more clarity/verboseness, I hope you don't mind!