Plugin.video.themoviedb.helper: Solution for Widgets

Created on 7 Dec 2019  路  22Comments  路  Source: jurialmunkey/plugin.video.themoviedb.helper

I had considered using this to populate widgets on my homescreen, but ran into a snag. On selection, rather than playing, the add-on opens into that item's "detail view".

I propose the current functionality be moved into a "script" interface, and to allow the "video" interface for the add-on to only contain the video file entries, as well as the "drill down" into seasons/episodes for TV shows.

Would that be possible?

All 22 comments

You can click the first item in the details view to play the item.

I'm planning on adding a toggle in settings on what default action for widgets should be.

That will work as well!

@drinfernoo - Latest version now has an option in settings for Default Widget Action.

Default action is to Play if a movie/episode and Open Seasons if a tvshow.

However, if you go into the addon through video-addons, then it should behave the normal way and show detailed item with additional lists such as "Recommended" "Cast" etc. This behaviour can be forced in a widget by adding the param &browse=True to the plugin path (in case you want a few widgets that still open the browser as normal rather than play/open).

Other default widget action settings are "Browse" (opens detailed item) and "Choose" (opens detailed item but immediately pops up the context menu with the options to Play or Browse).

I'll give it a shot soon!

Actually, looks there's a bug which causing a crash. Trying to figure a solution out.

@drinfernoo - Okay, I think it is working properly now.

I had to change my approach a little bit to ensure backwards compatibility.

Instead of having options in the setting dialog, there is now just a &widget=True param that can be added to the widget path to change the default action to play.

Any newly added widgets will automatically have &widget=True but old widgets will either need to be re-added or manually edited.

@jurialmunkey I have an option in my mod of your Aura skin that sets an onclick action for all video content widgets / dynamic lists to open VideoInfo (similar to setting Kodi's "default select action" to Show Information).

When accessing TMDBhelper via video-addons, Kodi appears to ignore the onclick and uses the default kodi select action (play) which takes you into the tmdbhelper detailed info / recommended / etc.

Do you have any suggestions - other than changing Kodi's "default select action" - for forcing VideoInfo to be the default select action when in video-adons / MyVideoNav?

@skyfsza - I've added an option in settings to change the default action in the addon (Browse | Play | Show Info)

@skyfsza - I've added an option in settings to change the default action in the addon (Browse | Play | Show Info)

perfect, thank you!

I may be doing something wrong, but none of the options for "Default select action in addon" seem to actually do anything for widgets 馃槮 I pointed a widget at this add-on (well, one for movies and one for shows), and when selecting an item, I either get a never-ending busy spinner, which I can back out of, to little effect... or a random info dialog, or sometimes both?

Everything works well inside the add-on, but widget functions seem completely broken on latest.

I may be doing something wrong, but none of the options for "Default select action in addon" seem to actually _do_ anything for widgets 馃槮 I pointed a widget at this add-on (well, one for movies and one for shows), and when selecting an item, I either get a never-ending busy spinner, which I can back out of, to little effect... or a random info dialog, or sometimes both?

Everything works well inside the add-on, but widget functions seem completely broken on latest.

Widgets are working fine for me.

However, the default select action doesn't affect widgets unless you remove the &widget=True param from the widget path (basically the widget param overrides that setting and forces it to be play).

@jurialmunkey Oh, I think I've had it backwards! I wasn't removing that, because it was true that it was a widget 馃槄

Given that we need to remove that argument, could AZ2 get the ability to manually edit the action for a widget?

I really feel like something's not right. Without the &widget=True parameter, all I ever get is the information dialog, regardless of the default action setting, and with it, things are broken as per my previous report...

@drinfernoo - Anything mentioned in the debug log? I'm definitely not getting the behaviour you describe. I've been using on LibreELEC and Windows for the majority of my widgets and I haven't encountered any issues of this sort.

Also, do you have Trakt authenticated? Also what widgets does this issue happen with?

I'm gonna update repo with latest tonight and I'll do some more thorough testing.

To be clear: the default behavior when setting a widget, is that it will have &widget=True appended, forcing the widget to play by default. By removing that tag, it should respect the setting for the default action?

To be clear: the default behavior when setting a widget, is that it will have &widget=True appended, forcing the widget to play by default. By removing that tag, it should respect the setting for the default action?

Yes, that's correct. As long as the skin itself doesn't override the <onclick> action for the widget (skins can specify onclick for dynamic content paths but not views in media windows).

Which, as I say that, I realise that there is a special onclick action specified in AZ2 for widgets from TMDbHelper - I use a modified stripped-back version of AZ2 at home which is why I wasn't see that issue. Pushing a fix to AZ2 now

@drinfernoo - okay I've pushed a fix to AZ2 for the widgets issue.

I've just updated the repo to the latest of both add-ons, and am not seeing the default action setting being respected. Leaving the widget with &amp;widget=True does seem to let it default to "Play/Open", but removing that tag makes it "Browse", no matter the action I've selected in settings.

@drinfernoo Can you try again with latest version of plugin?

EDIT: Actually, I seem to be having the reverse problem now. Hold-up and I'll see if I can fix.

Should be working with latest update. Need to ReloadSkin() if you change the setting.

Was this page helpful?
0 / 5 - 0 ratings