summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-07-02 20:46:38 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-07-02 20:46:38 +0200
commita711635a5a031107da3ecc0b0e1c939277e34572 (patch)
treec4f607888402c8d9d62640ab1e47c087fd3f1797 /src
parente3c2af78adaef60de935883bac1155b0e75d4ae1 (diff)
downloadpianobar-a711635a5a031107da3ecc0b0e1c939277e34572.tar.gz
pianobar-a711635a5a031107da3ecc0b0e1c939277e34572.tar.bz2
pianobar-a711635a5a031107da3ecc0b0e1c939277e34572.zip
client: Initial quickmix station selection support
Diffstat (limited to 'src')
-rw-r--r--src/main.c24
-rw-r--r--src/pianobar.14
2 files changed, 26 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 8a96129..744c731 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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 */
diff --git a/src/pianobar.1 b/src/pianobar.1
index bcd5f21..99c04e7 100644
--- a/src/pianobar.1
+++ b/src/pianobar.1
@@ -67,6 +67,10 @@ Ban song for one month.
.B u
Show next songs in playlist.
+.TP
+.B x
+Select quickmix stations.
+
.SH FILES
.I $XDG_CONFIG_HOME/pianobar/config
or