summaryrefslogtreecommitdiffstats
path: root/apps/filetree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/filetree.c')
-rw-r--r--apps/filetree.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/filetree.c b/apps/filetree.c
index d645b7225c..cfa14f86b5 100644
--- a/apps/filetree.c
+++ b/apps/filetree.c
@@ -357,7 +357,8 @@ int ft_load(struct tree_context* c, const char* tempdir)
(*c->dirfilter == SHOW_LNG && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_LNG) ||
(*c->dirfilter == SHOW_MOD && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_MOD) ||
(*c->dirfilter == SHOW_PLUGINS && (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_ROCK &&
- (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_LUA) ||
+ (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_LUA &&
+ (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_OPX) ||
(callback_show_item && !callback_show_item(entry->d_name, dptr->attr, c)))
{
continue;
@@ -625,6 +626,7 @@ int ft_enter(struct tree_context* c)
/* plugin file */
case FILE_ATTR_ROCK:
case FILE_ATTR_LUA:
+ case FILE_ATTR_OPX:
{
char *plugin = buf, *argument = NULL, lua_path[MAX_PATH];
int ret;
@@ -634,6 +636,11 @@ int ft_enter(struct tree_context* c)
plugin = lua_path;
argument = buf;
}
+ else if ((file_attr & FILE_ATTR_MASK) == FILE_ATTR_OPX) {
+ snprintf(lua_path, sizeof(lua_path)-1, "%s/open_plugins.rock", VIEWERS_DIR); /* Use a #define here ? */
+ plugin = lua_path;
+ argument = buf;
+ }
if (global_settings.party_mode && audio_status()) {
splash(HZ, ID2P(LANG_PARTY_MODE));
@@ -645,6 +652,9 @@ int ft_enter(struct tree_context* c)
case PLUGIN_GOTO_WPS:
play = true;
break;
+ case PLUGIN_GOTO_PLUGIN:
+ rc = GO_TO_PLUGIN;
+ break;
case PLUGIN_USB_CONNECTED:
if(*c->dirfilter > NUM_FILTER_MODES)
/* leave sub-browsers after usb, doing
@@ -690,6 +700,9 @@ int ft_enter(struct tree_context* c)
case PLUGIN_USB_CONNECTED:
rc = GO_TO_FILEBROWSER;
break;
+ case PLUGIN_GOTO_PLUGIN:
+ rc = GO_TO_PLUGIN;
+ break;
case PLUGIN_GOTO_WPS:
rc = GO_TO_WPS;
break;