summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pianobar.15
-rw-r--r--src/settings.c2
-rw-r--r--src/ui_act.c12
-rw-r--r--src/ui_act.h1
4 files changed, 20 insertions, 0 deletions
diff --git a/src/pianobar.1 b/src/pianobar.1
index 7ae7371..14786da 100644
--- a/src/pianobar.1
+++ b/src/pianobar.1
@@ -67,6 +67,11 @@ Add genre station provided by pandora.
Print detailed information about currently played song.
.TP
+.B act_addshared = j
+Add shared station by id. id is a very long integer without "sh" at the
+beginning.
+
+.TP
.B act_songmove = m
Move current song to another station
diff --git a/src/settings.c b/src/settings.c
index e3e811a..63d5937 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -137,6 +137,8 @@ void BarSettingsRead (BarSettings_t *settings) {
{'i', BarUiActSongInfo,
"print verbose information about current song",
"act_songinfo", NULL},
+ {'j', BarUiActAddSharedStation, "add shared station",
+ "act_addshared", NULL},
{'m', BarUiActMoveSong, "move song to different station",
"act_songmove", NULL},
{'n', BarUiActSkipSong, "next song", "act_songnext", NULL},
diff --git a/src/ui_act.c b/src/ui_act.c
index 2ecc9c2..1f73b0e 100644
--- a/src/ui_act.c
+++ b/src/ui_act.c
@@ -126,6 +126,18 @@ void BarUiActCreateStation (BAR_KS_ARGS) {
}
}
+/* add shared station by id
+ */
+void BarUiActAddSharedStation (BAR_KS_ARGS) {
+ char *stationId = NULL;
+
+ if ((stationId = readline ("Station id: ")) != NULL) {
+ BarUiMsg ("Adding shared station... ");
+ BarUiPrintPianoStatus (PianoCreateStation (ph, "sh", stationId));
+ free (stationId);
+ }
+}
+
/* delete current station
*/
void BarUiActDeleteStation (BAR_KS_ARGS) {
diff --git a/src/ui_act.h b/src/ui_act.h
index 9b1ba2b..4eaefbe 100644
--- a/src/ui_act.h
+++ b/src/ui_act.h
@@ -30,6 +30,7 @@ void BarUiActHelp (BAR_KS_ARGS);
void BarUiActAddMusic (BAR_KS_ARGS);
void BarUiActBanSong (BAR_KS_ARGS);
void BarUiActCreateStation (BAR_KS_ARGS);
+void BarUiActAddSharedStation (BAR_KS_ARGS);
void BarUiActDeleteStation (BAR_KS_ARGS);
void BarUiActExplain (BAR_KS_ARGS);
void BarUiActStationFromGenre (BAR_KS_ARGS);