Kodi Community Forum

Full Version: Light IMDb Ratings Update 5.1.3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2017-09-20, 14:24)axlt2002 Wrote: [ -> ]
(2017-09-20, 13:59)dziobak Wrote: [ -> ]
(2017-09-20, 13:23)axlt2002 Wrote: [ -> ]@dziobak, can you please open a thread on the LibreELEC forum to point at this issue? It would be really great to understand the magic behind it...thanks!

This was planned I think - like info from logs that I put on previous page (invoked scripts with bad ID).

Add-on 2.1.1 "script version" with fix (I changed too much before)
http://www73.zippyshare.com/v/Mpo29tOS/file.html

Ok, I was writing the post above while you provided the new version...

Does this version work for you (i.e. movies and tv shows are updated) on LibreELEC 8.1.1?

Yes, this last version works good. I changed too much service to script before (automated work) and this also changed path to yours PHP repository (where is service also Smile ) and that ends with no php bin at all. Fixed in current version.
(2017-09-20, 14:35)dziobak Wrote: [ -> ]
(2017-09-20, 14:24)axlt2002 Wrote: [ -> ]
(2017-09-20, 13:59)dziobak Wrote: [ -> ]This was planned I think - like info from logs that I put on previous page (invoked scripts with bad ID).

Add-on 2.1.1 "script version" with fix (I changed too much before)
http://www73.zippyshare.com/v/Mpo29tOS/file.html

Ok, I was writing the post above while you provided the new version...

Does this version work for you (i.e. movies and tv shows are updated) on LibreELEC 8.1.1?

Yes, this last version works good. I changed too much service to script before (automated work) and this also changed path to yours PHP repository (where is service also Smile ) and that ends with no php bin at all. Fixed in current version.

Good! For the moment...and wait for the feedback from djhifi Angel I report here the link: http://www73.zippyshare.com/v/Mpo29tOS/file.html

In case, I will change the name of the repository too! Wink
http://kodi.wiki/view/Add-on_structure

look at addon-type table

and from there https://forum.kodi.tv/showthread.php?tid=315666

"The abstraction is a virtual filesystem. The plugin can return directories (calls to itself with particular parameters), playable files or just files which is the hook to do 'stuff' which does not generate a new listing, such as show a dialog, search etc.

If this abstraction is not appripriate, you want to do a script instead. This is a fullblown window, with full customization of the gui components and such. More work.

the library extension point is for code shared between multiple pluginsources and/or scripts. It is not related to the media library interpretation of the term library"
(2017-09-20, 10:13)dziobak Wrote: [ -> ]
(2017-09-20, 09:30)axlt2002 Wrote: [ -> ]Hi dziobak,

Just some questions on my side:

- Which version of the add-on did you install?
- You made a clean install of the add-on or you upgraded to 8.1.1 with the add-on already installed?
- Which version of OSMC were you running before the update?
- Was the add-on working on that version?

As a suggestion, I would just uninstall the add-on and try to install it again...

Let me know! Smile

- Add-on 2.1.1
- upgrade to 8.1.1 with add-on installed before
- 8.1.0
- yes

Add-on is working when manualy running. But I find in old logs (from 8.1.0) also:

16:10:16.132 T:1606415264 ERROR: EXCEPTION: Unknown addon id 'service.light.imdb.ratings.update'.
16:10:16.135 T:1606415264 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following e
rror<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.RuntimeError'>
Error Contents: Unknown addon id 'service.light.imdb.ratings.update'.
Traceback (most recent call last):
File "/storage/.kodi/addons/service.light.imdb.ratings.update/resources/support/a
utoconf.py", line 11, in <module>
addonSettings = xbmcaddon.Addon( addonID )
RuntimeError: Unknown addon id 'service.light.imdb.ratings.update'.
-->End of Python script error report<--
16:10:33.503 T:1466594208 WARNING: CPythonInvoker(12): Script invoked without an addon. Adding all addon modules installed to p
ython path as fallback. This behaviour will be removed in future version.

