Browse Source

set music folder as $music

Toastie 4 years ago
parent
commit
d5a37c58c9
1 changed files with 4 additions and 3 deletions
  1. 4 3
      rfidac/data/_mpd_helper

+ 4 - 3
rfidac/data/_mpd_helper

@@ -1,15 +1,16 @@
 # variables
 mpc="/usr/bin/mpc -h $mpd_host"
+music="/music/"
 
 # functions
 function mpd_play_folder {
   tag = $1
-  mkdir -p /music/$tag
+  mkdir -p $music$tag
   # Update the directory timestamp to indicate the last tag seen
   # Touch the file alone will not update the directory timestamp,
   # so we'll need delete and re-create the file
-  rm /music/$tag/.lastplay
-  touch /music/$tag/.lastplay
+  rm $music$tag/.lastplay
+  touch $music$tag/.lastplay
   $mpc stop
   $mpc clear
   $mpc add $mpd_folder$tag