Permalink
Browse files

Set station to be the default mode for favorites

  • Loading branch information...
1 parent 31f47de commit 0a8ddb415c18e14c0260a6658453d2a09f2d5834 @mjsteger mjsteger committed Apr 1, 2011
Showing with 13 additions and 8 deletions.
  1. +13 −8 src/ui_act.c
View
21 src/ui_act.c
@@ -319,20 +319,25 @@ BarUiActCallback(BarUiActLoveSong) {
reqData.song = app->playlist;
reqData.rating = PIANO_RATE_LOVE;
char loveSongCopy[1000];
- if(app->settings.setFavoriteFormat && (strcmp(app->settings.setFavoriteFormat, "station")) == 0){
- sprintf(loveSongCopy, "mkdir -p \"$HOME/Music/pianobarplus/favorites/%s/\" && ln -f \"$HOME/Music/pianobarplus/artists/%s/%s/%s.mp3\" \"$HOME/Music/pianobarplus/favorites/%s/%s.mp3\"",
- app->curStation->name,
- reqData.song->artist, reqData.song->album, reqData.song->title,
- app->curStation->name, reqData.song->title);
- }
- else{
+ if(app->settings.setFavoriteFormat && (strcmp(app->settings.setFavoriteFormat, "canonical")) == 0){
sprintf(loveSongCopy, "mkdir -p \"$HOME/Music/pianobarplus/favorites/%s/%s/\" && ln -f \"$HOME/Music/pianobarplus/artists/%s/%s/%s.mp3\" \"$HOME/Music/pianobarplus/favorites/%s/%s/%s.mp3\"",
reqData.song->artist, reqData.song->album,
reqData.song->artist, reqData.song->album, reqData.song->title,
reqData.song->artist, reqData.song->album, reqData.song->title);
}
+ else if(app->settings.setFavoriteFormat && (strcmp(app->settings.setFavoriteFormat, "hybrid")) == 0){
+ sprintf(loveSongCopy, "mkdir -p \"$HOME/Music/pianobarplus/favorites/%s/%s/%s/\" && ln -f \"$HOME/Music/pianobarplus/artists/%s/%s/%s.mp3\" \"$HOME/Music/pianobarplus/favorites/%s/%s/%s/%s.mp3\"",
+ app->curStation->name, reqData.song->artist, reqData.song->album,
+ reqData.song->artist, reqData.song->album, reqData.song->title,
+ app->curStation->name, reqData.song->artist, reqData.song->album, reqData.song->title);
+ }
+ else{
+ sprintf(loveSongCopy, "mkdir -p \"$HOME/Music/pianobarplus/favorites/%s/\" && ln -f \"$HOME/Music/pianobarplus/artists/%s/%s/%s.mp3\" \"$HOME/Music/pianobarplus/favorites/%s/%s.mp3\"",
+ app->curStation->name,
+ reqData.song->artist, reqData.song->album, reqData.song->title,
+ app->curStation->name, reqData.song->title);
+ }
system(loveSongCopy);
-
BarUiMsg (MSG_INFO, "Loving song... ");
BarUiActDefaultPianoCall (PIANO_REQUEST_RATE_SONG, &reqData);
BarUiActDefaultEventcmd ("songlove");

0 comments on commit 0a8ddb4

Please sign in to comment.