Browse Source

added comments

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

+ 4 - 1
rfidac/data/_mpd_helper

@@ -5,6 +5,9 @@ mpc="/usr/bin/mpc -h $mpd_host"
 function play_folder {
   tag = $1
   mkdir -p /music/$tag
+  # Update the directory timestamp to indicate what was the last tag found
+  # Touch the file alone will not update the directory timestamp,
+  # so we'll need delete and recreate the file
   rm /music/$tag/.lastplay
   touch /music/$tag/.lastplay
   $mpc stop
@@ -17,7 +20,7 @@ function play_folder {
 function mpd_play {
   $mpc stop
   $mpc clear
-  $mpc add "$mpd_folder$1"
+  $mpc add "$1"
   _ensure_volume_10
   $mpc play 1
 }