Skip to content

Commit d299c91

Browse files
committed
Fix #4
1 parent d1aaedb commit d299c91

File tree

5 files changed

+32
-13
lines changed

5 files changed

+32
-13
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# Kodi
22

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

1010
## TODO:
1111
- [x] Add LICENSE.TXT
12+
- [x] Make it work (more or less)
13+
14+
## Donations:
15+
It would be very nice if you invite me for a cup of coffee:
16+
[<img src="https://www.coinbase.com/assets/buttons/donation_large-5cf4f17cc2d2ae2f45b6b021ee498297409c94dcf0ba1bbf76fd5668e80b0d02.png">](https://www.coinbase.com/daviddavo)
17+
Bitcoin address: 1PcbSQrBddJszsTiRhqHyLntp7Lxfuyaio
18+
19+
Thanks, you can write me an e-mail to [email protected] with your receipt, and I'll send you a photo drinking the cup of coffee you invited me to.

changelog.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
v0.2.1 (2017-1-1)
2-
- Scrobble working fine on windows
1+
v 0.2.2 [17/01/03]:
2+
- Fixed #3
33

4-
v0.1.1 (2016-12-23)
5-
- Initial version
6-
- Added notification bubble at scrobble
4+
v 0.2.1 [17/01/01]:
5+
- Working w/ Kodi for Windows
6+
7+
v0.1.1 [16/12/24]:
8+
- Auto scrobbles
9+
- Shows a bubble
10+
- Nothing more
11+
- It works (I think)[on Linux]

resources/lib/engine.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,11 @@ def onPlayBackStopped(self):
8787
imdb = movie.getIMDBNumber().strip(" ")
8888
fname = self.getPlayingFile()
8989
thing = xbmc.executeJSONRPC(json.dumps({"jsonrpc": "2.0", "method": "Player.GetItem",
90-
"params": { "properties": [ "showtitle", "title" ]
90+
"params": { "properties": [ "showtitle", "title", "season", "episode" ]
9191
, "playerid": 1 }, "id": "VideoGetItem"}))
9292
xbmc.log("Simkl: Full: {}".format(thing))
93-
media = json.loads(thing)["result"]["item"]["type"]
93+
item = json.loads(thing)["result"]["item"]
94+
media = item["type"]
9495
xbmc.log("Simkl: IMDb: {}".format(imdb))
9596
xbmc.log("Simkl: Genre: " + movie.getGenre())
9697
xbmc.log("Simkl: MediaType: " + str(media))
@@ -112,8 +113,13 @@ def onPlayBackStopped(self):
112113
r = self.api.watched(imdb, media, self.getTotalTime())
113114

114115
if bubble and r:
115-
interface.notify(getstr(32028).format(
116-
json.loads(thing)["result"]["item"]["label"]))
116+
txt = item["label"]
117+
title = ""
118+
if media == "movie": txt = item["title"]
119+
elif media == "episode":
120+
txt = item["showtitle"]
121+
title = "- S{:02}E{:02}".format(item["season"], item["episode"])
122+
interface.notify(getstr(32028).format(title), title=txt)
117123
r = 0
118124

119125
except RuntimeError:

resources/lib/interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def getstr(strid): return __addon__.getLocalizedString(strid)
1212
xbmc.log("Simkl: Icon: "+str(__icon__))
1313

1414
not_dialog = xbmcgui.Dialog()
15-
def notify(txt="Test"):
16-
not_dialog.notification("Simkl", txt, __icon__) #Put an icon
15+
def notify(txt="Test", title="Simkl", icon=__icon__):
16+
not_dialog.notification(title, txt, icon)
1717

1818
PIN_LABEL = 201
1919
INSTRUCTION_ID = 202

script.simkl.zip

400 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)