I use also other add-on: script.tv.show.next.aired - this alo start in background and worked on 8.1.1, but look at name - this is script in first part.

So, I'm back to my question from before, is this problem with service word in your add-on name (id)?


The addon runs on your 17.4 krypton (8.1.1 libreelec or OSMC) ? As in: It connects to IMDB and updates the ratings when you select the manual function? Well it seems we are having different problems then...I am reporting an issue on manual scan...it doesnt perfom anything. Simply speed runs thru all my movies and does not update a shit.

Downgrading to 8.0.2 AKA Krypton 17.3 fixes this.
(2017-09-20, 11:07)dziobak Wrote: [ -> ]Axlt, this is it. I've changed manually addon id to script.light.imdb.ratings.update in:
service.light.imdb.ratings.update/addon.xml
service.light.imdb.ratings.update/service.py
service.light.imdb.ratings.update/resources/support/autoconf.py
service.light.imdb.ratings.update/resources/library/common.py

and addon is working now on 8.1.1

There is also (new?) bug. After changed to scheduled time I must deactivate/activate addon for starting this background work in new time.
And only then in log shows:
DEBUG: [Light IMDb Ratings Update] - Service scheduled the 2017-09-27 at 10:50

I will give more info, but addon is working now (scheduled update) and must wait to end.

Thing is, i am NOT having this exception error
Sorry for so many posts. OK so the addon is not working even with the latest compilation from dziobak. But, as far as I can see...he was having an issue on a different thing! Schedules AKA auto-updates. I never use that. My issue is on the fact that manual scans report nothing, as if I was not connected to the internet / IMDB...

Anyway,


I re-upgraded to LIBREelec 8.1.1, restarted bla bla, deleted the addon, went into the machine and manually deleted remaining files on "userdata". Then I turned on debug log and installed the addon and then ran a manual update of ratings in Movies. NOPE

Here it is

http://sprunge.us/NNKa

Same stuff happening: it speed runs thru all of the movies.

It throws the same PHP addon error on install and asks me to check log (it was always like this so no problem, the problem is described by you on the first post) and then...the same happens. No imdb connection.


(2017-09-20, 11:42)axlt2002 Wrote: [ -> ]
(2017-09-20, 11:07)dziobak Wrote: [ -> ]Axlt, this is it. I've changed manually addon id to script.light.imdb.ratings.update in:
service.light.imdb.ratings.update/addon.xml
service.light.imdb.ratings.update/service.py
service.light.imdb.ratings.update/resources/support/autoconf.py
service.light.imdb.ratings.update/resources/library/common.py

and addon is working now on 8.1.1

There is also (new?) bug. After changed to scheduled time I must deactivate/activate addon for starting this background work in new time.
And only then in log shows:
DEBUG: [Light IMDb Ratings Update] - Service scheduled the 2017-09-27 at 10:50

Ok, this sounds really weird but if it works is good! Confused Did you make the modifications directly to the files whitout reinstalling the add-on?

So, it seems we can say that the add-on works on LibreELEC 8.1.1 (Kodi 17.4) with that modification. Before going ahead with a new release I would also have a feedback from djhifi...may be that modification will solve his issue too.

Anyway it is clear that LibreELEC users experienced different issues with the same add-on version as well as the same LibreELEC version (see your case and the on of djhifi)...this is still something that I can not explain to myself...

About the scheduled time I dind't have that issue. Please note that such debug string actually appears when you change the schedule time and press the OK button in the settings. When the service is just launched at Kodi start, that strings does not appear in the log. I have tried it right now and the scheduled time is updated without having to deactivate/reactivate the add-on.

Btw, thanks for your interest! Nod I'm waiting for some good news from djhifi now...

I have been reading the last 2 pages and from what I can tell, dziobak was having troubles in the schedule function of the addon. If that's the case I don't know because I never used or will use such function. So...maybe the fix is just for that part of the issue?


