Skip to content
Snippets Groups Projects
Commit 93f89bac authored by 42loop's avatar 42loop
Browse files

added seek command

parent c536b733
Branches
No related tags found
No related merge requests found
......@@ -105,7 +105,7 @@ def publishmedialist(suffix,val,more):
global topic,mqc
fulltopic="media/"+topic+suffix
mqttlogging("MQTT: Publishing @"+fulltopic+": "+val)
mqc.publish(fulltopic,val,qos=0,retain=True)
mqc.publish(fulltopic,val,qos=0,retain=False)
#
......@@ -282,6 +282,11 @@ def processvolume(data):
mqttlogging("have volume command")
xbmc.executebuiltin('SetVolume('+data+')')
def processseek(data):
global player
mqttlogging("have seek command")
player.seekTime(float(data))
# xbmc.executebuiltin('SetVolume('+data+')')
def processgetstatus():
publishstatus()
......@@ -312,6 +317,8 @@ def processcommand(topic,data):
processvolume(data)
elif topic=="getmedia":
processgetmedia()
elif topic=="seek":
processseek(data)
else:
mqttlogging("MQTT: Unknown command "+topic)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment