diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2011-03-21 12:46:56 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2011-03-21 12:46:56 +0100 |
commit | 3ce6e179a94e6000d8dc08650a3614a13a8f29f4 (patch) | |
tree | 8f428fefc44087fd96e9e751f1f7fcea0b74eb7f /src/ui_act.c | |
parent | bbd317d85069dee9c9cffff609d1d1fd086cbcb7 (diff) | |
download | pianobar-3ce6e179a94e6000d8dc08650a3614a13a8f29f4.tar.gz pianobar-3ce6e179a94e6000d8dc08650a3614a13a8f29f4.tar.bz2 pianobar-3ce6e179a94e6000d8dc08650a3614a13a8f29f4.zip |
Initial station manager
Not functional yet.
Diffstat (limited to 'src/ui_act.c')
-rw-r--r-- | src/ui_act.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/ui_act.c b/src/ui_act.c index 096daa1..fc45775 100644 --- a/src/ui_act.c +++ b/src/ui_act.c @@ -528,3 +528,45 @@ BarUiActCallback(BarUiActVolUp) { app->player.scale = BarPlayerCalcScale (app->player.gain + app->settings.volume); } +/* manage station (remove seeds or feedback) + */ +BarUiActCallback(BarUiActManageStation) { + PianoReturn_t pRet; + WaitressReturn_t wRet; + PianoRequestDataGetStationInfo_t reqData; + char selectBuf[2]; + + memset (&reqData, 0, sizeof (reqData)); + reqData.station = selStation; + + BarUiMsg (MSG_INFO, "Fetching station info... "); + BarUiActDefaultPianoCall (PIANO_REQUEST_GET_STATION_INFO, &reqData); + BarUiActDefaultEventcmd ("stationfetchinfo"); + + BarUiMsg (MSG_QUESTION, "Delete [a]rtist/[s]ong seeds or [f]eedback? "); + if (BarReadline (selectBuf, sizeof (selectBuf), "asf", &app->input, + BAR_RL_FULLRETURN, -1)) { + if (selectBuf[0] == 'a') { + PianoArtist_t *artist = BarUiSelectArtist (reqData.info.artistSeeds, + &app->input); + if (artist != NULL) { + BarUiMsg (MSG_INFO, "Deleting artist %s\n", artist->name); + } + } else if (selectBuf[0] == 's') { + PianoSong_t *song = BarUiSelectSong (&app->settings, + reqData.info.songSeeds, &app->input); + if (song != NULL) { + BarUiMsg (MSG_INFO, "Deleting seed %s\n", song->title); + } + } else if (selectBuf[0] == 'f') { + PianoSong_t *song = BarUiSelectSong (&app->settings, + reqData.info.feedback, &app->input); + if (song != NULL) { + BarUiMsg (MSG_INFO, "Deleting feedback for %s\n", song->title); + } + } + } + + PianoDestroyStationInfo (&reqData.info); +} + |