Kodi Community Forum

Full Version: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
@jurialmunkey, I tried the first approach and I am just a few details away from getting it perfect, so thank you for your advice.

A couple of things I have not been able to manage yet:

1. Even though I have a <defaultcontrol> for the static list on the left side of the custom window, when the window loads, that control is not focused at load.  I even have a setfocus to the list onload, but it is still not focused.  I have to press any key to get the control to focus.  This only happens on the first load of the window.  On any subsequent loads, the control is correctly focused.

2. On the first load of the window, there is a visible delay while the day individual lists get filled from the plugin.  How would I go about adding some sort of busy loader until any of the lists is filled?

On another note, I think you might have to implement a matching of the tv shows by title and year as well as id.  I have the issue that I have the show "Homecoming" in my library.  This is a tv show from 2018.  In trakt.tv, there is also a Homecoming from 2019 and a Homecoming from 2020.  The 2020 one has episodes airing all of this week, and the plugin is showing me those, with the art from the Homecoming in my library, which is the 2018 one.

The Homecoming tv show in my library has the correct tvdb/tmdb/imdb ids.

Please let me know if there is any additional info you would like me to send you.  Thanks.

Regards,

Bart
(2020-03-04, 01:12)bsoriano Wrote: [ -> ]@jurialmunkey, I tried the first approach and I am just a few details away from getting it perfect, so thank you for your advice.

A couple of things I have not been able to manage yet:

1. Even though I have a <defaultcontrol> for the static list on the left side of the custom window, when the window loads, that control is not focused at load.  I even have a setfocus to the list onload, but it is still not focused.  I have to press any key to get the control to focus.  This only happens on the first load of the window.  On any subsequent loads, the control is correctly focused.

2. On the first load of the window, there is a visible delay while the day individual lists get filled from the plugin.  How would I go about adding some sort of busy loader until any of the lists is filled?

On another note, I think you might have to implement a matching of the tv shows by title and year as well as id.  I have the issue that I have the show "Homecoming" in my library.  This is a tv show from 2018.  In trakt.tv, there is also a Homecoming from 2019 and a Homecoming from 2020.  The 2020 one has episodes airing all of this week, and the plugin is showing me those, with the art from the Homecoming in my library, which is the 2018 one.

The Homecoming tv show in my library has the correct tvdb/tmdb/imdb ids.

Please let me know if there is any additional info you would like me to send you.  Thanks.

Regards,

Bart

For (1) my guess is what is happening is that the first item gets focused but then gets hidden because there are no items for it in the right list. Either that or no items in the left list are actually visible at very first load. You could try adding Container(LEFTLIST-ID).IsUpdating to each visibility condition in the left list in addition to the IsUpdating based on the right lists.

Alternatively you could setfocus to a hidden button that has every onright/onleft etc condition set to focus the left list. Doesn't give focus directly to the list but at least navigation doesn't get stuck.

For (2) something like this should work as busy loader visible condition.
Code:
![[!Container(5001).IsUpdating + Integer.IsGreater(Container(5001).NumItems,0)] | [!Container(5002).IsUpdating + Integer.IsGreater(Container(5002).NumItems,0)] | [!Container(5003).IsUpdating + Integer.IsGreater(Container(5003).NumItems,0)]]

Basically if any of the right side containers has stopped updating and has items, then we want to stop showing the busy loader. So we invert the condition by wrapping it in ![]

For (3) (the matching) - Yeah I'm working on getting some better library matching for tvshows. I don't think it will ever be perfect but there's definitely some improvements that can be made. I'll let you know.
(2020-03-04, 08:12)jurialmunkey Wrote: [ -> ]
(2020-03-04, 01:12)bsoriano Wrote: [ -> ]@jurialmunkey, I tried the first approach and I am just a few details away from getting it perfect, so thank you for your advice.

A couple of things I have not been able to manage yet:

1. Even though I have a <defaultcontrol> for the static list on the left side of the custom window, when the window loads, that control is not focused at load.  I even have a setfocus to the list onload, but it is still not focused.  I have to press any key to get the control to focus.  This only happens on the first load of the window.  On any subsequent loads, the control is correctly focused.

2. On the first load of the window, there is a visible delay while the day individual lists get filled from the plugin.  How would I go about adding some sort of busy loader until any of the lists is filled?

