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.
(2015-03-11, 19:19)phil65 Wrote: [ -> ]
(2015-03-11, 16:45)Razze Wrote: [ -> ]
(2015-03-11, 15:38)phil65 Wrote: [ -> ]v1 still running.

would it be an valid option for you to use
https://github.com/fuzeman/trakt.py (https://github.com/Razzeee/script.module.trakt)
for the interaction? when it supports all needed cases?

not sure if I will get it in line with the way I´m caching etc, I tend to write that stuff myself. Things are a bit different for plugin stuff when used for lists ( <content> method)

I don't want to insult you, just learn/understand.
What I can tell from your source is that your writing the results from the api calls as a json to a txt file? How would this not work anymore?
(2015-03-11, 21:56)Razze Wrote: [ -> ]
(2015-03-11, 19:19)phil65 Wrote: [ -> ]
(2015-03-11, 16:45)Razze Wrote: [ -> ]would it be an valid option for you to use
https://github.com/fuzeman/trakt.py (https://github.com/Razzeee/script.module.trakt)
for the interaction? when it supports all needed cases?

not sure if I will get it in line with the way I´m caching etc, I tend to write that stuff myself. Things are a bit different for plugin stuff when used for lists ( <content> method)

I don't want to insult you, just learn/understand.
What I can tell from your source is that your writing the results from the api calls as a json to a txt file? How would this not work anymore?

Well, first of all I didnt even have a look at that script yet, so I have no idea how that one behaves.
In the past I found some API packages makin things more complicated than helpful (also depends on docs of course), and atm I need the called URLs to build the filename / name of property with cached content, and often those are "hidden" in API packages. In addition in this specific case I only use a very small subset of all possible API calls. (I didnt implement any of the Trakt community features at all for example) From a quick glance I only have to add the oauth and adjust some of of the rest of the code, so the question is what would I gain for this specific use case? I would still have to wrap the stuff to the property names / labels I use for the other stuff. I prefer to stay without external depends if possible, also to keep script size low (for <content> stuff every ms counts in terms of loading time, esp on embedded systems)
Anyway, if you want me to make use of it then you´re free to set up a pull request. I dont care too much, not at the top of my to-do list at them moment Smile
Makes sense. But if you don't like/prefere it I will try to do it without new dependencies / modules.
Not sure when I will be able to have a look.
And is there a reason for you using txt files and not a sqlite for e.g.? Any hard data or just a preference?
I would think that sqlite would have the upper hand, especially if your saying every sec counts.
No Not faster because i have to reconnect to the db on every script call again. Pickling also isnt faster. I also cache stuff as window properties btw, not only as text Files. That seems to be the fastest way (pretty dirty hack though)
small info:
for newest isengard nightly builds I created a context menu add-on to add an entry to show the Movie / TVShow / Season extendedinfo dialog. That way it can also be used in Confluence for example.
https://github.com/phil65/context.extendedinfo.dialog
(2015-03-11, 05:52)phil65 Wrote: [ -> ]Waiting for more bug reports, my list is getting short. Wink (apart from episode area, that´s still WIP)

Wish I had more things to report Tongue

The main issue I have encountered is that sometimes there is quite a bit of delay (3+ seconds) between launching the script and when DialogBusy shows up, which can give the impression that nothing has happened (this is on an i5 system with 8gb Ram, so definitely not low powered). Its a pretty minor issue really, and not sure if I would call it a "bug" per se.

Also, I'm wondering if there is a possibility of launching the script to check for both movies and tvshows rather than one or the other. I have a button in the PVRinfo dialog that launches the script. There isn't really a way to check for content type here so I just call the script for tvshows. I know I'm not using the script the way it is intended, but it would be an excellent feature to have for PVR (In Australia our OTA EPG info is pretty limited so its nice to have a bit of extra info available). I understand if this isn't feasible.
(2015-03-16, 02:09)jurialmunkey Wrote: [ -> ]
(2015-03-11, 05:52)phil65 Wrote: [ -> ]Waiting for more bug reports, my list is getting short. Wink (apart from episode area, that´s still WIP)

Wish I had more things to report Tongue

