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:
vanhofen
2018-09-15 00:16:50 +02:00
parent 33cc85a240
commit b5f8e8ea32
3 changed files with 15 additions and 10 deletions

View File

@@ -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)
{
//NI
if (
(*it).empty()
|| ((*it).find(WEBTVDIR) != std::string::npos)
|| ((*it).find(WEBTVDIR_VAR) != std::string::npos)
)
if (webtv_xml_autodir((*it)))
continue;
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()