On another note, I think you might have to implement a matching of the tv shows by title and year as well as id.  I have the issue that I have the show "Homecoming" in my library.  This is a tv show from 2018.  In trakt.tv, there is also a Homecoming from 2019 and a Homecoming from 2020.  The 2020 one has episodes airing all of this week, and the plugin is showing me those, with the art from the Homecoming in my library, which is the 2018 one.

The Homecoming tv show in my library has the correct tvdb/tmdb/imdb ids.

Please let me know if there is any additional info you would like me to send you.  Thanks.

Regards,

Bart

For (1) my guess is what is happening is that the first item gets focused but then gets hidden because there are no items for it in the right list. Either that or no items in the left list are actually visible at very first load. You could try adding Container(LEFTLIST-ID).IsUpdating to each visibility condition in the left list in addition to the IsUpdating based on the right lists.

Alternatively you could setfocus to a hidden button that has every onright/onleft etc condition set to focus the left list. Doesn't give focus directly to the list but at least navigation doesn't get stuck.

For (2) something like this should work as busy loader visible condition.
Code:
![[!Container(5001).IsUpdating + Integer.IsGreater(Container(5001).NumItems,0)] | [!Container(5002).IsUpdating + Integer.IsGreater(Container(5002).NumItems,0)] | [!Container(5003).IsUpdating + Integer.IsGreater(Container(5003).NumItems,0)]]

Basically if any of the right side containers has stopped updating and has items, then we want to stop showing the busy loader. So we invert the condition by wrapping it in ![]

For (3) (the matching) - Yeah I'm working on getting some better library matching for tvshows. I don't think it will ever be perfect but there's definitely some improvements that can be made. I'll let you know.  
@jurialmunkey , thank you so much for your recommendations! The hidden button did the trick, and the busy loader visible condition as well.  

EDIT: @jurialmunkey , would you also consider adding the season poster as part of the artwork returned? That way, in the widget, I can show the poster for the correct season of the episode, if available, and not the tv show poster.

Regards,

Bart
@jurialmunkey, would you also consider adding the duration as part of the listitem infolabels for the Next Aired function? Thanks.

Regards,

Bart
(2020-03-09, 16:24)bsoriano Wrote: [ -> ]@jurialmunkey, would you also consider adding the duration as part of the listitem infolabels for the Next Aired function? Thanks.

Regards,

Bart
Is duration not available now? Ill double check but if it's not available then that probably means that tmdb doesn't have that info for that item yet. Duration is a standard label for the detailed info of an episode, and next aired items should have all the same info as detailed item.
(2020-03-09, 23:27)jurialmunkey Wrote: [ -> ]
(2020-03-09, 16:24)bsoriano Wrote: [ -> ]@jurialmunkey, would you also consider adding the duration as part of the listitem infolabels for the Next Aired function? Thanks.

Regards,

Bart
Is duration not available now? Ill double check but if it's not available then that probably means that tmdb doesn't have that info for that item yet. Duration is a standard label for the detailed info of an episode, and next aired items should have all the same info as detailed item. 
@jurialmunkey , no, duration is not available.  It isn't available while browsing the addon (next aired function) either.

Regards,

Bart
(2020-03-10, 00:00)bsoriano Wrote: [ -> ]
(2020-03-09, 23:27)jurialmunkey Wrote: [ -> ]
(2020-03-09, 16:24)bsoriano Wrote: [ -> ]@jurialmunkey, would you also consider adding the duration as part of the listitem infolabels for the Next Aired function? Thanks.

Regards,

Bart
Is duration not available now? Ill double check but if it's not available then that probably means that tmdb doesn't have that info for that item yet. Duration is a standard label for the detailed info of an episode, and next aired items should have all the same info as detailed item. 
@jurialmunkey , no, duration is not available.  It isn't available while browsing the addon (next aired function) either.

Regards,

Bart

Hmm it looks like TMDB API doesn't return duration for episodes only for movies.
(2020-03-10, 11:49)jurialmunkey Wrote: [ -> ]Hmm it looks like TMDB API doesn't return duration for episodes only for movies. 

It doesn't. That's the reason I switched back for my scraping needs from TMDB to TVDB.
I think Trakt is returning duration for episodes.
Since this helper add-on uses Trakt too, maybe you could get the duration from Trakt.
I have no idea if what I am suggesting could work though  Smile
(2020-03-10, 18:09)olympus Wrote: [ -> ]
(2020-03-10, 11:49)jurialmunkey Wrote: [ -> ]Hmm it looks like TMDB API doesn't return duration for episodes only for movies. 

