summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-07-19 12:11:12 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-07-19 12:11:12 +0200
commit00cfc5e626abc51df4b728a064697616cf7aae02 (patch)
tree1ca714e58e7bc8b479b7c08e163c1e26917492c4 /src
parent98813251e60234aac43ef41090980f2771ce2360 (diff)
downloadpianobar-00cfc5e626abc51df4b728a064697616cf7aae02.tar.gz
pianobar-00cfc5e626abc51df4b728a064697616cf7aae02.tar.bz2
pianobar-00cfc5e626abc51df4b728a064697616cf7aae02.zip
Rate "shared stations" correctly by transforming them to private stations
Diffstat (limited to 'src')
-rw-r--r--src/main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index cd92e73..a2d096f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -483,6 +483,16 @@ int main (int argc, char **argv) {
BarUiMsg ("No song playing.\n");
break;
}
+ if (!curStation->isCreator) {
+ BarUiMsg ("Transforming station... ");
+ if (PianoTransformShared (&ph, curStation) ==
+ PIANO_RET_OK) {
+ BarUiMsg ("Ok.\n");
+ } else {
+ BarUiMsg ("Error.\n");
+ break;
+ }
+ }
BarUiMsg ("Banning song... ");
if (PianoRateTrack (&ph, curSong,
PIANO_RATE_BAN) == PIANO_RET_OK) {
@@ -546,6 +556,16 @@ int main (int argc, char **argv) {
BarUiMsg ("Already loved. No need to do this twice.\n");
break;
}
+ if (!curStation->isCreator) {
+ BarUiMsg ("Transforming station... ");
+ if (PianoTransformShared (&ph, curStation) ==
+ PIANO_RET_OK) {
+ BarUiMsg ("Ok.\n");
+ } else {
+ BarUiMsg ("Error.\n");
+ break;
+ }
+ }
BarUiMsg ("Loving song... ");
if (PianoRateTrack (&ph, curSong,
PIANO_RATE_LOVE) == PIANO_RET_OK) {