summaryrefslogtreecommitdiff
path: root/apps/filetree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/filetree.c')
-rw-r--r--apps/filetree.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/apps/filetree.c b/apps/filetree.c
index 66e4a68398..efe5e80a0f 100644
--- a/apps/filetree.c
+++ b/apps/filetree.c
@@ -629,33 +629,19 @@ int ft_enter(struct tree_context* c)
629 rolo_load(buf); 629 rolo_load(buf);
630 break; 630 break;
631#endif 631#endif
632 case FILE_ATTR_CUE:
633 display_cuesheet_content(buf);
634 break;
632 635
633 /* plugin file */ 636 /* plugin file */
634 case FILE_ATTR_ROCK: 637 case FILE_ATTR_ROCK:
635 case FILE_ATTR_LUA:
636 case FILE_ATTR_OPX:
637 { 638 {
638 char *plugin = buf, *argument = NULL; 639 char *plugin = buf, *argument = NULL;
639 char plugin_path[MAX_PATH];
640 int ret;
641
642 if ((file_attr & FILE_ATTR_MASK) == FILE_ATTR_LUA) {
643 snprintf(plugin_path, sizeof(plugin_path)-1, "%s/lua.rock", VIEWERS_DIR); /* Use a #define here ? */
644 plugin = plugin_path;
645 argument = buf;
646 }
647 else if ((file_attr & FILE_ATTR_MASK) == FILE_ATTR_OPX) {
648 snprintf(plugin_path, sizeof(plugin_path)-1, "%s/open_plugins.rock", VIEWERS_DIR); /* Use a #define here ? */
649 plugin = plugin_path;
650 argument = buf;
651 }
652
653 if (global_settings.party_mode && audio_status()) { 640 if (global_settings.party_mode && audio_status()) {
654 splash(HZ, ID2P(LANG_PARTY_MODE)); 641 splash(HZ, ID2P(LANG_PARTY_MODE));
655 break; 642 break;
656 } 643 }
657 ret = plugin_load(plugin, argument); 644 switch (plugin_load(plugin, argument))
658 switch (ret)
659 { 645 {
660 case PLUGIN_GOTO_WPS: 646 case PLUGIN_GOTO_WPS:
661 play = true; 647 play = true;
@@ -680,9 +666,6 @@ int ft_enter(struct tree_context* c)
680 } 666 }
681 break; 667 break;
682 } 668 }
683 case FILE_ATTR_CUE:
684 display_cuesheet_content(buf);
685 break;
686 669
687 default: 670 default:
688 { 671 {