pianobar icon indicating copy to clipboard operation
pianobar copied to clipboard

Feature request: stop (or pause) after a song

Open ivotron opened this issue 13 years ago • 5 comments

I'd be nice to have the ability to stop (or pause) after a song finishes. Sometimes I pause and by the time I get back, pandora's timeout is reached so pianobar has to reconnect. This is fine but since I use eventcmd, which scrobbles at the end of a song, the song doesn't get scrobbled.

Also, on a more ethical/maniac front, I feel I'm being disrespectful to the gods of music by shutting a song in the middle of it.

ivotron avatar Sep 10 '12 05:09 ivotron

Scrobbling does not work because no event is fired or because the song has not advanced to 1/2 (or whatever amount you use) of its lenght?

Wrt stopping at the end of a song: There’s no real “stop” command/state right now. Workaround: Bring up the station selection. The current song will continue, but the main thread won’t be able to start a new song, because it’s stuck at the song selection screen.

PromyLOPh avatar Sep 14 '12 19:09 PromyLOPh

Because the song hasn't advanced to 1/2 of its length. I guess this answers my question with regards to scrobbling.

The workaround seems OK, I wouldn't mine to see the list when I get back to piano-bar. Do you have a suggestion on where this change would be done in the code?

ivotron avatar Sep 15 '12 12:09 ivotron

Do you have a suggestion on where this change would be done in the code? See BarUiActDeleteStation in ui_act.c. It does exactly what you want: Clear the playlist and stop the player thread.

PromyLOPh avatar Sep 16 '12 11:09 PromyLOPh

With regards to pausing in the middle of a song, I was wondering if it would be possible to continue buffering until the end of the currently-playing song, but stop outputting audio. When the user resumes, play the remainder of the song, then re-authenticate with Pandora if the connection has expired.

This would eliminate the problem of a song abruptly cutting off after resuming from a lengthy pause.

What do you think?

Regards,

~ T

PS - running pianobar on a Beaglebone w/ Ubuntu 12.04 LTS. Most awesome!

terrin2k avatar Nov 29 '12 18:11 terrin2k

I was wondering if it would be possible to continue buffering until the end of the currently-playing song, but stop outputting audio. No, right now that’s not possible. Downloading and playing the file are directly tied together (see src/player.c). Stopping the decoder will stop the download. Patches are welcome.

PromyLOPh avatar Nov 30 '12 15:11 PromyLOPh