drinfernoo / plugin.program.autowidget

AutoWidget is a program add-on for Kodi, designed to give a more dynamic and interesting experience to using skin widgets.
74 stars 17 forks source link

[Request] Hide watched items in lists #17

Closed swisslis closed 4 years ago

swisslis commented 4 years ago

Is your feature request related to a problem? Please describe. I use (and love!) autowidget and getting to grips. I have made a group which has various trakt lists in via TMDB Helper. I have hide watched enabled on these, and in TMDB helper they are hidden but when they come up on autowidget they are not.

Describe the solution you'd like An option to force hiding of watched items on the autowidget lists

Describe alternatives you've considered I have ensured hiding on lists within tmdb helper, have ticked the 'hide watched items in widgets' option in tmdb helper incase that made a difference. I dont think this is a bug, or am i just being stupid?

Additional context The example being 'top 100 imdb list' as easy example fo a trakt list with popular movies, i have seen many so they are hidden within that list via tmdb helper, but they show up on my autowidget, widget screen with ticks on. So they are recognising they are watched, just not hidden.

Thank you for your time already spent on this, and reading my issue.

drinfernoo commented 4 years ago

Hey, thanks for the kind words up top!

Can you maybe show some screenshots or give incredibly specific examples?

This should never be an issue, at all. AutoWidget does not populate the items into the widget, nor does it manipulate them in any way. If you add a path from Netflix, TheMovieDb Helper, your library, or anything else or that matter, to a widget group, and it gets chosen whenever the path initializes or refreshes... then that widget is getting filled by the add-on in question.

Disclaimer: The following applies only to widget groups, and not shortcut groups.

A more concrete example:

I add TheMovieDb Helper -> Movies -> Popular to an existing (or new, makes no difference) widget group, and then point a widget to that group's "Random Path" menu. The path that gets added to the skin is a path into AutoWidget, which looks something like ActivateWindow(Programs,plugin://plugin.program.autowidget/...,return).

After I choose to "Initialize Widgets", AutoWidget "converts" the aforementioned AutoWidget path into one that is defined in the group, and replaces it. There is a bit of behind-the-scenes "magic" that happens with skin strings, but the final path ends up being one from TheMovieDb Helper, complete with all of the properties that are handled by the add-on, including the path, context menu items, watched indicators, metadata, and anything else.

To be clear: After initialization, AutoWidget is no longer responsible for items that get displayed in widgets.

Any inconsistency that you are seeing regarding watched indicators, hidden items, or sorting, *are not AutoWidget's fault, as it does absolutely no manipulation** on those items, and they should be brought up with the developer of the add-on in question.


After typing all of that out, I decided it would be prudent to actually test it for myself... and I was able to replicate your issue. I did so by visiting TheMovieDb Helper -> Trending Today, and the only movie in that menu which I had watched was Star Wars: Episode IX: The Rise of Skywalker. I turned on "Hide watched items on widgets", and pointed a widget directly to that menu. The movie did not show.

I then created an AutoWidget group containing only that path, then pointed a widget at it, and initialized it. What I found surprised me, because Star War IX was actually showing on the widget.

Honestly, I have no idea why this would be, or how I can control it, considering that I am not affecting the content of the widget in any way... But I suppose this is an active issue.

swisslis commented 4 years ago

Hey, thanks for your reply

Was reading through, and I'm 'glad' that you got the same issue, not glad its a nuisance but glad at least it could be replicated and wasn't something my end specifically with me being stupid!

It makes perfect sense what you are saying, which unfortunately means this issue makes no sense! I can see how autowidget wouldn't manipulate the information in any way, purely show/present it. So at what point does that information (an item being watched and requested to be hidden) alter?

For reference, i have just tried pulling a request from both Seren (Discover Movies - Genre - Horror) and it also shows the same behaviour : Within Seren I have option to hide watched items activiated, and none show within this list. But when pulled on the widget from Autowidgets, i have numerous watched films showing. Utterly bizarre.

Sorry i have no idea about programming etc so cant help in that way, but hoping that at least showing it is seemingly irrelevant of the source pulled from (TMDBHelper, Seren etc) the unusual behaviour remains.

Its not a massive issue in theory, but for my needs its quite a shame as my idea was to use Autowidgets to point to multiple trakt lists so it cuts out that #'what to watch' discussion (read: Argument!!) and just pick one from the list 'at random'. Sadly, with watched films still showing, this presents an issue.

