webtv/webradio-setup: fix webchannels_auto() logic

Origin commit data
------------------
Branch: ni/coolstream
Commit: e8820feb7f
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-09-25 (Tue, 25 Sep 2018)

Origin message was:
------------------
- webtv/webradio-setup: fix webchannels_auto() logic

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2018-09-25 23:53:35 +02:00
parent a17db22495
commit 815462af9b

View File

@@ -286,7 +286,7 @@ bool CWebTVSetup::changeNotify(const neutrino_locale_t OptionName, void */*data*
{ {
int ret = menu_return::RETURN_NONE; int ret = menu_return::RETURN_NONE;
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_WEBTV_XML_AUTO)) if (ARE_LOCALES_EQUAL(OptionName, LOCALE_WEBTV_XML_AUTO) || ARE_LOCALES_EQUAL(OptionName, LOCALE_WEBRADIO_XML_AUTO))
{ {
changed = true; changed = true;
ret = menu_return::RETURN_REPAINT; ret = menu_return::RETURN_REPAINT;
@@ -312,9 +312,6 @@ int filefilter(const struct dirent *entry)
// webradio wrapper for webchannels_auto() // webradio wrapper for webchannels_auto()
void CWebTVSetup::webradio_xml_auto() void CWebTVSetup::webradio_xml_auto()
{ {
if (!g_settings.webradio_xml_auto)
return;
webradio = true; webradio = true;
webchannels_auto(); webchannels_auto();
} }
@@ -322,9 +319,6 @@ void CWebTVSetup::webradio_xml_auto()
// webtv wrapper for webchannels_auto() // webtv wrapper for webchannels_auto()
void CWebTVSetup::webtv_xml_auto() void CWebTVSetup::webtv_xml_auto()
{ {
if (!g_settings.webtv_xml_auto)
return;
webradio = false; webradio = false;
webchannels_auto(); webchannels_auto();
} }
@@ -336,12 +330,18 @@ void CWebTVSetup::webchannels_auto()
if (webradio) if (webradio)
{ {
if (!g_settings.webradio_xml_auto)
return;
webchannels = g_settings.webradio_xml; webchannels = g_settings.webradio_xml;
dirs[0] = WEBRADIODIR_VAR; dirs[0] = WEBRADIODIR_VAR;
dirs[1] = WEBRADIODIR; dirs[1] = WEBRADIODIR;
} }
else else
{ {
if (!g_settings.webtv_xml_auto)
return;
webchannels = g_settings.webtv_xml; webchannels = g_settings.webtv_xml;
dirs[0] = WEBTVDIR_VAR; dirs[0] = WEBTVDIR_VAR;
dirs[1] = WEBTVDIR; dirs[1] = WEBTVDIR;