The main issue I have encountered is that sometimes there is quite a bit of delay (3+ seconds) between launching the script and when DialogBusy shows up, which can give the impression that nothing has happened. Its a pretty minor issue really, and not sure if I would call it a "bug" per se.

Also, I'm wondering if there is a possibility of launching the script to check for both movies and tvshows rather than one or the other. I have a button in the PVRinfo dialog that launches the script. There isn't really a way to check for content type here so I just call the script for tvshows. I know I'm not using the script the way it is intended, but it would be an excellent feature to have for PVR (In Australia our OTA EPG info is pretty limited so its nice to have a bit of extra info available). I understand if this isn't feasible.
the best way to do it would be to add different buttons (one for movie search, one for tv search) to PVRinfo dialog I think.
A debug log for one of those 3+ sec delays would be nice.
Phil65, thanks again for providing this great script. I'm using it to display artist discography, but I'm getting an error with artists like Beyoncé and Björk. I have script.module.unidecode installed and I'm using the following code to display the discography...

Code:
<content target="music">plugin://script.extendedinfo?info=discography&amp;&amp;artistname=$INFO[ListItem.Artist]</content>

Here's my debug log: http://pastebin.com/LNwyvp44

Thanks!
(2015-03-16, 04:31)bryanbrazil Wrote: [ -> ]Phil65, thanks again for providing this great script. I'm using it to display artist discography, but I'm getting an error with artists like Beyoncé and Björk. I have script.module.unidecode installed and I'm using the following code to display the discography...

Code:
<content target="music">plugin://script.extendedinfo?info=discography&amp;&amp;artistname=$INFO[ListItem.Artist]</content>

Here's my debug log: http://pastebin.com/LNwyvp44

Thanks!

try
https://github.com/phil65/script.extende...4a726d054a
(2015-03-16, 04:33)phil65 Wrote: [ -> ]
(2015-03-16, 04:31)bryanbrazil Wrote: [ -> ]Phil65, thanks again for providing this great script. I'm using it to display artist discography, but I'm getting an error with artists like Beyoncé and Björk. I have script.module.unidecode installed and I'm using the following code to display the discography...

Code:
<content target="music">plugin://script.extendedinfo?info=discography&amp;&amp;artistname=$INFO[ListItem.Artist]</content>

Here's my debug log: http://pastebin.com/LNwyvp44

Thanks!

try
https://github.com/phil65/script.extende...4a726d054a

That did the trick, thanks!
(2015-03-16, 02:11)phil65 Wrote: [ -> ]the best way to do it would be to add different buttons (one for movie search, one for tv search) to PVRinfo dialog I think.
A debug log for one of those 3+ sec delays would be nice.
Yeah I think thats the best way.

Here's a debug log with two different actor requests both 4+ seconds delay between the info dialog closing and the busy dialog loading. Sorry for the wait, had to compile latest kodi-Helix master for Fedora as I was running an old beta and wanted to make sure that wasn't the problem.
http://pastebin.com/sScgzFmi

As you can see in this snippet, there is a 5 second delay between invoking the script and the opening of DialogBusy.
Code:
15:48:27 T:139713509250816   DEBUG: script.extendedinfo: {
                                                "control": null,
                                                "default.py": "",
                                                "handle": null,
                                                "name": "Chlo\u00eb Grace Moretz as Mindy Macready"
                                            }
15:48:27 T:139713509250816   DEBUG: script.extendedinfo: [
                                                "extendedactorinfo"
                                            ]