EDIT: And most important: As far as I can see, dziobak does not use Librelec BUT osmc....
Djhifi.
I use exactly 8.1.1 on RPi2:

15:40:16.866 T:1945649264 NOTICE: Kodi compiled Aug 29 2017 by GCC 6.2.0 for Linux ARM 32-bit version 4.9.43 (264491)
15:40:16.866 T:1945649264 NOTICE: Running on LibreELEC (official): 8.1.1 8.2, kernel: Linux ARM 32-bit version 4.9.43

I look at your logs, and something is with php interpreter download, or renaming downloaded file:

PHP Code:
19:08:57.991 T:140399720662784   DEBUG: [Light IMDb Ratings Update] - Downloading and installing php-cgi_5.6_x86_64...
19:08:57.994 T:140399720662784   ERROREXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - 
NOTEIGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            
Error Type: <type 'exceptions.OSError'>
                                            
Error Contents: (2'No such file or directory')
                                            
Traceback (most recent call last):
                                              
File "/storage/.kodi/addons/script.light.imdb.ratings.update/resources/support/autoconf.py"line 216in <module>
                                                
php_configuration()
                                              
File "/storage/.kodi/addons/script.light.imdb.ratings.update/resources/support/autoconf.py"line 152in php_configuration
                                                os
.renamedownloaded_filephp_cgi_binary )
                                            
OSError: (2'No such file or directory')
                                            -->
End of Python script error report<-- 

Check this path /storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/php-cgi if there is binary, owner set and privileges. And maybe good first step is remove this file then reinstall PHP from addon config.

Also, check if download of this file on LibreELEC machine is working:
https://raw.githubusercontent.com/axlt20...5.6_x86_64

Then download above link and compare (md5sum) both binaries.
(2017-09-20, 21:26)dziobak Wrote: [ -> ]Djhifi.
I use exactly 8.1.1 on RPi2:

15:40:16.866 T:1945649264 NOTICE: Kodi compiled Aug 29 2017 by GCC 6.2.0 for Linux ARM 32-bit version 4.9.43 (264491)
15:40:16.866 T:1945649264 NOTICE: Running on LibreELEC (official): 8.1.1 8.2, kernel: Linux ARM 32-bit version 4.9.43

I look at your logs, and something is with php interpreter download, or renaming downloaded file:

PHP Code:
19:08:57.991 T:140399720662784   DEBUG: [Light IMDb Ratings Update] - Downloading and installing php-cgi_5.6_x86_64...
19:08:57.994 T:140399720662784   ERROREXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - 
NOTEIGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            
Error Type: <type 'exceptions.OSError'>
                                            
Error Contents: (2'No such file or directory')
                                            
Traceback (most recent call last):
                                              
File "/storage/.kodi/addons/script.light.imdb.ratings.update/resources/support/autoconf.py"line 216in <module>
                                                
php_configuration()
                                              
File "/storage/.kodi/addons/script.light.imdb.ratings.update/resources/support/autoconf.py"line 152in php_configuration
                                                os
.renamedownloaded_filephp_cgi_binary )
                                            
OSError: (2'No such file or directory')
                                            -->
End of Python script error report<-- 

Check this path /storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/php-cgi if there is binary, owner set and privileges. And maybe good first step is remove this file then reinstall PHP from addon config.

What are the commands on SSH to alter the privileges and owner? I didnt understand that part of the answer.You want me to remove that file which is showing in the log?

That error is always there I guess. And it works on 17.3 even with that error but I will try and do what u said (about removing that file and reinstall)

EDIT: That link you posted is of the php binary, i dont need that link do I? I can manually download the php from the addon after removing the cgi as you recommended right?

I will download to my windows machine and compare later
first: cd /storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/
then: ls -l
all files will shows with privileges and owner

to remove: rm <file_name>
to download file manually use wget or curl

