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.
(2020-02-27, 13:39)xpronic Wrote: [ -> ]I'm having trouble getting tmdb helper to play the next episodes from Saga of Tanya the Evil, In/Spectre, and Lincoln Rhyme: Hunt for the Bone Collector using the Your Next Episodes widget. For other tv shows it's working fine for the content I have in my library. I'm using the tmdb scraper for my video sources, which are from 6 differrent folders shared from my Windows 10 PC: 4K TV Shows, 4K Movies, Kids, TV Shows, Anime, Movies.

Kodi Log
Can you turn debug logging on in tmdbhelper's expert settings and get me a new log?

Usually local library not playing is because of a title mismatch.

Also try turning on fuzzy matches for tvshows in player settings.
(2020-02-27, 22:36)jurialmunkey Wrote: [ -> ]
(2020-02-27, 13:39)xpronic Wrote: [ -> ]I'm having trouble getting tmdb helper to play the next episodes from Saga of Tanya the Evil, In/Spectre, and Lincoln Rhyme: Hunt for the Bone Collector using the Your Next Episodes widget. For other tv shows it's working fine for the content I have in my library. I'm using the tmdb scraper for my video sources, which are from 6 differrent folders shared from my Windows 10 PC: 4K TV Shows, 4K Movies, Kids, TV Shows, Anime, Movies.

Kodi Log
Can you turn debug logging on in tmdbhelper's expert settings and get me a new log?

Usually local library not playing is because of a title mismatch.

Also try turning on fuzzy matches for tvshows in player settings.  

Fuzzy matches switched on for both movies and tv shows, Kodi Log. Still not playing Saga of Tanya the Evil, and now most of the movies that were working before in trending tab, not working either.
(2020-02-28, 03:06)xpronic Wrote: [ -> ]
(2020-02-27, 22:36)jurialmunkey Wrote: [ -> ]
(2020-02-27, 13:39)xpronic Wrote: [ -> ]I'm having trouble getting tmdb helper to play the next episodes from Saga of Tanya the Evil, In/Spectre, and Lincoln Rhyme: Hunt for the Bone Collector using the Your Next Episodes widget. For other tv shows it's working fine for the content I have in my library. I'm using the tmdb scraper for my video sources, which are from 6 differrent folders shared from my Windows 10 PC: 4K TV Shows, 4K Movies, Kids, TV Shows, Anime, Movies.

Kodi Log
Can you turn debug logging on in tmdbhelper's expert settings and get me a new log?

Usually local library not playing is because of a title mismatch.

Also try turning on fuzzy matches for tvshows in player settings.  

Fuzzy matches switched on for both movies and tv shows, Kodi Log. Still not playing Saga of Tanya the Evil, and now most of the movies that were working before in trending tab, not working either.
I think part of that log is missing. I can't see the point where you attempted to play something.
@jurialmunkey ,  I've just tried to play latest episode of Outmatched and it didn't do anything, tried episode of The Flash and it worked fine. Google Drive link to log file. Too big for kodi paste upload.
(2020-02-28, 09:39)xpronic Wrote: [ -> ]@jurialmunkey ,  I've just tried to play latest episode of Outmatched and it didn't do anything, tried episode of The Flash and it worked fine. Google Drive link to log file. Too big for kodi paste upload.

Hmm. This is really odd. I can see Flash being played but I can't even see a failed attempt to play Outmatched, which would suggest no tmdb_id. However, it appears to be matching correctly so it really should have a tmdb_id.

Can you download latest git version and try playing it again and get me the debug log.

Sorry about all the back and forth with logs - it is a very strange issue. Hopefully the additional logging I've just added will give a clearer picture.
@jurialmunkey, debug log from latest git version. Still isn't picking up Outmatched, is it a problem with the tmdb scraper I'm using, should I rescan everything using the tvdb scraper?
(2020-02-28, 17:34)xpronic Wrote: [ -> ]@jurialmunkey, debug log from latest git version. Still isn't picking up Outmatched, is it a problem with the tmdb scraper I'm using, should I rescan everything using the tvdb scraper?

Hmmm. This is so odd. I can see you attempt to play Gotham, The Flash, and Marvel Agents of SHIELD - but no Outmatched. Not even an attempt to play is showing, which is really really odd.