Hope this can be figured out, though i dont know where to start!!


From: drinfernoo notifications@github.com Sent: 03 May 2020 04:34 To: drinfernoo/plugin.program.autowidget plugin.program.autowidget@noreply.github.com Cc: swisslis swiss_lis@hotmail.com; Author author@noreply.github.com Subject: Re: [drinfernoo/plugin.program.autowidget] [Request] Hide watched items in lists (#17)

Hey, thanks for the kind words up top!

Can you maybe show some screenshots or give incredibly specific examples?

This should never be an issue, at all. AutoWidget does not populate the items into the widget, nor does it manipulate them in any way. If you add a path from Netflix, TheMovieDb Helper, your library, or anything else or that matter, to a widget group, and it gets chosen whenever the path initializes or refreshes... then that widget is getting filled by the add-on in question.

Disclaimer: The following applies only to widget groups, and not shortcut groups.

A more concrete example:

I add TheMovieDb Helper -> Movies -> Popular to an existing (or new, makes no difference) widget group, and then point a widget to that group's "Random Path" menu. The path that gets added to the skin is a path into AutoWidget, which looks something like ActivateWindow(Programs,plugin://plugin.program.autowidget/...,return).

After I choose to "Initialize Widgets", AutoWidget "converts" the aforementioned AutoWidget path into one that is defined in the group, and replaces it. There is a bit of behind-the-scenes "magic" that happens with skin strings, but the final path ends up being one from TheMovieDb Helper, complete with all of the properties that are handled by the add-on, including the path, context menu items, watched indicators, metadata, and anything else.

To be clear: After initialization, AutoWidget is no longer responsible for items that get displayed in widgets.

Any inconsistency that you are seeing regarding watched indicators, hidden items, or sorting, are not* AutoWidget's fault, as it does absolutely no manipulation on those items, and they should be brought up with the developer of the add-on in question.


After typing all of that out, I decided it would be prudent to actually test it for myself... and I was able to replicate your issue. I did so by pointing a widget at TheMovieDb Helper -> Trending Today, and the only movie in that menu which I had watched was Star Wars: Episode IX: The Rise of Skywalker. I turned on "Hide watched items on widgets, and pointed a widget directly to that menu. The movie did not show.

I then created an AutoWidget group containing only that path, then pointed a widget at it, and initialized it. What I found surprised me, because Star War IX was actually showing on the widget.

Honestly, I have no idea why this would be, or how I can control it, considering that I am not affecting the content of the widget in any way... But I suppose this is an active issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/drinfernoo/plugin.program.autowidget/issues/17#issuecomment-623048748, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO6DYFYEKXLZ2QX3JGAUSB3RPTQ3TANCNFSM4MVWUZ7Q.

drinfernoo commented 4 years ago

The last I knew, Seren doesn't have a "Hide Watched" option 🤔 If you've set it in the skin, then that's handled by Skin Helper, and should apply to any widget, I believe.

However, I think I've found a workaround for TMDbHelper, that I just need to test later.

swisslis commented 4 years ago

Sorry yes you are right I said it wrong - no hide watched in seren, I did it via the skin options. So as you say thats handled by skin helper? I use artic zephyr 2 as my skin, if that helps in any way. Haven't got any other skins set up to test and check on.

Fingers crossed if you think you may have sussed it though. Will be happy to feedback as and when an update gets pushed.

Get Outlook for Androidhttps://aka.ms/ghei36


From: drinfernoo notifications@github.com Sent: Sunday, May 3, 2020 5:06:04 PM To: drinfernoo/plugin.program.autowidget plugin.program.autowidget@noreply.github.com Cc: swisslis swiss_lis@hotmail.com; Author author@noreply.github.com Subject: Re: [drinfernoo/plugin.program.autowidget] [Request] Hide watched items in lists (#17)

The last I knew, Seren doesn't have a "Hide Watched" option 🤔 If you've set it in the skin, then that's handled by Skin Helper, and should apply to any widget, I believe.

However, I think I've found a workaround for TMDbHelper, that I just need to test later.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/drinfernoo/plugin.program.autowidget/issues/17#issuecomment-623132644, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO6DYF3JQS4BWX5IYLYHELLRPWI6ZANCNFSM4MVWUZ7Q.

swisslis commented 4 years ago

Photo below (hopefully shows you) that hide watched items option is ticked in skin helper service widgets if that's useful info. Again would have thought that was enough to block them being shown on any widget!

[Image]


From: Michael Lis swiss_lis@hotmail.com Sent: Sunday, 3 May 2020, 17:13 To: drinfernoo/plugin.program.autowidget Subject: Re: [drinfernoo/plugin.program.autowidget] [Request] Hide watched items in lists (#17)

Sorry yes you are right I said it wrong - no hide watched in seren, I did it via the skin options. So as you say thats handled by skin helper? I use artic zephyr 2 as my skin, if that helps in any way. Haven't got any other skins set up to test and check on.

Fingers crossed if you think you may have sussed it though. Will be happy to feedback as and when an update gets pushed.

Get Outlook for Androidhttps://aka.ms/ghei36


From: drinfernoo notifications@github.com Sent: Sunday, May 3, 2020 5:06:04 PM To: drinfernoo/plugin.program.autowidget plugin.program.autowidget@noreply.github.com Cc: swisslis swiss_lis@hotmail.com; Author author@noreply.github.com Subject: Re: [drinfernoo/plugin.program.autowidget] [Request] Hide watched items in lists (#17)

The last I knew, Seren doesn't have a "Hide Watched" option 🤔 If you've set it in the skin, then that's handled by Skin Helper, and should apply to any widget, I believe.

However, I think I've found a workaround for TMDbHelper, that I just need to test later.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/drinfernoo/plugin.program.autowidget/issues/17#issuecomment-623132644, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO6DYF3JQS4BWX5IYLYHELLRPWI6ZANCNFSM4MVWUZ7Q.

drinfernoo commented 4 years ago

I had thought that Skin Helper would hide them on widgets, too 🤔 Maybe @jurialmunkey can lend some insight?

jurialmunkey commented 4 years ago

I can't speak to Skin Helper - however, for TMDbHelper, the plugin needs to have the &widget=True param set in the plugin:// url. It checks the flag here: https://github.com/jurialmunkey/plugin.video.themoviedb.helper/blob/master/resources/lib/container.py#L972

Is it possible that autowidget is stripping out this widget param?

The widget param is not set if Window.IsMedia is true -- basically since skinshortcuts is usually run via SkinSettings and that isn't a Media window, then it is assumed you are setting a widget and so the param is added. However, if you open TMDbHelper via the library, then the widget param is not added.

So possibly if you are using a context menu item to set the path for autowidget, then you won't get the widget param (because you're in the library and the path isn't a widget!).

Does that make sense? Not sure what the solution is other than AutoWidget manually adding the widget param if it isn't already there.

drinfernoo commented 4 years ago

Yes, that's what I expected was probably happening...

The approach I have taken to showing different content in widgets is to make the Window.IsMedia check "at runtime", when the items are added, and simply skip them where applicable.

Would that approach be possible in TMDbHelper, given the proper changes? I don't know that it causes any issues, but would improve compatibility, at least with AutoWidget 😉

jurialmunkey commented 4 years ago

Whether it is a widget can't be evaluated "at runtime" on load of the container because then skinners have no control over whether an item is displayed as a widget or not.

For instance, if you have a TMDbHelper list inside the info dialog you will end up with different results depending on whether the info dialog was opened on the home screen (Window.IsMedia is false) or in the library (Window.IsMedia is true).

Plus there might be instances where a skinner wants to treat a plugin path on the home screen NOT as a widget (e.g. as a hidden list or to replicate a library view). If the condition is evaluated by the plugin rather than set as a param, then the skinner loses control.

If I make changes with how this is managed then it will impact every skin that uses TMDbHelper.

drinfernoo commented 4 years ago

Fair enough. I think the workaround, then, is to manually add the flag to an AutoWidget path, after the fact.

EDIT: I can confirm that with the correct path, watched items are hidden from TMDbHelper, which convinced me that this is simply a matter of add-on support for hosting watched items, and using the appropriate path in AutoWidget, unclear as that may be at times.

drinfernoo commented 4 years ago

@swisslis Future releases will now automatically append &widget=True to any path added from TMDbHelper. It won't affect paths you've already added, however.