From 4128a1fe48c63e32196276bbc1eae6ac4871ec5c Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 9 May 2024 15:29:54 -0400 Subject: [Bugfix/Feature] OpenPlugin and default plugins selecting files to run is nice and all but you might not like the plugin you can edit it OpenPlugin Viewer Plugin but instead pop it when you add a file to reduce suprises shortcut viewer is not ready for this so exclude it for now Change-Id: I950599d87f47d42e8c2d59695f6583d497b217f0 adds: default plugin (if any) is selected in the open with dialog --- apps/open_plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/open_plugin.c') diff --git a/apps/open_plugin.c b/apps/open_plugin.c index e10463d260..8b5fce1d29 100644 --- a/apps/open_plugin.c +++ b/apps/open_plugin.c @@ -323,10 +323,10 @@ uint32_t open_plugin_add_path(const char *key, const char *plugin, const char *p /* get the entry from the opx file */ op_load_entry(0, OPEN_PLUGIN_LANG_IGNORE, op_entry, plugin); } - else if(!parameter) + else if(!parameter && lang_id != LANG_SHORTCUTS) { strmemccpy(op_entry->param, plugin, OPEN_PLUGIN_BUFSZ); - plugin = filetype_get_plugin(fattr, op_entry->path, OPEN_PLUGIN_BUFSZ); + plugin = filetype_get_viewer(op_entry->path, OPEN_PLUGIN_BUFSZ, plugin); if (!plugin) { logf("OP no plugin found to run %s", op_entry->param); @@ -376,7 +376,7 @@ static bool callback_show_item(char *name, int attr, struct tree_context *tc) return false; #endif return attr & ATTR_DIRECTORY || - (filetype_supported(attr) && (attr & FILE_ATTR_AUDIO) == 0); + (filetype_supported(attr) && (attr & FILE_ATTR_AUDIO) != FILE_ATTR_AUDIO); } /* open_plugin_browse() -- cgit v1.2.3