No need to re-scan your library, as the plugin is not even getting to the point of running the player function let alone looking for the correct file. (Plus TMDb is better than TVDb for the purposes here anyway since I'm also using TMDb data). It's really weird because the player method doesn't appear to even be called by Kodi at all.

Can you download latest git version and we'll try again. Also, can you turn on Kodi's debug logging?
Settings > System > Logging > Enable debug logging

I'm beginning to suspect it might be some weird Kodi bug rather than something wrong with my plugin.
@jurialmunkey, here's the latest log file.
(2020-02-29, 00:19)jurialmunkey Wrote: [ -> ]I'm beginning to suspect it might be some weird Kodi bug rather than something wrong with my plugin. 

I think you might be right, this is a screenshot of the shield home screen showing the Bullying episode of Outmatched "playing" on Kodi...
(2020-02-29, 03:03)xpronic Wrote: [ -> ]@jurialmunkey, here's the latest log file.
(2020-02-29, 00:19)jurialmunkey Wrote: [ -> ]I'm beginning to suspect it might be some weird Kodi bug rather than something wrong with my plugin. 

I think you might be right, this is a screenshot of the shield home screen showing the Bullying episode of Outmatched "playing" on Kodi...

Yes it's really odd. Kodi is simply just not calling the plugin to play for that item and it doesn't really make sense.

Are you attempting to play from inside the info dialog in AZ2? The only thing I can think is that it is a skin issue with the play button not working properly for some items for some reason.

Can you try using default Estuary and opening the item from inside the addon itself. If it works there then at least we know that it's a problem with the skin and not the plugin or Kodi. Otherwise I'm completely stumped for what the cause might be.
@jurialmunkey, Tried from within the addon in the Estuary skin, same result.
(2020-02-29, 04:46)jurialmunkey Wrote: [ -> ]Are you attempting to play from inside the info dialog in AZ2? The only thing I can think is that it is a skin issue with the play button not working properly for some items for some reason.
This is it. I had default select action set to show information instead of play! Switched it to play, and its working. Thank you for your patience. This is the log when attempting to play with the Estuary skin if you still want to have a look.
(2020-02-29, 06:41)xpronic Wrote: [ -> ]@jurialmunkey, Tried from within the addon in the Estuary skin, same result.
(2020-02-29, 04:46)jurialmunkey Wrote: [ -> ]Are you attempting to play from inside the info dialog in AZ2? The only thing I can think is that it is a skin issue with the play button not working properly for some items for some reason.
This is it. I had default select action set to show information instead of play! Switched it to play, and its working. Thank you for your patience. This is the log when attempting to play with the Estuary skin if you still want to have a look.

I'm glad we got to the bottom of that one! Though it is very strange that the play button in the info dialog is only working for some items. Definitely a skin bug though and not a plugin issue - I'll have to look into way AZ2 play button is behaving that way.
(2020-02-23, 00:45)jurialmunkey Wrote: [ -> ]
(2020-02-22, 17:00)bsoriano Wrote: [ -> ]
(2020-02-22, 16:12)jurialmunkey Wrote: [ -> ]Yeah Better Call Saul is not matching with your library.

Most likely the year matching issue. Latest master version has matching without year - probably better to get the occasional false positive than to miss shows.

If it still doesn't work, then there's nothing I can do about it because it means the title in your library doesn't match the title on trakt. 
@jurialmunkey , thanks!! Now I get ll of the shows, including Better Call Saul. Smile

For some days there is an N/A episode shown.  I guess there is something in trakt.tv that does not match anything in tmdb? If this is not something you want to look into, no worries.  I can live with that, now I can use this as a widget daily.

Thanks again!

Regards,

Bart
Either TMDb is lagging behind in its syncing with TVDb and so doesn't have the info yet, or Trakt doesn't have a TMDb ID for that show so the look-up is failing.

I've added some basic fallback info from Trakt and a double-checks that Trakt has the TMDB ID
Can you test latest master and see if it helps with the missing info?

@bsoriano - Did you get a chance to test these changes and see if you were no longer getting the N/A?

Also, I saw in the embuary info thread that you were thinking about replicating Next Aired.
Here's how I've achieved that using TMDbHelper in a Custom Window:
ListItem.Property(widget) contains the day name.

xml:

<include content="DialogVideoInfo_WidgetGroupList">
<include content="Info_Widget_Poster" description="Yesterday">
<param name="id" value="5000" />
<param name="label" value="Yesterday" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=-1&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Today">
<param name="id" value="5001" />
<param name="label" value="Today" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=0&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Tomorrow">
<param name="id" value="5002" />
<param name="label" value="Tomorrow" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=1&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Day3">
<param name="id" value="5003" />
<param name="label" value="$INFO[Container(5003).ListItem.Property(widget)]" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=2&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Day4">
<param name="id" value="5004" />
<param name="label" value="$INFO[Container(5004).ListItem.Property(widget)]" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=3&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Day5">
<param name="id" value="5005" />
<param name="label" value="$INFO[Container(5005).ListItem.Property(widget)]" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=4&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Day6">
<param name="id" value="5006" />
<param name="label" value="$INFO[Container(5006).ListItem.Property(widget)]" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=5&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Day7">
<param name="id" value="5007" />
<param name="label" value="$INFO[Container(5007).ListItem.Property(widget)]" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=6&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Day8">
<param name="id" value="5008" />
<param name="label" value="$INFO[Container(5008).ListItem.Property(widget)]" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=7&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
</include>
(2020-03-02, 11:24)jurialmunkey Wrote: [ -> ]
(2020-02-23, 00:45)jurialmunkey Wrote: [ -> ]
(2020-02-22, 17:00)bsoriano Wrote: [ -> ]@jurialmunkey , thanks!! Now I get ll of the shows, including Better Call Saul. Smile

For some days there is an N/A episode shown.  I guess there is something in trakt.tv that does not match anything in tmdb? If this is not something you want to look into, no worries.  I can live with that, now I can use this as a widget daily.

Thanks again!

Regards,

Bart
Either TMDb is lagging behind in its syncing with TVDb and so doesn't have the info yet, or Trakt doesn't have a TMDb ID for that show so the look-up is failing.

I've added some basic fallback info from Trakt and a double-checks that Trakt has the TMDB ID
Can you test latest master and see if it helps with the missing info?   

@bsoriano - Did you get a chance to test these changes and see if you were no longer getting the N/A?

Also, I saw in the embuary info thread that you were thinking about replicating Next Aired.
Here's how I've achieved that using TMDbHelper in a Custom Window:
ListItem.Property(widget) contains the day name.

xml:

<include content="DialogVideoInfo_WidgetGroupList">
<include content="Info_Widget_Poster" description="Yesterday">
<param name="id" value="5000" />
<param name="label" value="Yesterday" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=-1&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Today">
<param name="id" value="5001" />
<param name="label" value="Today" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=0&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Tomorrow">
<param name="id" value="5002" />
<param name="label" value="Tomorrow" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=1&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Day3">
<param name="id" value="5003" />
<param name="label" value="$INFO[Container(5003).ListItem.Property(widget)]" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=2&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Day4">
<param name="id" value="5004" />
<param name="label" value="$INFO[Container(5004).ListItem.Property(widget)]" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=3&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Day5">
<param name="id" value="5005" />
<param name="label" value="$INFO[Container(5005).ListItem.Property(widget)]" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=4&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Day6">
<param name="id" value="5006" />
<param name="label" value="$INFO[Container(5006).ListItem.Property(widget)]" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=5&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Day7">
<param name="id" value="5007" />
<param name="label" value="$INFO[Container(5007).ListItem.Property(widget)]" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=6&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
<include content="Info_Widget_Poster" description="Day8">
<param name="id" value="5008" />
<param name="label" value="$INFO[Container(5008).ListItem.Property(widget)]" />
<content>plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=7&amp;days=1&amp;widget=True&amp;type=episode</content>
</include>
</include>
 
@jurialmunkey , my apologies, I thought I had replied before.  I did test and did not get any N/As.  Sometimes there is an episode that I don't know where it is coming from, but I imagine that is issues with tmdb/trakt.  

EDIT: For some reason, The Outsider is not showing up for yesterday, even though the episode appears in trakt and tmdb for yesterday.  I did check that the tv show has a tvdb and imdb id stored in my library.

Yes, I want to replace both my "TV Guide" window and my Next Aired episodes widget.  Thanks for sharing the code you are using.  Is this already in Arctic Zephyr 2 or is this code from Arctic Horizon? Just curious.

For my tv guide window, I want to recreate this, which is what I have in Amber today:

Image

Do you think I could do that with tmdb helper? For instance, how could I get just the first studio (network)? 

I guess that each row on the left would be a list with the correct content path from the plugin, and on the right all of the listitems from each list? Please let me know any suggestions you have as to how best recreate this window.  Thanks.

Regards,

Bart
@bsoriano

Yeah, you should be able to recreate that view.

RIGHT SIDE
Each day requires an individual list with a unique ID.

The content path is relatively simple:
xml:
<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=0&amp;days=1&amp;widget=True&amp;type=episode</content>

Change the startdate value for each day in the list. -1 is yesterday, 0 is today, 1 is tomorrow etc.

LEFT SIDE
A normal list with static content items.
The container number should be the right side list for that day.
(I've just pushed an update to get the short versions of air_day/air_date)
xml:

<item id="1">
<label>$INFO[Container(5001).ListItemAbsolute(0).Property(air_day_short)]$INFO[Container(5001).NumItems, (,)]</label>
<label2>$INFO[Container(5001).ListItemAbsolute(0).Property(air_date_short)]</label2>
<visible>Integer.IsGreater(Container(5001).NumItems,0) | Container(5001).IsUpdating</visible>
</item>
<item id="2">
<label>$INFO[Container(5002).ListItemAbsolute(0).Property(air_day_short)]$INFO[Container(5002).NumItems, (,)]</label>
<label2>$INFO[Container(5002).ListItemAbsolute(0).Property(air_date_short)]</label2>
<visible>Integer.IsGreater(Container(5002).NumItems,0) | Container(5002).IsUpdating</visible>
</item>
etc.

RIGHT SIDE (AGAIN)
Each list on the right should have a visible condition based upon the item in the left side list (I've used 4000 as the left list ID)
e.g.
<visible allowhiddenfocus="true">Container(4000).HasFocus(1)</visible>

Since the items have detailed info, you can get the 1st studio name with:
$INFO[ListItem.Property(Studio.1.Name)]

You can get any detailed item label
https://github.com/jurialmunkey/plugin.v...ailed-Item

To get status, you can use:
$INFO[ListItem.Status]

If you want landscape art (not just fanart/poster) then you will also need fanarttv param in the content path:
Code:
&amp;fanarttv=True

Alternative Approach
The other approach you could use is you could just use the calendar plugin path for the left list
xml:
<content target="videos">plugin://plugin.video.themoviedb.helper/?fanarttv=True&info=library_nextaired&nextpage=True&type=tv</content>

And then have a right side list that gets the folderpath from the left list
xml:
<content target="videos">$INFO[Container(4000).ListItem.FolderPath]</content>

This way is much easier to implement but obviously you have much less control over exactly which lists are shown.
(2020-03-03, 00:04)jurialmunkey Wrote: [ -> ]@bsoriano

Yeah, you should be able to recreate that view.

RIGHT SIDE
Each day requires an individual list with a unique ID.

The content path is relatively simple:
xml:
<content target="videos">plugin://plugin.video.themoviedb.helper/?info=library_nextaired&amp;startdate=0&amp;days=1&amp;widget=True&amp;type=episode</content>

Change the startdate value for each day in the list. -1 is yesterday, 0 is today, 1 is tomorrow etc.

LEFT SIDE
A normal list with static content items.
The container number should be the right side list for that day.
(I've just pushed an update to get the short versions of air_day/air_date)
xml:

<item id="1">
<label>$INFO[Container(5001).ListItemAbsolute(0).Property(air_day_short)]$INFO[Container(5001).NumItems, (,)]</label>
<label2>$INFO[Container(5001).ListItemAbsolute(0).Property(air_date_short)]</label2>
<visible>Integer.IsGreater(Container(5001).NumItems,0) | Container(5001).IsUpdating</visible>
</item>
<item id="2">
<label>$INFO[Container(5002).ListItemAbsolute(0).Property(air_day_short)]$INFO[Container(5002).NumItems, (,)]</label>
<label2>$INFO[Container(5002).ListItemAbsolute(0).Property(air_date_short)]</label2>
<visible>Integer.IsGreater(Container(5002).NumItems,0) | Container(5002).IsUpdating</visible>
</item>
etc.

RIGHT SIDE (AGAIN)
Each list on the right should have a visible condition based upon the item in the left side list (I've used 4000 as the left list ID)
e.g.
<visible allowhiddenfocus="true">Container(4000).HasFocus(1)</visible>

Since the items have detailed info, you can get the 1st studio name with:
$INFO[ListItem.Property(Studio.1.Name)]

You can get any detailed item label
https://github.com/jurialmunkey/plugin.v...ailed-Item

To get status, you can use:
$INFO[ListItem.Status]

If you want landscape art (not just fanart/poster) then you will also need fanarttv param in the content path:
Code:
&amp;fanarttv=True

Alternative Approach
The other approach you could use is you could just use the calendar plugin path for the left list
xml:
<content target="videos">plugin://plugin.video.themoviedb.helper/?fanarttv=True&info=library_nextaired&nextpage=True&type=tv</content>

And then have a right side list that gets the folderpath from the left list
xml:
<content target="videos">$INFO[Container(4000).ListItem.FolderPath]</content>

This way is much easier to implement but obviously you have much less control over exactly which lists are shown.

@jurialmunkey, thank you so much! I will look into both approaches. Even though the second one is simpler, I think I prefer the control of the first one.

Regards,

Bart