+ res=mpd_send(m,"setvol "..(volume+volstep))
+
+elseif string.starts(command,"fastfwd") then
+
+ cmd=split(command,"|")
+ skip=tonumber(cmd[2])
+ if not skip then
+ skip=15
+ end
+
+ status=mpd_send(m,"status")
+ rec_time=status["time"]
+ song=status["song"]
+
+ if song then
+
+ if rec_time then
+ rec_time=split(rec_time,":")
+ cur_time=tonumber(rec_time[1])
+
+ track_time=tonumber(rec_time[2])
+ cur_time=cur_time+skip
+ if cur_time>track_time then
+ cur_time=track_time
+ end
+
+ mpd_send(m,"seek "..song.." "..cur_time)
+
+ else
+
+ mpd_send(m,"play")
+
+ end
+
+ end
+
+ res={}
+
+elseif string.starts(command,"rewind") then
+
+ cmd=split(command,"|")
+ skip=tonumber(cmd[2])
+ if not skip then
+ skip=15
+ end
+
+ status=mpd_send(m,"status")
+ rec_time=status["time"]
+ song=status["song"]
+
+ if song then
+
+ if rec_time then
+ rec_time=split(rec_time,":")
+ cur_time=tonumber(rec_time[1])
+
+ track_time=tonumber(rec_time[2])
+ cur_time=cur_time-skip
+ if cur_time<0 then
+ cur_time=0
+ end
+
+ mpd_send(m,"seek "..song.." "..cur_time)
+
+ else
+
+ mpd_send(m,"play")
+ mpd_send(m,"previous")
+
+ end
+
+ end
+
+ res={}
+