diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 181517330..4f48550e5 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1053,6 +1053,7 @@ ping.socket ist nicht erreichbar (Socket-Fehler) ping.unreachable ist nicht erreichbar (unerreichbar) pinprotection.head PIN-Abfrage pinprotection.wrongcode Geben Sie den Code nocheinmal ein! +plugins.hdd_dir Plugin HDD Verz. plugins.result Pluginausgabe progressbar.color Fortschrittsbalken farbe rclock.lockmsg Die Fernbedienung der Coolstream wird gesperrt.\n Um die Sperre aufzuheben, bitte\n und auf der Fernbedienung\n drücken. diff --git a/data/locale/english.locale b/data/locale/english.locale index a0170a16e..5b78c4137 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -693,6 +693,7 @@ ping.socket is unreachable (socket error) ping.unreachable is unreachable pinprotection.head Enter PIN code pinprotection.wrongcode PIN-Code was wrong! Try again. +plugins.hdd_dir Plugin HDD dir. plugins.result plugin output progressbar.color Progressbar Color rclock.lockmsg Your box remote control will be locked.\n To unlock it, press \n and on your remote control. diff --git a/src/gui/plugins.cpp b/src/gui/plugins.cpp index 374b7f152..d984c2c17 100644 --- a/src/gui/plugins.cpp +++ b/src/gui/plugins.cpp @@ -66,7 +66,6 @@ extern CPlugins * g_PluginList; /* neutrino.cpp */ extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ #define PLUGINDIR_VAR "/var/tuxbox/plugins" -#define PLUGINDIR_HDD "/hdd/tuxbox/plugins" #define PLUGINDIR_USB "/mnt/usb/tuxbox/plugins" bool CPlugins::plugin_exists(const std::string & filename) @@ -152,7 +151,7 @@ void CPlugins::loadPlugins() number_of_plugins = 0; plugin_list.clear(); - scanDir(PLUGINDIR_HDD); + scanDir(g_settings.plugin_hdd_dir.c_str()); scanDir(PLUGINDIR_USB); scanDir(PLUGINDIR_VAR); scanDir(PLUGINDIR); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index a959f2d33..0f5ca2d31 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1012,6 +1012,7 @@ printf("***************************** rec dir %s timeshift dir %s\n", g_settings // default plugin for movieplayer g_settings.movieplayer_plugin = configfile.getString( "movieplayer_plugin", "Teletext" ); g_settings.onekey_plugin = configfile.getString( "onekey_plugin", "noplugin" ); + g_settings.plugin_hdd_dir = configfile.getString( "plugin_hdd_dir", "/hdd/tuxbox/plugins" ); //rc-key configuration g_settings.key_tvradio_mode = configfile.getInt32( "key_tvradio_mode", CRCInput::RC_nokey ); @@ -1525,6 +1526,7 @@ void CNeutrinoApp::saveSetup(const char * fname) // default plugin for movieplayer configfile.setString ( "movieplayer_plugin", g_settings.movieplayer_plugin ); configfile.setString ( "onekey_plugin", g_settings.onekey_plugin ); + configfile.setString ( "plugin_hdd_dir", g_settings.plugin_hdd_dir ); configfile.setInt32 ( "streaming_resolution", g_settings.streaming_resolution ); @@ -4579,6 +4581,23 @@ printf("New timeshift dir: %s\n", timeshiftDir); return menu_return::RETURN_REPAINT; } + else if(actionKey == "pluginhdddir") { + parent->hide(); + CFileBrowser b; + b.Dir_Mode=true; + if (b.exec(g_settings.plugin_hdd_dir.c_str())) { + const char * newdir = b.getSelectedFile()->Name.c_str(); + if(check_dir(newdir)) + printf("Wrong/unsupported plugin dir %s\n", newdir); + else { + g_settings.plugin_hdd_dir = b.getSelectedFile()->Name; + SendSectionsdConfig(); + g_PluginList->loadPlugins(); + } + } + + return menu_return::RETURN_REPAINT; + } else if(actionKey == "select_font") { parent->hide(); CFileBrowser fileBrowser; diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index a590caa6c..eb245c7b8 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -1705,6 +1705,9 @@ void CNeutrinoApp::InitMiscSettings(CMenuWidget &miscSettings) if (g_info.delivery_system == DVB_S) { miscSettingsGeneral->addItem(new CMenuOptionChooser(LOCALE_EXTRA_ROTORSWAP, &g_settings.rotor_swap, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); } + miscSettingsGeneral->addItem(new CMenuForwarder(LOCALE_PLUGINS_HDD_DIR, true, g_settings.plugin_hdd_dir, this, "pluginhdddir")); + + if(cs_get_revision() > 7){ miscSettingsGeneral->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MAINMENU_SHUTDOWN)); CMenuOptionChooser *m1 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL_RCDELAY, &g_settings.shutdown_real_rcdelay, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, !g_settings.shutdown_real); diff --git a/src/system/locals.h b/src/system/locals.h index dfebb04c4..19ba6e53c 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -894,6 +894,7 @@ typedef enum { LOCALE_PING_UNREACHABLE, LOCALE_PINPROTECTION_HEAD, LOCALE_PINPROTECTION_WRONGCODE, + LOCALE_PLUGINS_HDD_DIR, LOCALE_PLUGINS_RESULT, LOCALE_PROGRESSBAR_COLOR, LOCALE_RCLOCK_LOCKMSG, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 377d32b05..d4f4a4d07 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -894,6 +894,7 @@ const char *locale_real_names[] = { "ping.unreachable", "pinprotection.head", "pinprotection.wrongcode", + "plugins.hdd_dir", "plugins.result", "progressbar.color", "rclock.lockmsg", diff --git a/src/system/settings.h b/src/system/settings.h index 52ff9dc5b..9a1e35889 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -251,7 +251,7 @@ struct SNeutrinoSettings // default plugin for ts-movieplayer (red button) std::string movieplayer_plugin; std::string onekey_plugin; - + std::string plugin_hdd_dir; //key configuration int key_tvradio_mode;