diff options
author | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-07-02 20:46:38 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-07-02 20:46:38 +0200 |
commit | a711635a5a031107da3ecc0b0e1c939277e34572 (patch) | |
tree | c4f607888402c8d9d62640ab1e47c087fd3f1797 /src/main.c | |
parent | e3c2af78adaef60de935883bac1155b0e75d4ae1 (diff) | |
download | pianobar-a711635a5a031107da3ecc0b0e1c939277e34572.tar.gz pianobar-a711635a5a031107da3ecc0b0e1c939277e34572.tar.bz2 pianobar-a711635a5a031107da3ecc0b0e1c939277e34572.zip |
client: Initial quickmix station selection support
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -85,7 +85,8 @@ PianoStation_t *BarUiSelectStation (PianoHandle_t *ph) { printf ("which station do you want to listen to?\n"); curStation = ph->stations; while (curStation != NULL) { - printf ("%2i) %s\n", i, curStation->name); + printf ("%2i) %s%s\n", i, curStation->name, + curStation->useQuickMix ? " (QuickMix)" : ""); curStation = curStation->next; i++; } @@ -376,7 +377,8 @@ int main (int argc, char **argv) { "r\trename current station\n" "s\tchange station\n" "t\ttired (ban song for 1 month)\n" - "u\tupcoming songs\n"); + "u\tupcoming songs\n" + "x\tselect quickmix stations\n"); break; case 'a': @@ -562,6 +564,24 @@ int main (int argc, char **argv) { nextSong = nextSong->next; } break; + + case 'x': + if (curStation->isQuickMix) { + PianoStation_t *selStation; + while ((selStation = + BarUiSelectStation (&ph)) != NULL) { + selStation->useQuickMix = !selStation->useQuickMix; + } + BarUiMsg ("Setting quickmix stations... "); + if (PianoSetQuickmix (&ph) == PIANO_RET_OK) { + BarUiMsg ("Ok.\n"); + } else { + BarUiMsg ("Error.\n"); + } + } else { + BarUiMsg ("Not a QuickMix station.\n"); + } + break; } /* end case */ } /* end poll */ |