15:48:27 T:139714033735936   DEBUG: ------ Window Deinit (DialogVideoInfo.xml) ------
15:48:27 T:139713509250816   DEBUG: POParser: loaded 95 strings from file /home/mergeandvary/.kodi/addons/script.extendedinfo/resources/language/English/strings.po
15:48:28 T:139714033727232   ERROR: CCurlFile::FillBuffer - Failed: Timeout was reached(28)
15:48:28 T:139714033727232   ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.
15:48:31 T:139714033727232   DEBUG: CurlFile::Open(0x7f11b559ab30) http://feeds.xbmc.org/updated_xbmc_addons
15:48:32 T:139713509250816   DEBUG: script.extendedinfo: download http://api.themoviedb.org/3/search/person?query=Chloe+Grace+Moretz&include_adult=false&api_key=34142515d9d23817496eeb4ff1d223d0. time: 5.677395
15:48:32 T:139713509250816   DEBUG: script.extendedinfo: save to file: http://api.themoviedb.org/3/search/person?query=Chloe+Grace+Moretz&include_adult=false&api_key=34142515d9d23817496eeb4ff1d223d0
15:48:32 T:139713509250816   DEBUG: script.extendedinfo: saved textfile /home/mergeandvary/.kodi/userdata/addon_data/script.extendedinfo. Time: 0.001609
15:48:33 T:139714033735936   DEBUG: Activating window ID: 10138
15:48:33 T:139714033735936   DEBUG: ------ Window Init (DialogBusy.xml) ------
Hello

What is wrong in these lines ?

Quote:<content>plugin://script.extendedinfo?info=youtubeusersearch&amp;&amp;id=$INFO[Skin.String(MovieName)]</content>

<content>plugin://script.extendedinfo?info=moviesCrew</content>
(2015-03-16, 10:51)senna99 Wrote: [ -> ]Hello

What is wrong in these lines ?

Quote:<content>plugin://script.extendedinfo?info=youtubeusersearch&amp;&amp;id=$INFO[Skin.String(MovieName)]</content>

<content>plugin://script.extendedinfo?info=moviesCrew</content>

what does $INFO[Skin.String(MovieName)] contain? you probably want to use youtubesearch, not youtubeusersearch....
info=moviescrew does not exist.
I'll will try to explain.

This is <window id="61">


Quote: <item id="1">
<thumb>$INFO[Window(Home).Property(trendingmovies.1.Art(poster))]</thumb>
<include>Common_TraktTV_ClearProperties</include>
<onclick>Skin.SetString(MovieName,$INFO[Window(Home).Property(trendingmovies.1.Title)])</onclick>
<onclick>SetProperty(Title,$INFO[Window(Home).Property(trendingmovies.1.Title)],58)</onclick>
<onclick>SetProperty(mpaa,$INFO[Window(Home).Property(trendingmovies.1.MPAA)],58)</onclick>
<onclick>SetProperty(Plot,$ESCINFO[Window(Home).Property(trendingmovies.1.Plot)],58)</onclick>
<onclick>SetProperty(Tagline,$INFO[Window(Home).Property(trendingmovies.1.Tagline)],58)</onclick>
<onclick>SetProperty(Year,$INFO[Window(Home).Property(trendingmovies.1.Year)],58)</onclick>
<onclick>SetProperty(Genre,$INFO[Window(Home).Property(trendingmovies.1.Genre)],58)</onclick>
<onclick>SetProperty(Runtime,$INFO[Window(Home).Property(trendingmovies.1.Runtime)],58)</onclick>
<onclick>SetProperty(Rating,$INFO[Window(Home).Property(trendingmovies.1.Rating)],58)</onclick>
<onclick>SetProperty(Poster,$INFO[Window(Home).Property(trendingmovies.1.Art(poster))],58)</onclick>
<onclick>SetProperty(Fanart,$INFO[Window(Home).Property(trendingmovies.1.Art(fanart))],58)</onclick>
<onclick>SetProperty(Trailer,$INFO[Window(Home).Property(trendingmovies.1.Play)],58)</onclick>
<onclick>SetProperty(ID,$INFO[Window(Home).Property(trendingmovies.1.ID)],58)</onclick>
<onclick>SetProperty(Type,movie,58)</onclick>
<onclick>Skin.SetString(info,Movie Info)</onclick>
<onclick>ActivateWindow(58)</onclick>
</item>

This is <window type="dialog" id="58">
This line is good for me,because I do not know how to call extendedinfo?info=youtubeusersearch with my string alternative for me is plugin.video.youtube.

Quote: <content target="video">plugin://plugin.video.youtube/kodion/search/query/?q=$INFO[Skin.String(MovieName)]&quot;</content>
</control>

For movie actors I just want to show in
Quote:<content target="pictures"></content>



All this I need for my version skin.xone, I apologize if I'm boring .
I must to ask people who have knowledge about this.
Thank you for trying to help me