From 1f224be6727e9855d0c7ae700e5cfdf1f7d8c965 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 6 Aug 2016 22:29:26 +0200 Subject: [PATCH] - disable shoutcast, when shoutcast_dev_id is empty --- src/gui/audioplayer.cpp | 8 +++----- src/neutrino.cpp | 1 + src/system/settings.h | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index cb97df43e..65510c4dc 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -641,12 +641,10 @@ int CAudioPlayerGui::show() InputSelector.addItem(new CMenuForwarder( LOCALE_AUDIOPLAYER_ADD_IC, true, NULL, InetRadioInputChanger, cnt, CRCInput::convertDigitToKey(count + 1)), old_select == count); - if(g_settings.shoutcast_dev_id != "XXXXXXXXXXXXXXXX"){ - sprintf(cnt, "%d", ++count); - InputSelector.addItem(new CMenuForwarder( - LOCALE_AUDIOPLAYER_ADD_SC, true, NULL, InetRadioInputChanger, + sprintf(cnt, "%d", ++count); + InputSelector.addItem(new CMenuForwarder( + LOCALE_AUDIOPLAYER_ADD_SC, g_settings.shoutcast_enabled, NULL, InetRadioInputChanger, cnt, CRCInput::convertDigitToKey(count + 1)), old_select == count); - } //InputSelector.addItem(GenericMenuSeparator); hide(); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 475e2a3e8..1fb8fd12c 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -803,6 +803,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.audioplayer_show_playlist = configfile.getInt32("audioplayer_show_playlist",1); g_settings.audioplayer_enable_sc_metadata = configfile.getInt32("audioplayer_enable_sc_metadata",1); g_settings.shoutcast_dev_id = configfile.getString("shoutcast_dev_id","XXXXXXXXXXXXXXXX"); + g_settings.shoutcast_enabled = ((g_settings.shoutcast_dev_id != "XXXXXXXXXXXXXXXX") && !g_settings.shoutcast_dev_id.empty()); //Movie-Player g_settings.movieplayer_repeat_on = configfile.getInt32("movieplayer_repeat_on", CMoviePlayerGui::REPEAT_OFF); diff --git a/src/system/settings.h b/src/system/settings.h index e5b19f4db..733cb2316 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -714,6 +714,8 @@ struct SNeutrinoSettings int audioplayer_show_playlist; int audioplayer_enable_sc_metadata; std::string shoutcast_dev_id; + int shoutcast_enabled; + //Filebrowser int filebrowser_showrights; int filebrowser_sortmethod;