PromyLOPh / pianobar

Console-based pandora.com player
http://6xq.net/pianobar/
Other
1.74k stars 323 forks source link

possible to auto-retry after access denied? #626

Closed akariley closed 6 years ago

akariley commented 7 years ago

Stupid...enter should not auto-submit a blank entry... Anyway, can you auto-retry the current station after an access denied?

https://pastebin.com/q7qbSQie

PromyLOPh commented 7 years ago

Sorry for the delay. I’m not sure automatic retries are appropriate here. A retry usually fails as well (c.f. your paste) and there’s no way of knowing how long the error persists i.e. how long pianobar should wait between retries. Also I’m not sure what causes the error.

akariley commented 7 years ago

Normally it rarely happens, but I can increase the chances if I interrupt via ctrl+c while retrieving playlist takes too long.

Also, 4 days is not that long of a delay. No worries! :)

Also, it rarely / never happens on any station but thumbprint radio. I'm wondering if it's running out of suggestions and errors out?

sharpentheaxe commented 6 years ago

Hi, I would also like to have a retry if the network fails to connect. Is there a way to do this through the eventcmd? Can I detect a particular network error event then wait a set time in the script and then restart pianobar?

PromyLOPh commented 6 years ago

libcurl’s return code and error text are available to your script. Check the wRet and wRetStr keys. You can certainly restart pianobar, but retrying a particular operation won’t be easy.