IMDB rating not dowload because there is something wrong with PHP interpreter I think, so, first we check this binary (php-cgi)

also try running this php-cgi and copy output here
OK will try that step. Just to update: I removed the file from: /storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/php-cgi
Re-downloaded using the addon and nothing is there. I guess I need to delete the whole folder and not just the php-cgi ?
OK, so removing the folder+file from the addon_data and re-downloading via the addon throws this into the log:

21:02:54.700 T:140562765678336 DEBUG: [Light IMDb Ratings Update] - PHP installation completed
21:02:54.700 T:140562765678336 INFO: CPythonInvoker(24, special://home/addons/script.light.imdb.ratings.update/resources/support/autoconf.py): script successfully run
21:02:54.811 T:140562765678336 INFO: Python script stopped

EDIT 1:

Running the manual update of ratings after the previous debug log throws this:

21:06:02.325 T:140560078124800 INFO: initializing python engine.
21:06:02.325 T:140560078124800 DEBUG: CPythonInvoker(27, special://home/addons/script.light.imdb.ratings.update/resources/library/update.py): start processing
21:06:02.352 T:140560078124800 DEBUG: -->Python Interpreter Initialized<--
21:06:02.353 T:140560078124800 DEBUG: CPythonInvoker(27, special://home/addons/script.light.imdb.ratings.update/resources/library/update.py): the source file to load is "special://home/addons/script.light.imdb.ratings.update/resources/library/update.py" ("/storage/.kodi/addons/script.light.imdb.ratings.update/resources/library/update.py")
21:06:02.353 T:140560078124800 WARNING: CPythonInvoker(27): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
21:06:02.359 T:140560078124800 DEBUG: CPythonInvoker(27, special://home/addons/script.light.imdb.ratings.update/resources/library/update.py): setting the Python path to /storage/.kodi/addons/script.light.imdb.ratings.update/resources/library:/usr/share/kodi/addons/script.module.pil/lib:/storage/.kodi/addons/script.module.requests/lib:/storage/.kodi/addons/script.module.simplejson/lib:/storage/.kodi/addons/script.common.plugin.cache/lib:/storage/.kodi/addons/script.module.beautifulsoup4/lib:/storage/.kodi/addons/script.module.chardet/
lib:/storage/.kodi/addons/script.module.autocompletion/lib:/storage/.kodi/addons/script.module.addon.signals/lib:/storage/.kodi/addons/script.module.youtube.dl/lib:/storage/.kodi/addons/script.module.kodi65/lib:/storage/.kodi/addons/script.module.routing/lib:/storage/.kodi/addons/script.module.six/lib:/storage/.kodi/addons/script.module.dateutil/
lib:/storage/.kodi/addons/script.module.arrow/lib:/storage/.kodi/addons/script.module.beautifulsoup/lib:/storage/.kodi/addons/script.module.musicbrainz/lib:/storage/.kodi/addons/script.module.simplecache/lib:/storage/.kodi/addons/script.module.thetvdb/lib:/storage/.kodi/addons/script.module.metadatautils/lib:/
storage/.kodi/addons/script.module.myconnpy/lib:/usr/lib/python27.zip:/usr/lib/python2.7:/
usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/
lib-dynload:/usr/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages/gtk-2.0
21:06:02.359 T:140560078124800 DEBUG: CPythonInvoker(27, special://home/addons/script.light.imdb.ratings.update/resources/library/update.py): entering source directory /storage/.kodi/addons/script.light.imdb.ratings.update/resources/library
21:06:02.460 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - Ratings update for Movies started

EDIT2:

OK, here is the report from md5sum. A) is the file currently installed on libreelec (after removing manually and downloading via addon again), B) is the file directly downloaded from the link you gave me, to my windows machine.

A)

[\\192.168.1.98\Userdata\addon_data\script.light.imdb.ratings.update\php-binary\]
php-cgi 68049abc60409d6a71afdef9d6330a8e


B)

[C:\Users\manue\Desktop\]
php-cgi_5.6_x86_64 68049abc60409d6a71afdef9d6330a8e


The same hash ....


PS: SSH into the machine for privileges on the binary (the binary is the one downloaded AFTER deleting the one you recommended):

https://imgur.com/EU21VBf
Look for JSON Response lines, if there are values like
DEBUG: [Light IMDb Ratings Update] - JSON Response: {"rating":"6.8","votes":"2,445","top250":"0","response":"true"}
then addon is working
(2017-09-20, 22:18)dziobak Wrote: [ -> ]Look for JSON Response lines, if there are values like
DEBUG: [Light IMDb Ratings Update] - JSON Response: {"rating":"6.8","votes":"2,445","top250":"0","response":"true"}
then addon is working

21:06:18.882 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - PHP Command: /storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/php-cgi -q /storage/.kodi/addons/script.light.imdb.ratings.update/resources/library/php/getInfos.php -d ID=tt2140479
21:06:18.882 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - JSON Response:
21:06:18.882 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - The query to IMDb site has failed, sorry
21:06:18.927 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - PHP Command: /storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/php-cgi -q /storage/.kodi/addons/script.light.imdb.ratings.update/resources/library/php/getInfos.php -d ID=tt0094608
21:06:18.928 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - JSON Response:
21:06:18.928 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - The query to IMDb site has failed, sorry
21:06:18.974 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - PHP Command: /storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/php-cgi -q /storage/.kodi/addons/script.light.imdb.ratings.update/resources/library/php/getInfos.php -d ID=tt0109040
21:06:18.974 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - JSON Response:
21:06:18.975 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - The query to IMDb site has failed, sorry
21:06:19.015 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - PHP Command: /storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/php-cgi -q /storage/.kodi/addons/script.light.imdb.ratings.update/resources/library/php/getInfos.php -d ID=tt1176724
21:06:19.015 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - JSON Response:
21:06:19.015 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - The query to IMDb site has failed, sorry
21:06:19.060 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - PHP Command: /storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/php-cgi -q /storage/.kodi/addons/script.light.imdb.ratings.update/resources/library/php/getInfos.php -d ID=tt0445922
21:06:19.060 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - JSON Response:
21:06:19.060 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - The query to IMDb site has failed, sorry
21:06:19.102 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - PHP Command: /storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/php-cgi -q /storage/.kodi/addons/script.light.imdb.ratings.update/resources/library/php/getInfos.php -d ID=tt1591479
21:06:19.102 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - JSON Response:
21:06:19.102 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - The query to IMDb site has failed, sorry
21:06:19.143 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - PHP Command: /storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/php-cgi -q /storage/.kodi/addons/script.light.imdb.ratings.update/resources/library/php/getInfos.php -d ID=tt1861445
21:06:19.143 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - JSON Response:
21:06:19.143 T:140560078124800 DEBUG: [Light IMDb Ratings Update] - The query to IMDb site has failed, sorry





This, times 10000000

It seems that now the binary is OK, right can you confirm? And the addon continues NOT to work....
OK, next thing, run this line (copy to SSH and Enter) and copy output here
/storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/php-cgi -q /storage/.kodi/addons/script.light.imdb.ratings.update/resources/library/php/getInfos.php -d ID=tt2140479
(2017-09-20, 22:30)dziobak Wrote: [ -> ]OK, next thing, run this line (copy to SSH and Enter) and copy output here
/storage/.kodi/userdata/addon_data/script.light.imdb.ratings.update/php-binary/php-cgi -q /storage/.kodi/addons/script.light.imdb.ratings.update/resources/library/php/getInfos.php -d ID=tt2140479

Will do that, but, in the meantime look what happens as soon as I go back to libreelec 8.0.2 AKA Krypton 17.3....

http://sprunge.us/DYKj


Addon works...lol