simkl / script.simkl Goto Github PK
View Code? Open in Web Editor NEWKodi add-on for Simkl
Home Page: https://simkl.com/apps/kodi/
License: GNU General Public License v3.0
Kodi add-on for Simkl
Home Page: https://simkl.com/apps/kodi/
License: GNU General Public License v3.0
On windows I have this error because I cannot execute tozip.sh and create the file
15:08:09 T:9872 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.IOError'> Error Contents: (2, 'No such file or directory', 'C:\\Users\\Eugene\\AppData\\Roaming\\Kodi\\addons\\simkl-master/resources/data/compdate.txt') Traceback (most recent call last): File "C:\Users\Eugene\AppData\Roaming\Kodi\addons\simkl-master\service.py", line 19, in <module> with open(os.path.dirname(os.path.realpath(__file__)) + "/resources/data/compdate.txt", "r") as f: IOError: (2, 'No such file or directory', 'C:\\Users\\Eugene\\AppData\\Roaming\\Kodi\\addons\\simkl-master/resources/data/compdate.txt') -->End of Python script error report<-- 15:08:09 T:9872 INFO: Python script stopped
This issue isn't easy to reproduce so I will just explain the problem and what can possibly be done to fix it:
Problem: Occasionally, if a video is opened, it might scrobble instantly when it starts playing. This is because the video hasn't "loaded" yet. it scrobbles at 70 percent... so if the whole video hasn't loaded yet (doesn't even have a length of video file), it will scrobble instantly because it thinks 100 percent has played.
Possible Solution: Ensure that the Addon doesn't scrobble unless at least one minute has played or that its 70 (or whatever is designated) percent of the usual episode length.
Kodi Leia (v18), Installed in Windows 10 x64 LTSB
Action: Uncheck "show scrobble bubble", watch 70% of an episode
Expected Behavior: Episode is scrobbled, but silently (no icon shows)
Actual Behavior: Episode is scrobbled, but icon (bubble?) shows in top left corner
If you'd like any logs, please let me know where to find them.
The description is in the title. Not all devices have this problem. It has been existent for a while now but I never bothered to report the issue.
If some sort of animation could be removed from the notification bubble, that might fix the problem.
Currently on Estuary but other themes do it as well.
See #7
Add an "except" cause
http://paste.ubuntu.com/23745852/
Not sure if it's SIMKL or not, but these make regular appearances in my logfile:
https://paste.kodi.tv/cufoqiquye.kodi
Starting Kodi (19.4 (19.4.0) Git:20220517-d476a8cf81-dirty). Platform: Linux ARM 32-bit
2022-08-17 18:09:28.348 T:5522 INFO : Using Debug Kodi x32 build
2022-08-17 18:09:28.348 T:5522 INFO : Kodi compiled 2022-05-17 by GCC 10.2.1 for Linux ARM 32-bit version 5.10.24 (330264)
2022-08-17 18:09:28.348 T:5522 INFO : Running on BCM2835 with XBian 10.0 - Bullseye, kernel: Linux ARM 64-bit version 5.15.50+ aarch64
2022-08-17 18:09:28.348 T:5522 INFO : FFmpeg version/source: 15.0a2-Isengard-24994-gd476a8cf81-kodi-4.3.2-Matrix-19.2
2022-08-17 18:09:28.348 T:5522 INFO : Host CPU: ARMv8 Processor rev 3 (v8l), 4 cores available
2022-08-17 18:09:28.348 T:5522 INFO : ARM Features: Neon enabled
Perhaps, because of python 3
the logs make it seem like it tries and fails to scrobble stuff to simkl.
Will watch an episode and post the log for you, as this would be a good addition.
Currently, it appears that when the internet is disconnected or unstable and the plugin fails to scrobble, it retries every 5 seconds or so. This is disruptive to the viewer.
A user-friendly solution would be to do this:
Section A:
Attempt to scrobble
Does it succeed?
Yes - notify the user and end.
No - notify the user and start Section B.
Section B:
30 second interval
Attempt to scrobble
Does it succeed?
Yes - Notify the user and end.
No - Don't notify the user and restart section B.
If at 95% of video, start Section C.
Section C:
At 95% of the video, has it scrobbled yet?
Yes - Do nothing
No - Notify the user
Using this logic, the user will not be pestered with repetitive messages but will instead receive no more than 2 total notifications during the video.
According to logs, login dialog popped up twice, so the window showed me the code '112233' but it's waiting for code '444444' because it got it when the window was displayed the second time. So I can't to log in
11:20:43.840 T:12260 DEBUG: Thread BackgroundLoader 12260 terminating 11:20:43.861 T:5024 DEBUG: Simkl: APIFILE: C:\Users\Eugene\AppData\Roaming\Kodi\addons\script.simkl\resources\data\apikey 11:20:43.861 T:5024 DEBUG: Simkl: { "apikey":"........", "secret":"......." } 11:20:43.861 T:5024 DEBUG: Simkl: APIKEY: ............. 11:20:44.047 T:5024 DEBUG: Simkl: Usersettings: {u'error': u'user_token_failed'} 11:20:44.047 T:5024 DEBUG: Simkl: Icon: C:\Users\Eugene\AppData\Roaming\Kodi\addons\script.simkl\resources\icon.png 11:20:44.054 T:5024 DEBUG: Simkl dir: C:\Users\Eugene\AppData\Roaming\Kodi\ 11:20:44.054 T:5024 DEBUG: Simkl | Python Version: 2.7.11 (default, Jan 16 2016, 16:21:17) [MSC v.1900 32 bit (Intel)] 11:20:44.054 T:5024 DEBUG: Simkl | [''] 11:20:44.054 T:5024 DEBUG: Simkl | compdate: 2017-05-13 21:36:45+02:00 11:20:44.054 T:5024 DEBUG: Simkl: User not logged in 11:20:44.082 T:9992 DEBUG: Simkl: Userfile 11:20:44.083 T:9992 DEBUG: Simkl: APIFILE: C:\Users\Eugene\AppData\Roaming\Kodi\addons\script.simkl\resources\data\apikey 11:20:44.083 T:9992 DEBUG: Simkl: { "apikey":".......", "secret":".........." } 11:20:44.083 T:9992 DEBUG: Simkl: APIKEY: ........... 11:20:44.349 T:9992 DEBUG: Simkl: Usersettings: {u'error': u'user_token_failed'} 11:20:44.349 T:9992 DEBUG: Simkl: Icon: C:\Users\Eugene\AppData\Roaming\Kodi\addons\script.simkl\resources\icon.png 11:20:44.351 T:9992 DEBUG: Simkl dir: C:\Users\Eugene\AppData\Roaming\Kodi\
and 1 minute later some error was thrown
11:21:01.832 T:1592 ERROR: Exception in thread Thread-1: Traceback (most recent call last): File "C:\Program Files (x86)\Kodi17\system\python\Lib\threading.py", line 801, in __bootstrap_inner self.run() File "C:\Program Files (x86)\Kodi17\system\python\Lib\threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "C:\Users\Eugene\AppData\Roaming\Kodi\addons\script.simkl\resources\lib\interface.py", line 52, in threaded if self.check_login(self.pin, self.log): File "C:\Users\Eugene\AppData\Roaming\Kodi\addons\script.simkl\resources\lib\simklapi.py", line 110, in check_login if r["result"] == "OK": TypeError: 'NoneType' object has no attribute '__getitem__' 11:21:07.834 T:4860 DEBUG: Simkl: Still waiting... 24
Discussion of this issue in #4
Essentially, if there is no IMDb/tvdb data, it shows the filename in the bubble instead of having the data from Simkl response.
Prints error when I press login button in settings.
Kodi 17 / Linux / Addon version 1.0.5 (latest from kodi repo)
I have Kodi installed on two devices. It appears that only one at a time can have the scrobbler. Every time I launch the other Kodi installation it asks me to activate it with pin again.
Hi, as I can see you have forgotten to include utils.py file to the repo and now the extension is broken for every new user.
I don't know an exact number (and I don't have any Kodi logs) but after a certain amount of times, the Simkl tracker stops popping up, and Kodi needs to be restarted in order to work again.
Currently, all of my devices have the latest version (at least according to the version number).
On my Linux device, if I have a file not in my library, it scrobbles fine.
On my Windows device, if I have a file not in my library, it fails to scrobble.
I primarily use Windows for video watching, with some exceptions.
Many problems with the PIN. Its hit-and-miss.
Log data from the Yoututbe App
2021-01-26 20:11:26.059 T:1680036736 DEBUG: -- Simkl: Full: {u'tvshowid': -1, u'episode': -1, u'title': 'The Raspberry Pi Pico Review - $4 ARM Microcontroller', u'season': -1, 'ids': {}, u'label': u'The Raspberry Pi Pico Review - $4 ARM Microcontroller', u'imdbnumber': u'', u'file': u'http://127.0.0.1:50152/dUCgYXF01Do.mpd', u'year': '2021', u'genre': [], u'type': u'unknown', u'showtitle': u''}
2021-01-26 20:11:26.426 T:1353421696 DEBUG: -- Simkl: in tracker thread
2021-01-26 20:11:28.427 T:1353421696 DEBUG: -- Simkl: get setting min-length = 5
2021-01-26 20:11:28.427 T:1353421696 DEBUG: -- Simkl: get setting scr-pct = 80
2021-01-26 20:11:44.434 T:1353421696 DEBUG: -- Simkl: MARK: {'year': '2021', 'type': 'movies', 'ids': {}, 'title': 'The Raspberry Pi Pico Review - $4 ARM Microcontroller'}
2021-01-26 20:11:44.434 T:1353421696 DEBUG: -- Simkl: Send: {"movies": [{"year": "2021", "ids": {}, "title": "The Raspberry Pi Pico Review - $4 ARM Microcontroller"}]}
2021-01-26 20:11:44.720 T:1353421696 DEBUG: -- Simkl: get setting bubble = true
2021-01-26 20:11:44.720 T:1353421696 DEBUG: -- Simkl: in bubble
2021-01-26 20:11:44.721 T:1353421696 DEBUG: -- Simkl: Show Bubble
2021-01-26 20:11:44.721 T:1353421696 DEBUG: -- Simkl: track stop
I am currently using the script 'plex for kodi', which has become very popular.
I notice that the simkl script is not triggered as it should when using this script and the result is that no ratings are posted to simkl. The Trakt script is triggered correctly, so it should be possible to fix.
The plex for kodi script gives you a separate gui from within kodi and things are probably handled differently which probably is the cause.
The log does not say anything as it is not triggered.
Add some method so other add-ons can specify the item ID's
The scrobbler gives an error message when it fails because of a lack of internet connection.
It would be great if it could say that it failed and is also added to a queue of items that need to be scrobbled when the internet is reconnected. When it later tries and succeeds to scrobble or check in, it should send queue of other things to be scrobbled too.
Even though some most shows get marked, there are some that don't.
It appears as if it marks the title of the show/movie to Simkl.
If instead, it scrobbled to Simkl using information from TheTVDB and IMDB, (and if that information wasn't available, try filename), then there is a higher chance that the scrobbling would work more successfully.
Keep up the excellent work!
So,
I use Kodi, but with a external player VLC. So scrobbling would not work, because I watch it in VLC.
I would love the option, like the Trakt plugin also has, when I mark a episode as watched in my Kodi library, it will send that to Simkl.
Good: Bubbles contain episode title.
Bad: Bubbles don't contain TV show name or episode number.
Leia 18.8 and Android
the scrobbling pops up on Kodi even if i disable the option
Will try to get logs to you, but basically it says it scrobbles but it doesn't. This narrows out phones and TV boxes, sticks, etc.
Probably should fix this before getting Kodi repo
And showing the bubble
Scrobbles all separeate specials episodes as a future episode (S05E08 for Prison Break).
I tested the same file, once being streamed remotely and once as a local non-library file.
The filename for this example is "Prison Break Season 1 - If the Walls Could Speak.avi", however, all the other specials have the same exact issue.
Hi,
After approving the PIN, the SIMKL KODI addon doesn't do anything, it's just stuck displaying the PIN code window.
Tested on:
Both fresh installations (both KODI and SIMKL addon) since this is the first time I'm using KODI.
Other steps tried:
Happy new year and Shalom!
After the add-on was downloaded it threw an error
16:43:12.170 T:12816 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.IOError'> Error Contents: (2, 'No such file or directory', u'C:\\Users\\Eugene\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.simkl\\simkl_key') Traceback (most recent call last): File "C:\Users\Eugene\AppData\Roaming\Kodi\addons\script.simkl\service.py", line 11, in <module> from resources.lib import interface, engine File "C:\Users\Eugene\AppData\Roaming\Kodi\addons\script.simkl\resources\lib\interface.py", line 7, in <module> from simklapi import api as API File "C:\Users\Eugene\AppData\Roaming\Kodi\addons\script.simkl\resources\lib\simklapi.py", line 21, in <module> with open(USERFILE, "w+") as f: IOError: (2, 'No such file or directory', u'C:\\Users\\Eugene\\AppData\\Roaming\\Kodi\\userdata\\addon_data\\script.simkl\\simkl_key') -->End of Python script error report<--
There is no "script.simkl" directory, for some reason it wasn't created
It scrobbles every few minutes after a certain point. It should only scrobble once.
It would be nice if the script could have a yes/no option to change the Kodi background to the latest show/movie watched every couple of hours or scrobble. This is possible using Simkl API.
For JSON return: http://docs.simkl.apiary.io/#reference/users/last-watched-arts/get-last-watched-images-and-data
For link to JPG: http://docs.simkl.apiary.io/#reference/users/last-watched-arts/redirect-to-last-watched-image
A bug I see now and then when it comes to python, unicode and my username.
My username in windows is jörgen which contains the special character ö. As you can see below python cannot handle that character and the result is that the path could not be found. I'm not having problems with other kodi plugins so there should be a solution for how to handle it correctly.
Error Contents: (2, 'No such file or directory', u'C:\Users\J\xf6rgen\AppData\Roaming\Kodi\userdata\addon_data\script.simkl\simkl_key')
Traceback (most recent call last):
Hi,
I'm running kodi on raspberry pi 3 and when i try to authorize the pi for using simkl, eg when the "please visit simkl.com/pin prompt pops up in kodi, I go to that url in a web browser, but i never get the chance to enter a code as i am directly redirected to the simkl first page. The prompt still remains on the rpi and i have to cancel...the plugin never gets authorized.
The same use case on android was almost the same, the prompt in kodi in android, BUT, when i enter the simkl.com/pin, i get redirected without entering a code, BUT android seems to recognize this, and the app in kodi is authorized (even though i don't enter the code).
So the most logical would be that you always have to enter the code on simkl.com/pin, and not get redirected befor entering a code, as this would give the plugin a chance to poll for the auth.response no matter the OS.
UPDATE: It works when I am using safari browser, but not with chrome. Maybe you want to close this issue. weird.
Can You add a feature where it can exclude path/s, Movie/s, and/or TV Show/s from scrobbling????
Has there been any progress on the Sync Library
option?
It seems that the fetchlibrary
branch has been stale for years now.
I’m using kodi 20.5 fork nothing wrong with the fork but ever since this morning/last night 4/14-4/15 I have been experiencing errors and I even tried relogging in by the settings and now it doesn’t let me when it allowed me to months ago. I think there’s a problem/issue with the kodi plugin for Simkl. I thought you should be aware. Let me know if it’s fixed because I did remove it as it was malfunctioning and giving me errors so I didn’t want it to cause a crash. Thanks for everything and hope you can fix it. I’m sure you can see the errors with all the information I provided. I don’t send logs. Need any verbal info on what I experienced please reply and I’ll reply accordingly. I’ve had problems with logs being sniffed out by others snooping around besides yourself so I don’t show logs publicly. I either do it in private or email. For safety concerns. But I’m sure you got enough to go on. Thanks, Michael.
Not possible to re-login
I think there is a problem with the movies. It marks them as views, yes, but it should not set the date or something, because the movies do not appear as recently watched. With the series it works well.
thank you
I could get a log but it is likely reproducible by getting a nightly build.
According to this https://forum.kodi.tv/showthread.php?tid=305324&pid=2619458#pid2619458
I think it should check also total time of the file(before the tracker_thread started). if it's less than 10 minutes skip the file and do not start tracker_thread.
Clicking Login does nothing, in both Kodi Jarvis (current) as well as Krypton (beta).
Even after you are logged in, it shows the login button.
It should instead say who is logged in, and provide a way to disconnect or change the login.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.