mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
-add eligible logo dir
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@996 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -664,6 +664,7 @@ ledcontroler.on.all LED1 & LED2 an
|
||||
ledcontroler.on.led1 LED1 an
|
||||
ledcontroler.on.led2 LED2 an
|
||||
ledcontroler.blink Blinke im Deep-Standby, wenn Timer aktiv
|
||||
logo_hdd_dir Logo Verz.
|
||||
mainmenu.audioplayer Audioplayer
|
||||
mainmenu.clearsectionsd Lösche EPG Cache
|
||||
mainmenu.games Spiele
|
||||
|
@@ -479,6 +479,7 @@ ledcontroler.on.all Led1 & Led2 on
|
||||
ledcontroler.on.led1 Led1 on
|
||||
ledcontroler.on.led2 Led2 on
|
||||
ledcontroler.blink Blink in deep standby, if timer set
|
||||
logo_hdd_dir Logo dir
|
||||
mainmenu.audioplayer Audioplayer
|
||||
mainmenu.games Games
|
||||
mainmenu.head Main Menu
|
||||
|
@@ -439,7 +439,6 @@ void CPictureViewer::getSize(const char* name, int* width, int *height)
|
||||
}
|
||||
|
||||
#define LOGO_DIR1 "/share/tuxbox/neutrino/icons/logo"
|
||||
#define LOGO_DIR2 "/var/share/icons/logo"
|
||||
#define LOGO_FMT ".jpg"
|
||||
|
||||
bool CPictureViewer::GetLogoName(uint64_t channel_id, std::string ChannelName, std::string & name, int *width, int *height)
|
||||
@@ -457,7 +456,7 @@ bool CPictureViewer::GetLogoName(uint64_t channel_id, std::string ChannelName, s
|
||||
{
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
std::string tmp(LOGO_DIR2 "/" + strLogoName[i] + strLogoExt[j]);
|
||||
std::string tmp(g_settings.logo_hdd_dir + "/" + strLogoName[i] + strLogoExt[j]);
|
||||
if (access(tmp.c_str(), R_OK) != -1)
|
||||
{
|
||||
if(width && height)
|
||||
@@ -489,10 +488,10 @@ bool CPictureViewer::DisplayLogo (uint64_t channel_id, int posx, int posy, int w
|
||||
char fname[255];
|
||||
bool ret = false;
|
||||
|
||||
sprintf(fname, "%s/%llx.jpg", LOGO_DIR2, channel_id & 0xFFFFFFFFFFFFULL);
|
||||
sprintf(fname, "%s/%llx.jpg", g_settings.logo_hdd_dir.c_str(), channel_id & 0xFFFFFFFFFFFFULL);
|
||||
printf("logo file: %s\n", fname);
|
||||
if(access(fname, F_OK))
|
||||
sprintf(fname, "%s/%llx.gif", LOGO_DIR2, channel_id & 0xFFFFFFFFFFFFULL);
|
||||
sprintf(fname, "%s/%llx.gif", g_settings.logo_hdd_dir.c_str(), channel_id & 0xFFFFFFFFFFFFULL);
|
||||
|
||||
if(!access(fname, F_OK)) {
|
||||
ret = DisplayImage(fname, posx, posy, width, height);
|
||||
|
@@ -670,7 +670,7 @@ printf("***************************** rec dir %s timeshift dir %s\n", g_settings
|
||||
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" );
|
||||
|
||||
g_settings.logo_hdd_dir = configfile.getString( "logo_hdd_dir", "/var/share/icons/logo" );
|
||||
//rc-key configuration
|
||||
g_settings.key_tvradio_mode = configfile.getInt32( "key_tvradio_mode", CRCInput::RC_nokey );
|
||||
g_settings.key_power_off = configfile.getInt32( "key_power_off", CRCInput::RC_standby );
|
||||
@@ -1193,7 +1193,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
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.setString ( "logo_hdd_dir", g_settings.logo_hdd_dir );
|
||||
configfile.setInt32 ( "streaming_resolution", g_settings.streaming_resolution );
|
||||
|
||||
configfile.setInt32( "rf_subcarrier", g_settings.rf_subcarrier);
|
||||
@@ -4050,6 +4050,7 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
{
|
||||
// printf("ac: %s\n", actionKey.c_str());
|
||||
int returnval = menu_return::RETURN_REPAINT;
|
||||
const char *wrong_str = "Wrong/unsupported";
|
||||
|
||||
if(actionKey == "help_recording") {
|
||||
ShowLocalizedMessage(LOCALE_SETTINGS_HELP, LOCALE_RECORDINGMENU_HELP, CMessageBox::mbrBack, CMessageBox::mbBack);
|
||||
@@ -4200,7 +4201,7 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
if (fileBrowser.exec(g_settings.update_dir) == true) {
|
||||
const char * newdir = fileBrowser.getSelectedFile()->Name.c_str();
|
||||
if(check_dir(newdir))
|
||||
printf("Wrong/unsupported recording dir %s\n", newdir);
|
||||
printf("%s recording dir %s\n",wrong_str , newdir);
|
||||
else {
|
||||
strcpy(g_settings.update_dir, fileBrowser.getSelectedFile()->Name.c_str());
|
||||
printf("[neutrino] new update dir %s\n", fileBrowser.getSelectedFile()->Name.c_str());
|
||||
@@ -4215,7 +4216,7 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
if (b.exec(g_settings.epg_dir.c_str())) {
|
||||
const char * newdir = b.getSelectedFile()->Name.c_str();
|
||||
if(check_dir(newdir))
|
||||
printf("Wrong/unsupported epg dir %s\n", newdir);
|
||||
printf("%s epg dir %s\n",wrong_str , newdir);
|
||||
else {
|
||||
g_settings.epg_dir = b.getSelectedFile()->Name;
|
||||
SendSectionsdConfig();
|
||||
@@ -4224,23 +4225,37 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
else if(actionKey == "pluginhdddir") {
|
||||
else if(actionKey == "plugin_dir") {
|
||||
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);
|
||||
printf("%s plugin dir %s\n",wrong_str , newdir);
|
||||
else {
|
||||
g_settings.plugin_hdd_dir = b.getSelectedFile()->Name;
|
||||
SendSectionsdConfig();
|
||||
g_PluginList->loadPlugins();
|
||||
}
|
||||
}
|
||||
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
else if(actionKey == "logo_dir") {
|
||||
parent->hide();
|
||||
CFileBrowser b;
|
||||
b.Dir_Mode=true;
|
||||
if (b.exec(g_settings.logo_hdd_dir.c_str())) {
|
||||
const char * newdir = b.getSelectedFile()->Name.c_str();
|
||||
if(check_dir(newdir))
|
||||
printf("%s logo dir %s\n",wrong_str , newdir);
|
||||
else {
|
||||
g_settings.logo_hdd_dir = b.getSelectedFile()->Name;
|
||||
}
|
||||
}
|
||||
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
else if(actionKey == "movieplugin") {
|
||||
parent->hide();
|
||||
CMenuWidget MoviePluginSelector(LOCALE_MOVIEPLAYER_DEFPLUGIN, NEUTRINO_ICON_FEATURES);
|
||||
|
@@ -1321,7 +1321,8 @@ 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"));
|
||||
miscSettingsGeneral->addItem(new CMenuForwarder(LOCALE_PLUGINS_HDD_DIR, true, g_settings.plugin_hdd_dir, this, "plugin_dir"));
|
||||
miscSettingsGeneral->addItem(new CMenuForwarder(LOCALE_LOGO_HDD_DIR, true, g_settings.logo_hdd_dir, this, "logo_dir"));
|
||||
|
||||
|
||||
if(cs_get_revision() > 7){
|
||||
|
@@ -509,6 +509,7 @@ typedef enum {
|
||||
LOCALE_LEDCONTROLER_ON_LED1,
|
||||
LOCALE_LEDCONTROLER_ON_LED2,
|
||||
LOCALE_LEDCONTROLER_BLINK,
|
||||
LOCALE_LOGO_HDD_DIR,
|
||||
LOCALE_MAINMENU_AUDIOPLAYER,
|
||||
LOCALE_MAINMENU_CLEARSECTIONSD,
|
||||
LOCALE_MAINMENU_GAMES,
|
||||
|
@@ -509,6 +509,7 @@ const char *locale_real_names[] = {
|
||||
"ledcontroler.on.led1",
|
||||
"ledcontroler.on.led2",
|
||||
"ledcontroler.blink",
|
||||
"logo_hdd_dir",
|
||||
"mainmenu.audioplayer",
|
||||
"mainmenu.clearsectionsd",
|
||||
"mainmenu.games",
|
||||
|
@@ -256,6 +256,9 @@ struct SNeutrinoSettings
|
||||
std::string movieplayer_plugin;
|
||||
std::string onekey_plugin;
|
||||
std::string plugin_hdd_dir;
|
||||
|
||||
std::string logo_hdd_dir;
|
||||
|
||||
//key configuration
|
||||
int key_tvradio_mode;
|
||||
|
||||
|
Reference in New Issue
Block a user