diff --git a/script.simkl/README.md b/script.simkl/README.md index 82dc2127b5..f9d73c9dd7 100644 --- a/script.simkl/README.md +++ b/script.simkl/README.md @@ -17,18 +17,8 @@ ## TODO: - [x] Make it work on Android -## Help Translate: -You can use Crowdin [https://crowdin.com/project/Kodi-add-on-for-Simkl](https://crowdin.com/project/Kodi-add-on-for-Simkl) to help translate this add-on into your language. - -## Donations: -It would be very nice if you invite me for a cup of coffee: - -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. - ## Join the conversation: -- Discuss on Discord https://discord.gg/JRtwsfG +- Discuss on Discord [https://discord.gg/u89XfYn](https://discord.gg/u89XfYn) - Post bugs, feature requests on Github https://github.com/SIMKL/script.simkl/issues [license]: https://github.com/SIMKL/script.simkl/blob/master/LICENSE.txt diff --git a/script.simkl/addon.xml b/script.simkl/addon.xml index 3d8e805f9b..d13dd08083 100644 --- a/script.simkl/addon.xml +++ b/script.simkl/addon.xml @@ -1,7 +1,7 @@ @@ -25,8 +25,10 @@ en + v3.2.3 (31-10-25) + - fixed bubble popup and autoscrobble settings v3.2.2 (05-01-24) - - fixed new pything isAlive fn + - fixed new python isAlive function v3.2 (22-09-22) - right click, mark as watched/unwatched added v3.1 (21-07-13) diff --git a/script.simkl/changelog.txt b/script.simkl/changelog.txt index b44dc2ad8b..c7fc1be925 100644 --- a/script.simkl/changelog.txt +++ b/script.simkl/changelog.txt @@ -1,3 +1,6 @@ +v 3.2.3 +- fixed bubble popup and autoscrobble settings + v 3.2.1 - is_live fixed diff --git a/script.simkl/resources/lib/api_simkl.py b/script.simkl/resources/lib/api_simkl.py index f2884897bb..9fba834303 100644 --- a/script.simkl/resources/lib/api_simkl.py +++ b/script.simkl/resources/lib/api_simkl.py @@ -26,7 +26,11 @@ def __init__(self): self.isLoggedIn = False self.loginInProgress = False - self.headers = {"Content-Type": "application-json", "simkl-api-key": APIKEY} + addon_version = __addon__.getAddonInfo("version") + kodi_version = xbmc.getInfoLabel("System.BuildVersion") + user_agent = "script.simkl/v{} / Kodi/{}".format(addon_version, kodi_version) + + self.headers = {"Content-Type": "application-json", "simkl-api-key": APIKEY, "User-Agent": user_agent} # set_setting('token', '') token = get_setting('token') if token: diff --git a/script.simkl/resources/lib/engine.py b/script.simkl/resources/lib/engine.py index e832befcf2..e0abd3dce9 100644 --- a/script.simkl/resources/lib/engine.py +++ b/script.simkl/resources/lib/engine.py @@ -21,7 +21,7 @@ def __init__(self, api): def onPlayBackStarted(self): self._stop_tracker() - if self._api.isLoggedIn: + if self._api.isLoggedIn and get_setting("autoscrobble").lower() in ['true', '1']: self._detect_item() def onPlayBackStopped(self): @@ -122,6 +122,9 @@ def _detect_item(self): self._run_tracker() def _run_tracker(self): + if get_setting("autoscrobble").lower() not in ['true', '1']: + log("Auto-scrobble is disabled, skipping tracker") + return self._playback_lock.set() self._tracker = threading.Thread(target=self._thread_tracker) self._tracker.start() @@ -162,7 +165,7 @@ def _thread_tracker(self): else: log("Retrying") - elif success and bool(get_setting("bubble")): + elif success and (get_setting("bubble").lower() in ['true', '1']): self._show_bubble(self._item) break except: diff --git a/script.simkl/resources/settings.xml b/script.simkl/resources/settings.xml index 9d7a8ac90c..f038611bc0 100644 --- a/script.simkl/resources/settings.xml +++ b/script.simkl/resources/settings.xml @@ -9,10 +9,8 @@ - - - +