Skip to content

Commit

Permalink
Fix #4
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddavo committed Jan 4, 2017
1 parent d1aaedb commit d299c91
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 13 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# Kodi

## Installing
1. Download the .zip [here](https://github.com/SIMKL/script.service.simkl/blob/master/script.simkl.zip)
1. Download the .zip [here](https://github.com/SIMKL/script.simkl/releases/latest)
2. Open Kodi and go to Settings > Add-ons > Install from zip file, select the zip file
3. In Settings > Add-ons > My add-ons and search for Simkl TV Tracker. Click on it.
4. Click on Configure to configure the add-on (Login and scrobbler options)
5. Please report any bugs [here](https://github.com/SIMKL/Kodi/issues)
5. Please report any bugs [here](https://github.com/SIMKL/script.simkl/issues)

## TODO:
- [x] Add LICENSE.TXT
- [x] Make it work (more or less)

## Donations:
It would be very nice if you invite me for a cup of coffee:
[<img src="https://www.coinbase.com/assets/buttons/donation_large-5cf4f17cc2d2ae2f45b6b021ee498297409c94dcf0ba1bbf76fd5668e80b0d02.png">](https://www.coinbase.com/daviddavo)
Bitcoin address: 1PcbSQrBddJszsTiRhqHyLntp7Lxfuyaio

Thanks, you can write me an e-mail to david@ddavo.me with your receipt, and I'll send you a photo drinking the cup of coffee you invited me to.
15 changes: 10 additions & 5 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
v0.2.1 (2017-1-1)
- Scrobble working fine on windows
v 0.2.2 [17/01/03]:
- Fixed #3

v0.1.1 (2016-12-23)
- Initial version
- Added notification bubble at scrobble
v 0.2.1 [17/01/01]:
- Working w/ Kodi for Windows

v0.1.1 [16/12/24]:
- Auto scrobbles
- Shows a bubble
- Nothing more
- It works (I think)[on Linux]
14 changes: 10 additions & 4 deletions resources/lib/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,11 @@ def onPlayBackStopped(self):
imdb = movie.getIMDBNumber().strip(" ")
fname = self.getPlayingFile()
thing = xbmc.executeJSONRPC(json.dumps({"jsonrpc": "2.0", "method": "Player.GetItem",
"params": { "properties": [ "showtitle", "title" ]
"params": { "properties": [ "showtitle", "title", "season", "episode" ]
, "playerid": 1 }, "id": "VideoGetItem"}))
xbmc.log("Simkl: Full: {}".format(thing))
media = json.loads(thing)["result"]["item"]["type"]
item = json.loads(thing)["result"]["item"]
media = item["type"]
xbmc.log("Simkl: IMDb: {}".format(imdb))
xbmc.log("Simkl: Genre: " + movie.getGenre())
xbmc.log("Simkl: MediaType: " + str(media))
Expand All @@ -112,8 +113,13 @@ def onPlayBackStopped(self):
r = self.api.watched(imdb, media, self.getTotalTime())

if bubble and r:
interface.notify(getstr(32028).format(
json.loads(thing)["result"]["item"]["label"]))
txt = item["label"]
title = ""
if media == "movie": txt = item["title"]
elif media == "episode":
txt = item["showtitle"]
title = "- S{:02}E{:02}".format(item["season"], item["episode"])
interface.notify(getstr(32028).format(title), title=txt)
r = 0

except RuntimeError:
Expand Down
4 changes: 2 additions & 2 deletions resources/lib/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def getstr(strid): return __addon__.getLocalizedString(strid)
xbmc.log("Simkl: Icon: "+str(__icon__))

not_dialog = xbmcgui.Dialog()
def notify(txt="Test"):
not_dialog.notification("Simkl", txt, __icon__) #Put an icon
def notify(txt="Test", title="Simkl", icon=__icon__):
not_dialog.notification(title, txt, icon)

PIN_LABEL = 201
INSTRUCTION_ID = 202
Expand Down
Binary file modified script.simkl.zip
Binary file not shown.

0 comments on commit d299c91

Please sign in to comment.