Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: stop (or pause) after a song #302

Open
ivotron opened this issue Sep 10, 2012 · 5 comments
Open

Feature request: stop (or pause) after a song #302

ivotron opened this issue Sep 10, 2012 · 5 comments

Comments

@ivotron
Copy link

ivotron commented Sep 10, 2012

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.

@PromyLOPh
Copy link
Owner

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.

@ivotron
Copy link
Author

ivotron commented Sep 15, 2012

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?

@PromyLOPh
Copy link
Owner

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.

@terrin2k
Copy link

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!

@PromyLOPh
Copy link
Owner

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.

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

No branches or pull requests

3 participants