Kodi Community Forum

Full Version: script.extendedinfo
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

removed151214

I remember coming across this a little while ago for a script I quickly abandoned. The solution then was to surround the $ESCINFO[] with ' not " - so

Code:
RunScript(script.extendedinfo,info=artistdetails,artistname='$ESCINFO[Container(50).ListItem.Property(Headliner)]')

(apologies I'm nowhere near a system I can test if this is still a valid solution, and - even if it is - the fact that escinfo isn't passing something that is being correctly split in the argv's is still a core bug Smile)
Thanks Unfledged Smile (Great to have you around here in general btw, we really need more people who deal with skin - python integration and give as kind support as you do)
Would be great if you could try that out, woodside. (please test both $INFO and $ESCINFO with ' )
(2014-10-31, 01:52)phil65 Wrote: [ -> ]Thanks Unfledged Smile (Great to have you around here in general btw, we really need more people who deal with skin - python integration and give as kind support as you do)
Would be great if you could try that out, woodside. (please test both $INFO and $ESCINFO with ' )

Using $ESCINFO with ' on each end seems to find the MBID for "Crosby, Stills, & Nash".
It looks like using ' with $ESCINFO seems to make $ESCINFO work properly (notice the " after ') but fails to process AudioDB data. Huh weird.

PHP Code:
RunScript(script.extendedinfo,info=artistdetails,artistname='$ESCINFO[Container(50).ListItem.Property(Headliner)]'

PHP Code:
19:50:56 T:6768   DEBUGscript.extendedinfoversion 1.0.0 started
19
:50:56 T:6768   DEBUGscript.extendedinfo: default.py
19
:50:56 T:6768   DEBUGscript.extendedinfoinfo=artistdetails
19
:50:56 T:6768   DEBUGscript.extendedinfoartistname='"Crosby, Stills & Nash"'
19:50:56 T:6768   DEBUGscript.extendedinfosave to textfileC:\Users\Woodside\AppData\Roaming\Kodi\userdata\addon_data\script.extendedinfo\1d17209f2e36efc4b029a4ad92c6565c.txt
19
:50:56 T:6768   DEBUGscript.extendedinfofound artist id for 'Crosby, Stills & Nash'cfafad90-b736-4c74-8ded-f3f4d7b2c792
19
:50:56 T:6768   DEBUGscript.extendedinfoDiscography.Count None
19
:50:56 T:6768   DEBUGscript.extendedinfoMusicVideos.Count None
19
:50:56 T:1652   DEBUGActivating window ID10138
19
:50:56 T:1652   DEBUG: ------ Window Init (DialogBusy.xml) ------
19:50:56 T:6768   DEBUGscript.extendedinfosave to textfileC:\Users\Woodside\AppData\Roaming\Kodi\userdata\addon_data\script.extendedinfo\37ef9820bead4e7194329fb0d2db84e2.txt
19
:50:56 T:6768   DEBUGscript.extendedinfoError when handling GetExtendedAudioDBInfo results
19
:50:57 T:6768   DEBUGscript.extendedinfosave to textfileC:\Users\Woodside\AppData\Roaming\Kodi\userdata\addon_data\script.extendedinfo\3e3e403bff6c8a965ced08720f19064f.txt
19
:50:57 T:6768   DEBUGscript.extendedinfoError when handling HandleAudioDBAlbumResult results
19
:50:57 T:6768   DEBUGscript.extendedinfofinished 

Using just $INFO with ' on each end seems to find the MBID for just 'Crosby and also fails to process AudioDB data.

PHP Code:
RunScript(script.extendedinfo,info=artistdetails,artistname='$INFO[Container(50).ListItem.Property(Headliner)]'

PHP Code:
20:04:25 T:6848   DEBUGscript.extendedinfoversion 1.0.0 started
20
:04:25 T:6848   DEBUGscript.extendedinfo: default.py
20
:04:25 T:6848   DEBUGscript.extendedinfoinfo=artistdetails
20
:04:25 T:6848   DEBUGscript.extendedinfoartistname='Crosby
20:04:26 T:6848   DEBUG: script.extendedinfo: save to textfile: C:\Users\Woodside\AppData\Roaming\Kodi\userdata\addon_data\script.extendedinfo\4ba686cddebd93ef72782102c1583d75.txt
20:04:26 T:6848   DEBUG: script.extendedinfo: found artist id for '
Crosbyfcb54ed6-d107-4408-a489-53d1cbf80cb8
20
:04:26 T:6848   DEBUGscript.extendedinfoStills Nash'
20:04:26 T:6848   DEBUG: script.extendedinfo: Discography.Count = None
20:04:26 T:6848   DEBUG: script.extendedinfo: MusicVideos.Count = None
20:04:26 T:6848   DEBUG: script.extendedinfo: save to textfile: C:\Users\Woodside\AppData\Roaming\Kodi\userdata\addon_data\script.extendedinfo\b9985ab976279d5fb508968ae32274a7.txt
20:04:26 T:6848   DEBUG: script.extendedinfo: Error when handling GetExtendedAudioDBInfo results
20:04:26 T:6848   DEBUG: script.extendedinfo: save to textfile: C:\Users\Woodside\AppData\Roaming\Kodi\userdata\addon_data\script.extendedinfo\318306ac2ef5dbf137b2c23e0e50eaec.txt
20:04:26 T:6848   DEBUG: script.extendedinfo: Error when handling HandleAudioDBAlbumResult results
20:04:26 T:6848   DEBUG: script.extendedinfo: finished 

Could it be AudioDB just doesn't have info for "Crosby" and it does have it for "Crosby, Stills, & Nash" but doesn't like the quotes around the artist name? Failing because of the quotes.
that´s good news, ESCINFO + ' seems to be a good workaround.
the "Error when handling GetExtendedAudioDBInfo results" has other reasons. Could you post the JSON data?
(2014-10-31, 05:57)phil65 Wrote: [ -> ]that´s good news, ESCINFO + ' seems to be a good workaround.
the "Error when handling GetExtendedAudioDBInfo results" has other reasons. Could you post the JSON data?

Phil, this is the json for MBID search results

http://pastebin.com/Qt5NZeCY

The only other 2 json files getting downloaded have only the content below. I'm thinking AudioDB is failing because it doesn't like the quotes maybe? because it's the same for any artist tried. "null"
{"artists": null}
{"album": null}

[EDIT] I just went to their website and did a search with the quotes "Crosby, Stills & Nash" and no results. Did it without the quotes Crosby, Stills & Nash and got results.
(2014-10-31, 06:20)phil65 Wrote: [ -> ]correct. try this: https://github.com/phil65/script.extende...306495432c
Getting this error on Kodi startup... and the same results as before when running the script
PHP Code:
21:40:24 T:6224   ERROREXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - 
NOTEIGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            
Error Type: <type 'exceptions.IndexError'>
                                            
Error Contentsstring index out of range
                                            Traceback 
(most recent call last):
                                              
File "C:\Users\Woodside\AppData\Roaming\Kodi\addons\script.extendedinfo-master\default.py"line 583in <module>
                                                
Main()
                                              
File "C:\Users\Woodside\AppData\Roaming\Kodi\addons\script.extendedinfo-master\default.py"line 40in __init__
                                                self
._parse_argv()
                                              
File "C:\Users\Woodside\AppData\Roaming\Kodi\addons\script.extendedinfo-master\default.py"line 452in _parse_argv
                                                
if param[0] == "'" and param[-1] == "'":
                                            
IndexErrorstring index out of range
                                            
-->End of Python script error report<-- 

I have the concert widget on home so maybe thats why i get the error on startup.
try again with newest commit.
(2014-10-31, 06:49)phil65 Wrote: [ -> ]try again with newest commit.

No errors but still the same results when running artistdetails

{"artists": null}

[EDIT] thats with any artist
(2014-10-31, 06:54)woodside Wrote: [ -> ]
(2014-10-31, 06:49)phil65 Wrote: [ -> ]try again with newest commit.

No errors but still the same results when running artistdetails

{"artists": null}

[EDIT] thats with any artist

ok. will have a deeper look later then including testing on own machine.
(2014-10-31, 06:59)phil65 Wrote: [ -> ]
(2014-10-31, 06:54)woodside Wrote: [ -> ]
(2014-10-31, 06:49)phil65 Wrote: [ -> ]try again with newest commit.

No errors but still the same results when running artistdetails

{"artists": null}

[EDIT] thats with any artist

ok. will have a deeper look later then including testing on own machine.
Wink
fixed now.
(2014-10-31, 07:30)phil65 Wrote: [ -> ]fixed now.

Big Grin Works great!
I don't know if this error is because of the artist name or something else. Biography info works but getting this error for some reason for just this artist so far... No biggie though bro... take a break...lol

Guns N' Roses

PHP Code:
T:4364   ERROREXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - 
NOTEIGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            
Error Type: <type 'exceptions.KeyError'>
                                            
Error Contents: ('album',)
                                            
Traceback (most recent call last):
                                              
File "C:\Users\Woodside\AppData\Roaming\Kodi\addons\script.extendedinfo-master\default.py"line 582in <module>
                                                
Main()
                                              
File "C:\Users\Woodside\AppData\Roaming\Kodi\addons\script.extendedinfo-master\default.py"line 43in __init__
                                                self
._StartInfoActions()
                                              
File "C:\Users\Woodside\AppData\Roaming\Kodi\addons\script.extendedinfo-master\default.py"line 88in _StartInfoActions
                                                Discography 
GetArtistTopAlbums(self.Artist_mbid)
                                              
File "C:\Users\Lonnie Woodside\AppData\Roaming\Kodi\addons\script.extendedinfo-master\resources\lib\LastFM.py"line 204in GetArtistTopAlbums
                                                
return HandleLastFMAlbumResult(results)
                                              
File "C:\Users\Woodside\AppData\Roaming\Kodi\addons\script.extendedinfo-master\resources\lib\LastFM.py"line 81in HandleLastFMAlbumResult
                                                
for album in results['topalbums']['album']:
                                            
KeyError: ('album',)
                                            -->
End of Python script error report<--
00:40:12 T:5828   ERRORXFILE::CDirectory::GetDirectory Error getting plugin://script.extendedinfo/?info=discography&&artistname=Guns N' Roses 
please post JSON data.