mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
webtv: simplify check for autoload directory
Origin commit data
------------------
Branch: ni/coolstream
Commit: 89d203edd5
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-09-15 (Sat, 15 Sep 2018)
Origin message was:
------------------
- webtv: simplify check for autoload directory
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -171,11 +171,7 @@ int CWebTVSetup::Show()
|
|||||||
for (std::list<std::string>::iterator it = g_settings.webtv_xml.begin(); it != g_settings.webtv_xml.end(); ++it)
|
for (std::list<std::string>::iterator it = g_settings.webtv_xml.begin(); it != g_settings.webtv_xml.end(); ++it)
|
||||||
{
|
{
|
||||||
//NI
|
//NI
|
||||||
if (
|
if (webtv_xml_autodir((*it)))
|
||||||
(*it).empty()
|
|
||||||
|| ((*it).find(WEBTVDIR) != std::string::npos)
|
|
||||||
|| ((*it).find(WEBTVDIR_VAR) != std::string::npos)
|
|
||||||
)
|
|
||||||
continue;
|
continue;
|
||||||
m->addItem(new CMenuForwarder(*it, true, NULL, this, "c"));
|
m->addItem(new CMenuForwarder(*it, true, NULL, this, "c"));
|
||||||
}
|
}
|
||||||
@@ -263,6 +259,17 @@ void CWebTVSetup::webtv_xml_auto()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool CWebTVSetup::webtv_xml_autodir(std::string directory)
|
||||||
|
{
|
||||||
|
if (
|
||||||
|
(directory.empty())
|
||||||
|
|| (directory.find(WEBTVDIR) != std::string::npos)
|
||||||
|
|| (directory.find(WEBTVDIR_VAR) != std::string::npos)
|
||||||
|
)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* ## CWebTVResolution ############################################# */
|
/* ## CWebTVResolution ############################################# */
|
||||||
|
|
||||||
CWebTVResolution::CWebTVResolution()
|
CWebTVResolution::CWebTVResolution()
|
||||||
|
@@ -41,6 +41,7 @@ class CWebTVSetup : public CMenuTarget, CChangeObserver //NI
|
|||||||
int Show();
|
int Show();
|
||||||
bool changeNotify(const neutrino_locale_t, void * data); //NI
|
bool changeNotify(const neutrino_locale_t, void * data); //NI
|
||||||
void webtv_xml_auto(); //NI
|
void webtv_xml_auto(); //NI
|
||||||
|
bool webtv_xml_autodir(std::string directory);
|
||||||
};
|
};
|
||||||
|
|
||||||
class CWebTVResolution : public CMenuTarget
|
class CWebTVResolution : public CMenuTarget
|
||||||
|
@@ -1578,16 +1578,13 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
|||||||
|
|
||||||
configfile.setString ( "logo_hdd_dir", g_settings.logo_hdd_dir );
|
configfile.setString ( "logo_hdd_dir", g_settings.logo_hdd_dir );
|
||||||
|
|
||||||
|
CWebTVSetup webtvsetup;
|
||||||
configfile.setInt32("webtv_xml_auto", g_settings.webtv_xml_auto); //NI
|
configfile.setInt32("webtv_xml_auto", g_settings.webtv_xml_auto); //NI
|
||||||
int webtv_count = 0;
|
int webtv_count = 0;
|
||||||
for (std::list<std::string>::iterator it = g_settings.webtv_xml.begin(); it != g_settings.webtv_xml.end(); ++it) {
|
for (std::list<std::string>::iterator it = g_settings.webtv_xml.begin(); it != g_settings.webtv_xml.end(); ++it) {
|
||||||
std::string k = "webtv_xml_" + to_string(webtv_count);
|
std::string k = "webtv_xml_" + to_string(webtv_count);
|
||||||
//NI
|
//NI
|
||||||
if (
|
if (webtvsetup.webtv_xml_autodir((*it)))
|
||||||
(*it).empty()
|
|
||||||
|| ((*it).find(WEBTVDIR) != std::string::npos)
|
|
||||||
|| ((*it).find(WEBTVDIR_VAR) != std::string::npos)
|
|
||||||
)
|
|
||||||
continue;
|
continue;
|
||||||
configfile.setString(k, *it);
|
configfile.setString(k, *it);
|
||||||
webtv_count++;
|
webtv_count++;
|
||||||
|
Reference in New Issue
Block a user