-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix parent directory ".." not exiting plugins providing multiple types #14409
Conversation
When a plugin provides multiple types, we pass the context as a URL option, e.g. plugin://addon.id/?content_type=video. Simply removing the URL options to obtain the parent path causes us to refresh the plugin root, whereas single-type plugins will exit the plugin when ".." is selected.
Any Python guys wanna chime in? Do any plugins use URL options as a subdirectory? |
Confirmed fixed in garbear#94 |
@garbear sorry for late reply, but yes, your PR changes plugin parenting rules and breaks some video database functionality. If you only want to make the parent directory of the URL with options but no file equal to plugin://, but your changes also removes both filename and options if file is not empty and leaves options if file is empty.
|
@garbear this also breaks the guiinfo label "ListItem.Path" (and possibly others) for plugin items. See https://forum.kodi.tv/showthread.php?tid=330696&pid=2767502#pid2767502 ff |
Fix displaying watched items in plugins and restore functionality after #14409
This fixes unable being able to exit plugins by selecting ".." at the plugin's root when the plugin provides multiple types.
When a plugin provides multiple types, it is launched with the context as URL options, e.g.
plugin://addon.id/?content_type=video
.When the ".." at the plugin root is selected, plugins with a single type updated to
plugin://
and exit. This is the expected behavior.Plugins with multiple types, however, update with
plugin://addon.id/
, which refreshes the root window and doesn't exit.To fix this, we make the parent directory of the URL with options but no file equal to
plugin://
, which exits the plugin.Also includes a small validation check.
Motivation and Context
Reported here: garbear#94
How Has This Been Tested?
Tested on Windows 10 with IAGL. Selecting ".." correctly exits the plugin.
This may have side effects, but I'm not aware of any.
Types of change