It doesn't. That's the reason I switched back for my scraping needs from TMDB to TVDB.
I think Trakt is returning duration for episodes.
Since this helper add-on uses Trakt too, maybe you could get the duration from Trakt.
I have no idea if what I am suggesting could work though  Smile

Yeah unfortunately Trakt doesn't provide runtime by default in the calendar API request call. So it has to use the ?extended=full param which takes longer to make the request.

I've decided to add it for the NextAired calendar -- I think the trade-off of a longer wait time is worthwhile for duration since it is a pretty key piece of information for NextAired. @bsoriano - Can you test latest? Should now get duration.
(2020-03-11, 03:02)jurialmunkey Wrote: [ -> ]
(2020-03-10, 18:09)olympus Wrote: [ -> ]
(2020-03-10, 11:49)jurialmunkey Wrote: [ -> ]Hmm it looks like TMDB API doesn't return duration for episodes only for movies. 

It doesn't. That's the reason I switched back for my scraping needs from TMDB to TVDB.
I think Trakt is returning duration for episodes.
Since this helper add-on uses Trakt too, maybe you could get the duration from Trakt.
I have no idea if what I am suggesting could work though  Smile 

Yeah unfortunately Trakt doesn't provide runtime by default in the calendar API request call. So it has to use the ?extended=full param which takes longer to make the request.

I've decided to add it for the NextAired calendar -- I think the trade-off of a longer wait time is worthwhile for duration since it is a pretty key piece of information for NextAired. @bsoriano - Can you test latest? Should now get duration. 
@jurialmunkey , confirmed, now duration is there.  Please do not forget about a solution for shows with the same name from different years.  Thanks.

Regards,

Bart
Hi, when using themoviedb player and open a movie information screen and press Play nothing happens. When opening context menu for the same movie and press play through Emby all is working.

Is this a bug in play button in information screen?

I have in addon setting to play/open movie when clicking.

In kodi Setting I have open information when clicking on movie.
(2020-03-12, 00:21)Rijs43 Wrote: [ -> ]Hi, when using themoviedb player and open a movie information screen and press Play nothing happens. When opening context menu for the same movie and press play through Emby all is working.

Is this a bug in play button in information screen?

I have in addon setting to play/open movie when clicking.

In kodi Setting I have open information when clicking on movie.
What skin? Have you tested in Estuary? If it works in Estuary but not the skin you're using then it's a skin issue.
@jurialmunkey - I am using themoviedb player in combination with AuraMod and Emby Addon. Some movies in my library works for lets say 'TMDB Trending This Week', others are not working however available in my Emby library.

I have tested also with Estuary and Embuary but same issue.

When opening context menu from widget, some movies are showing option 'Emby Play' others which are in my Library do not show the option 'Emby Play'.
Hi jurialmunkey!

This isn't only an issue with your plugin but anything that loads when DialogVideoInfo is opened. The fps drop to ~25fps.

The FPS stays low until either scrolling many pages, exiting windows like going back to the home screen from MyVideoNav, or opening a new window like the one I have for displaying fullscreen fanart.

I think it is an old Kodi bug involving a threading issue where loading the plugin content throttles the rendering somehow... Huh It may even be Microsoft Windows specific but not sure.

When I disable loading of content paths that use plugins the problem disappears.

Any ideas how to mitigate it on the skinning side?

Thanks
(2020-03-13, 20:19)Rijs43 Wrote: [ -> ]@jurialmunkey - I am using themoviedb player in combination with AuraMod and Emby Addon. Some movies in my library works for lets say 'TMDB Trending This Week', others are not working however available in my Emby library.

I have tested also with Estuary and Embuary but same issue.

When opening context menu from widget, some movies are showing option 'Emby Play' others which are in my Library do not show the option 'Emby Play'.

Emby play context menu has nothing to do with this addon - that context menu is provided by emby. The only context menu items this addon provides are add/remove from trakt watchlist/history/collection and add to library, browse season and play using.

I would need full debug log (including tmdbhelper debugging turned on), details about exact steps of what is attempting to be played, and a copy of the player being used to diagnose why some items cannot be played.