pianobar
pianobar copied to clipboard
Refresh station list
Would there be a way to trigger usergetstations to be able to update an external station list without restarting pianobar?
Right now there is none. Why do you want to update the station list?
If I have pianobar running while I create a new Pandora station, I'm unable to play my new station until I restart pianobar. And I would like to be able to refresh it without shutting it down and having to re-login again.
If I have pianobar running while I create a new Pandora station, I'm unable to play my new station until I restart pianobar. Well, there’s no point in running two Pandora clients at the same time imho. Given that it’s a rather unusual use-case I think that asking for a restart is not too much. However, it is trivial (free the old station list, fetch a new one) to add such a command and you’re free to press the fork button above and add it yourself :)
The use case isn't all that rare. Anyone who uses pandora on two+ machines will run into issues of one not being synced to the other. This could be as simple as a family sharing an account. In my case, I leave pianobar running on a headless client at work. I pause when I go to lunch, and in the meanwhile I switch over to my phone and create a station. When I get back, and unpause, it would be nice to be able to switch to that station without having to restart pianobar.
Here’s a patch: https://gist.github.com/6032071
I won’t apply it to master though, as there are way too many keyboard shortcuts already imo and reloading the station list is as easy as restarting pianobar.
@jacroe I'm guessing this is for your remote control (?), as you might know I'm working on a similar project and worked around it by repopulating the station list using the event command file on create/delete station (and using the "e" command which I'm not using for anything else to repopulate it on genre create station because of a bug in older versions of pianobar). The eventcommand file I'm using is here: http://raspberrypiserver.no-ip.org/eventcommand.sh
I think the reload stations shortcut already exists! It's: ^C !! \n (Control-C and two exclamation marks and a return character).