Hey everyone! I wanted to pop in to say I haven't disappeared or given up on AutoWidget, but have been quietly working and waiting, trying to get
2.0
ready. I've already mostly finished (needs some finishing touches, I'm sure
) the
new features that you can look forward to in the future, but need to get your opinions on how to move forward. Unfortunately, one of the big roadblocks that was stopping me from release, when I first started mentioning the update, was actually a bug that needed to fixed in Kodi itself. However, fixing that isn't quite the end of it, either. Let me explain.
In the current version, AutoWidget works by "manually" editing the various metadata files that are created by Skin Shortcuts and whatever skin the user has, in order to physically replace the path that a widget uses to load, and it does this every so often, resulting in the widgets "cycling". While this implementation works, and works pretty well, it has certain drawbacks:
- It's relatively slow, since it has to actually search through all of the previously mentioned metadata files each time the widget refreshes, essentially.
- It's "hacky", and certainly isn't the way this is "supposed to work", which I'm sure some of you may have run into... Some operations in the current version cause Skin Shortcuts to end up in an unrecoverable state that is only "easily" reversible by setting them back to defaults.
- It requires the "initialization" phase to make any newly defined widgets start working.
With that being said, the primary benefit of doing it that way is that the resulting widget path is the exact same path as if you had pointed a widget directly at the represented path. For all intents and purposes, widgets made using AutoWidget are the widget they represent, and should ideally be indistinguishable from the original path.
However, fast forward to me considering how to make AutoWidget better for
2.0
. I'd like to get away from those drawbacks, while still adding new features. It became pretty early on in the transition that the only way for me to get around them would be to "recreate" the menus, and display them as an
AutoWidget... widget. This meant that, going forward, AutoWidgets would no longer have to be "initialized", wouldn't lose widget properties like aspect and sorting, and would be far more efficient, less "hacky", and more conventional. In working towards that goal, I found that
specifically what are referred to as "properties", that get set on items in plugin paths, were simply unavailable to me in the process of "recreating" the needed items in order to populate the widget. This meant that things like unwatched episode counts, watched progress, context menu items, widget titles, and even metadata in the info dialog, could be
broken and/or nonfunctional, as I was unable to replicate them faithfully. The solution was to
update the JSON-RPC API in order to allow them to be retrieved, which is working quite well.
Unfortunately, this comes at a price.
If (crossing fingers for more of a "when" situation) that PR gets merged, it will be merged into the Matrix branch, meaning those changes should show up in nightlies soon afterward, but won't be in a stable release for what is likely to be months to come, if the pulse lately is telling me anything. It has been made abundantly clear that the changes
will not be backported to a future Leia release, meaning that these features will be Matrix-onward,
only.
Now, it's time for me to "ask the audience": Would you want to see
2.0
, in all of its rewritten, merged, and folding glory, even if it meant of the properties would be missing and things
might not work as expected... or should I wait to fully release
2.0
until we're closer to a Matrix release?