Kodi Community Forum
Release plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300)
+---- Thread: Release plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners (/showthread.php?tid=345847)



RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - jurialmunkey - 2020-01-14

@nessus - Can you test latest? ListItems should be grabbing extra art from the local db now. I've added landscape, clearlogo, clearart, discart


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - nessus - 2020-01-14

@jurialmunkey 
Yep, all working fine now. Thank you very much.

I have another one.... when browsing inside TMDB Helper Addon lists or by selecting one of them as widget through skin shortcuts select widget dialog, the media flags are empty. All the other info are showing fine except this one. Is this too much of hassle to add?

Sorry for all these questions one after the other and not all together but the most of them i've noticed them only after extensive testing on both video and actor info in all scenarios.

Thanks
Nessus


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - jurialmunkey - 2020-01-15

(2020-01-14, 19:28)nessus Wrote: I have another one.... when browsing inside TMDB Helper Addon lists or by selecting one of them as widget through skin shortcuts select widget dialog, the media flags are empty. All the other info are showing fine except this one. Is this too much of hassle to add?

By media flags, do you mean codec info? Because that's working fine for me for items in the library (as long as the option for kodi library info is enabled in TMDbHelper settings)


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - bsoriano - 2020-01-15

@jurialmunkey, I have a navigation issue that I am not sure how to solve.  The steps I follow are:

1. Press i on a widget item from the plugin (or a local movie, tv show, etc.)
2. Press Enter on a cast item.
3. Get select dialog to search online or locally
4. Select search online ==> This does a RunScript(plugin.video.themoviedb.helper,add_query=$INFO[Container(90050).ListItem.Label],type=person,call_auto=1134))
5. Get dialog video info for the person (at this point, the TMDbHelper.Path.Current property is set)
6. Click on any of the media totals item (let's say, Movies in TMDb as Crew)
7. This opens a custom search window, the exact code to do this is:
xml:

<onclick>SetProperty(SingleSearchType,OnlineTotals,Home)</onclick>
<onclick>Skin.SetString(SingleSearchID,$INFO[ListItem.Property(tmdb_id)])</onclick>
<onclick>Skin.SetString(SingleSearchTerm,$INFO[ListItem.Label])</onclick>
<onclick>Skin.SetString(OnlineTotalsCall,crew_in_movies)</onclick>
<onclick>Skin.SetString(SingleSearchHeader,$LOCALIZE[32201])</onclick>
<onclick>Dialog.Close(movieinformation)</onclick>
<onclick>ActivateWindow(1131)</onclick>
 

When the custom search window is opened, the TMDbHelper.Path.Current is emptied, for some reason.  Thus, when I press Back or Escape in the custom search window, I go back to an empty 1134 window, instead of back to the video info dialog for the person.  It seems that closing the video info dialog clears the property for some reason.  i do not have any onunload in the video info dialog that could do this, or any onload/onunload on the custom search window that could do this.

What am I doing wrong? Should I use the close_dialog call of tmdb helper instead of Dialog.Close()? If I did, wouldn't the same thing happen, meaning the tmdbhelper.current.path property would be emptied?

EDIT: I tried using the close_dialog call, but then my custom search window does not open.

Please let me know.  Thanks.

Regards,

Bart


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - bsoriano - 2020-01-15

@jurialmunkey , on another note, my skin (Amber) uses functionality in your script that is included in versions 2.2.15 and onwards.  These versions are not in the Kodi repo yet.  Are you OK with me including the latest version of the plugin in the Amber repo, temporarily, until you submit again to the Kodi repo? That way my users can ensure to find in a single spot all of the requirements for the skin that are not in the Kodi repo.  Please let me know.  Thanks.

Regards,

Bart


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - jurialmunkey - 2020-01-15

@bsoriano -

If you close the videoinfo dialog, the script thinks that you are pressing back, which removes the current path and replaces it with the previous path (or nothing if its the first).
If you close window 1134 the script clears all properties and exits. Activating another window closes the current window.
Basically, you can't close 1134 or videoinfo if you would like to keep the script active.

What might work is if you change your search window to a dialog and just open it on top of the videoinfo dialog without closing videoinfo or 1134. i.e. Remove the Dialog.Close onclick and add the following to your search window:
Code:
<window type="dialog" id="1131">


RE: Repo.
I have a repo with TMDbHelper beta versions maintained by @drinfernoo
https://jurialmunkey.github.io/repository.jurialmunkey/repository.jurialmunkey-1.2.zip

It is currently on 2.2.16 but it will get updated soon with the most recent version.
I'll be making a PR to official repo with the latest updates in the next week - just need to do a little bit more testing to make sure all the latest changes are stable.


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - bsoriano - 2020-01-15

(2020-01-15, 23:14)jurialmunkey Wrote: @bsoriano -

If you close the videoinfo dialog, the script thinks that you are pressing back, which removes the current path and replaces it with the previous path (or nothing if its the first).
If you close window 1134 the script clears all properties and exits. Activating another window closes the current window.
Basically, you can't close 1134 or videoinfo if you would like to keep the script active.

What might work is if you change your search window to a dialog and just open it on top of the videoinfo dialog without closing videoinfo or 1134. i.e. Remove the Dialog.Close onclick and add the following to your search window:
Code:
<window type="dialog" id="1131">


RE: Repo.
I have a repo with TMDbHelper beta versions maintained by @drinfernoo
https://jurialmunkey.github.io/repository.jurialmunkey/repository.jurialmunkey-1.2.zip

It is currently on 2.2.16 but it will get updated soon with the most recent version.
I'll be making a PR to official repo with the latest updates in the next week - just need to do a little bit more testing to make sure all the latest changes are stable.
@jurialmunkey , thanks! I will be trying this right away.  Understood about your repo; I will place a link to it in the Amber thread.

Regards,

Bart

EDIT: @jurialmunkey, thatnks again, this solved the navigation issue.  However, it brought other issues, like the fact that ListItem.xxxx now is the one from dialogvideoinfo.xml and not from the custom search window.  I solved that by replacing with Container.ListItem.xxxx.  What I have not solved is that now, if it is an online tmdb custom search, when you press i on any of the items, nothing happens, until I press Back or Esc, and then the info for that movie is shown.  Since the custom search is now a dialog and not a window, do I need to add a custom onclick to the results panel/list? Do I need to close the dialog for tmdb helper to properly open the info for the item?

A similar issue is happening if the custom search is local.  If I press Enter, the movie starts playing, but in the background.  I figure I can solve this like in the video info dialog Play/Close/Browse button.  However, if I press i, I do not get an info dialog for the item, until I press Back or Esc, and then it is shown.

Any ideas? Thanks again for your help.


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - nessus - 2020-01-16

(2020-01-15, 13:03)jurialmunkey Wrote:
(2020-01-14, 19:28)nessus Wrote: I have another one.... when browsing inside TMDB Helper Addon lists or by selecting one of them as widget through skin shortcuts select widget dialog, the media flags are empty. All the other info are showing fine except this one. Is this too much of hassle to add?

By media flags, do you mean codec info? Because that's working fine for me for items in the library (as long as the option for kodi library info is enabled in TMDbHelper settings) 
Yes, codec, resolution etc. Indeed, it's working with that setting enabled but i was looking for some more out-of-the-box solution. But then again if it's too much hassle... no problem. Leave it like it is

Cheers
Nessus


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - jurialmunkey - 2020-01-17

(2020-01-15, 23:38)bsoriano Wrote:
(2020-01-15, 23:14)jurialmunkey Wrote: @bsoriano -

If you close the videoinfo dialog, the script thinks that you are pressing back, which removes the current path and replaces it with the previous path (or nothing if its the first).
If you close window 1134 the script clears all properties and exits. Activating another window closes the current window.
Basically, you can't close 1134 or videoinfo if you would like to keep the script active.

What might work is if you change your search window to a dialog and just open it on top of the videoinfo dialog without closing videoinfo or 1134. i.e. Remove the Dialog.Close onclick and add the following to your search window:
Code:
<window type="dialog" id="1131">


RE: Repo.
I have a repo with TMDbHelper beta versions maintained by @drinfernoo
https://jurialmunkey.github.io/repository.jurialmunkey/repository.jurialmunkey-1.2.zip

It is currently on 2.2.16 but it will get updated soon with the most recent version.
I'll be making a PR to official repo with the latest updates in the next week - just need to do a little bit more testing to make sure all the latest changes are stable.
@jurialmunkey , thanks! I will be trying this right away.  Understood about your repo; I will place a link to it in the Amber thread.

Regards,

Bart

EDIT: @jurialmunkey, thatnks again, this solved the navigation issue.  However, it brought other issues, like the fact that ListItem.xxxx now is the one from dialogvideoinfo.xml and not from the custom search window.  I solved that by replacing with Container.ListItem.xxxx.  What I have not solved is that now, if it is an online tmdb custom search, when you press i on any of the items, nothing happens, until I press Back or Esc, and then the info for that movie is shown.  Since the custom search is now a dialog and not a window, do I need to add a custom onclick to the results panel/list? Do I need to close the dialog for tmdb helper to properly open the info for the item?

A similar issue is happening if the custom search is local.  If I press Enter, the movie starts playing, but in the background.  I figure I can solve this like in the video info dialog Play/Close/Browse button.  However, if I press i, I do not get an info dialog for the item, until I press Back or Esc, and then it is shown.

Any ideas? Thanks again for your help.

You will need to close your search dialog window first before any actions. To open info you will need to run the call_auto method after

Code:

<onclick>Dialog.Close(1131)</onclick>
<onclick>RunScript(plugin.video.themoviedb.helper,add_path=$INFO[ListItem.FolderPath],call_auto=1134)</onclick>

You won't be able to do anything about <oninfo> - so you will need to make a decision about whether keeping the script active is more important.


(2020-01-16, 16:51)nessus Wrote:
(2020-01-15, 13:03)jurialmunkey Wrote:
(2020-01-14, 19:28)nessus Wrote: I have another one.... when browsing inside TMDB Helper Addon lists or by selecting one of them as widget through skin shortcuts select widget dialog, the media flags are empty. All the other info are showing fine except this one. Is this too much of hassle to add?

By media flags, do you mean codec info? Because that's working fine for me for items in the library (as long as the option for kodi library info is enabled in TMDbHelper settings)
Yes, codec, resolution etc. Indeed, it's working with that setting enabled but i was looking for some more out-of-the-box solution. But then again if it's too much hassle... no problem. Leave it like it is

Cheers
Nessus

Anything that adds overhead which isn't absolutely necessary is disabled by default in the script. I leave it up to users to decide what options they need. Having anything that decreases performance disabled by default makes it clear that there is a trade off between additional features and performance.


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - bsoriano - 2020-01-17

(2020-01-17, 00:56)jurialmunkey Wrote:
(2020-01-15, 23:38)bsoriano Wrote:
(2020-01-15, 23:14)jurialmunkey Wrote: @bsoriano -

If you close the videoinfo dialog, the script thinks that you are pressing back, which removes the current path and replaces it with the previous path (or nothing if its the first).
If you close window 1134 the script clears all properties and exits. Activating another window closes the current window.
Basically, you can't close 1134 or videoinfo if you would like to keep the script active.

What might work is if you change your search window to a dialog and just open it on top of the videoinfo dialog without closing videoinfo or 1134. i.e. Remove the Dialog.Close onclick and add the following to your search window:
Code:
<window type="dialog" id="1131">


RE: Repo.
I have a repo with TMDbHelper beta versions maintained by @drinfernoo
https://jurialmunkey.github.io/repository.jurialmunkey/repository.jurialmunkey-1.2.zip

It is currently on 2.2.16 but it will get updated soon with the most recent version.
I'll be making a PR to official repo with the latest updates in the next week - just need to do a little bit more testing to make sure all the latest changes are stable.
@jurialmunkey , thanks! I will be trying this right away.  Understood about your repo; I will place a link to it in the Amber thread.

Regards,

Bart

EDIT: @jurialmunkey, thatnks again, this solved the navigation issue.  However, it brought other issues, like the fact that ListItem.xxxx now is the one from dialogvideoinfo.xml and not from the custom search window.  I solved that by replacing with Container.ListItem.xxxx.  What I have not solved is that now, if it is an online tmdb custom search, when you press i on any of the items, nothing happens, until I press Back or Esc, and then the info for that movie is shown.  Since the custom search is now a dialog and not a window, do I need to add a custom onclick to the results panel/list? Do I need to close the dialog for tmdb helper to properly open the info for the item?

A similar issue is happening if the custom search is local.  If I press Enter, the movie starts playing, but in the background.  I figure I can solve this like in the video info dialog Play/Close/Browse button.  However, if I press i, I do not get an info dialog for the item, until I press Back or Esc, and then it is shown.

Any ideas? Thanks again for your help.    

You will need to close your search dialog window first before any actions. To open info you will need to run the call_auto method after

Code:

<onclick>Dialog.Close(1131)</onclick>
<onclick>RunScript(plugin.video.themoviedb.helper,add_path=$INFO[ListItem.FolderPath],call_auto=1134)</onclick>

You won't be able to do anything about <oninfo> - so you will need to make a decision about whether keeping the script active is more important.
 
(2020-01-16, 16:51)nessus Wrote:
(2020-01-15, 13:03)jurialmunkey Wrote: By media flags, do you mean codec info? Because that's working fine for me for items in the library (as long as the option for kodi library info is enabled in TMDbHelper settings)
Yes, codec, resolution etc. Indeed, it's working with that setting enabled but i was looking for some more out-of-the-box solution. But then again if it's too much hassle... no problem. Leave it like it is

Cheers
Nessus    

Anything that adds overhead which isn't absolutely necessary is disabled by default in the script. I leave it up to users to decide what options they need. Having anything that decreases performance disabled by default makes it clear that there is a trade off between additional features and performance.    

@jurialmunkey, thanks! I figured that I would have to rely on calling add_path, like in the lists in video info. Thanks for confirming. Keeping the script active is more important, since that means I don't have any navigation issues like I do now. The behavior of the search dialog will be consistent with the video info dialog.

Regards,

Bart

EDIT: @jurialmunkey , this is working very well, thanks again.  One additional question, how do I get the xsp path for a single episode so I can do an add_path call? In the onclick for my search dialog I got the xsp path for a movie and for a tv show (your code from Arctic Zephyr 2), but I don't know how to go about building a path to a specific episode.

What I have at the moment is this for the onclick:
xml:

<onclick>Dialog.Close(1131)</onclick>
                        <onclick condition="String.IsEmpty(Container.ListItem.DBID) | [!String.IsEqual(Container.ListItem.DBType,movie) + !String.IsEqual(Container.ListItem.DBType,tvshow) + !String.IsEqual(Container.ListItem.DBType,episode)]">RunScript(plugin.video.themoviedb.helper,add_path=$INFO[Container.ListItem.FolderPath],call_auto=1134)</onclick>
                        <onclick condition="!String.IsEmpty(Container.ListItem.DBID) + String.IsEqual(Container.ListItem.DBType,movie)">RunScript(plugin.video.themoviedb.helper,add_path=$INFO[Container.ListItem.Label,videodb://movies/titles/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22,%22%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D],call_auto=1134)</onclick>
                        <onclick condition="!String.IsEmpty(Container.ListItem.DBID) + String.IsEqual(Container.ListItem.DBType,tvshow)">RunScript(plugin.video.themoviedb.helper,add_path=$INFO[Container.ListItem.Label,videodb://tvshows/titles/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22,%22%5D%7D%5D%7D%2C%22type%22%3A%22tvshows%22%7D],call_auto=1134)</onclick>
                        

I realized that the path I had before would not work.  My issue is that when I present a list of episodes that an actor is in (the list source is also a dynamic videodb path), I do not have the DBID of the TV Show, which I could use to pass a videodb://tvshows/titles/<tv show dbid>/<season>/<episode dbid>?season=<season>&tvshowid=<tv show dbid> path to the add_path call.  The episode list items already have their dbid and season number.  Perhaps you could add the tvshow dbid to the service monitor if the item is an episode that is in the library?

Thanks again for all of your help.


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - dingdongdynamo - 2020-01-20

Been getting some errors related to TheMovieDbHelper lately. Happens when I go to the information page of movies. Here's the log that happening to a specific movie: https://paste.kodi.tv/puqagapuca.kodi


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - jurialmunkey - 2020-01-20

(2020-01-20, 18:00)dingdongdynamo Wrote: Been getting some errors related to TheMovieDbHelper lately. Happens when I go to the information page of movies. Here's the log that happening to a specific movie: https://paste.kodi.tv/puqagapuca.kodi
Update to latest git version - I already fixed this error I'm pretty sure.


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - bsoriano - 2020-01-21

@jurialmunkey , I am not sure if you saw my earlier post, I apologize if you already did.  Do you think you could add the tvshow dbid to the service monitor for episodes? I am having issues with passing Container.ListItem.FolderPath to the add_path call for an episode in my custom search dialog.  I am providing a list of the episodes in the library that star a specific actor.  If there are multiple episodes for the same show, when I pass Container.ListItem.FolderPath to the add_path call, I always get the video info for the first episode in the show.  So I thought that if, instead of the Container.ListItem.FolderPath, I passed the specific videodb:// path to the episode, I should get the correct video info dialog.  However, I do not have the dbid of the tv show to build that path.  Hence, my request.

Thanks for considering this.

Regards,

Bart


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - dingdongdynamo - 2020-01-21

(2020-01-20, 23:20)jurialmunkey Wrote:
(2020-01-20, 18:00)dingdongdynamo Wrote: Been getting some errors related to TheMovieDbHelper lately. Happens when I go to the information page of movies. Here's the log that happening to a specific movie: https://paste.kodi.tv/puqagapuca.kodi
Update to latest git version - I already fixed this error I'm pretty sure.

I have your repository installed and it says that it's already up to date (v2.2.24).


RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - jurialmunkey - 2020-01-21

(2020-01-21, 07:12)dingdongdynamo Wrote:
(2020-01-20, 23:20)jurialmunkey Wrote:
(2020-01-20, 18:00)dingdongdynamo Wrote: Been getting some errors related to TheMovieDbHelper lately. Happens when I go to the information page of movies. Here's the log that happening to a specific movie: https://paste.kodi.tv/puqagapuca.kodi
Update to latest git version - I already fixed this error I'm pretty sure.

I have your repository installed and it says that it's already up to date (v2.2.24).
Install latest git version please. Repo is behind.