Skip to content

Commit

Permalink
V0.5 - 2015-07-25 - owagner
Browse files Browse the repository at this point in the history
  - fixed script error occuring when playback details where not immediate
    available when starting playback
  • Loading branch information
owagner committed Jul 25, 2015
1 parent 1550393 commit dee5bca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion service.mqtt/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.mqtt" name="MQTT Adapter" version="0.4" provider-name="owagner">
<addon id="service.mqtt" name="MQTT Adapter" version="0.5" provider-name="owagner">
<requires>
<import addon="xbmc.python" version="2.19.0"/>
</requires>
Expand Down
4 changes: 4 additions & 0 deletions service.mqtt/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
V0.5 - 2015-07-25 - owagner
- fixed script error occuring when playback details where not immediate
available when starting playback

V0.4 - 2015-06-16 - owagner
- Settings: MQTT broker address is now a text field and thus allows entering of hostnames
- will now check whether the title information changes during progress
Expand Down
13 changes: 7 additions & 6 deletions service.mqtt/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ def publishdetails():
if not player.isPlaying():
return
res=sendrpc("Player.GetItem",{"playerid":activeplayerid,"properties":["title","streamdetails","file"]})
newtitle=res["result"]["item"]["title"]
newdetail={"kodi_details":res["result"]["item"]}
if newtitle!=lasttitle or newdetail!=lastdetail:
lasttitle=newtitle
lastdetail=newdetail
publish("title",newtitle,newdetail)
if "result" in res:
newtitle=res["result"]["item"]["title"]
newdetail={"kodi_details":res["result"]["item"]}
if newtitle!=lasttitle or newdetail!=lastdetail:
lasttitle=newtitle
lastdetail=newdetail
publish("title",newtitle,newdetail)
publishprogress()

#
Expand Down

0 comments on commit dee5bca

Please sign in to comment.