mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
- webtv-setup: init filebrowser only if needed
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -88,12 +88,6 @@ int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey)
|
||||
}
|
||||
if (actionKey == "c" /* change */)
|
||||
{
|
||||
CFileBrowser fileBrowser;
|
||||
CFileFilter fileFilter;
|
||||
fileFilter.addFilter("xml");
|
||||
fileFilter.addFilter("tv");
|
||||
fileFilter.addFilter("m3u");
|
||||
fileBrowser.Filter = &fileFilter;
|
||||
selected = m->getSelected();
|
||||
CMenuItem *item = m->getItem(selected);
|
||||
CMenuForwarder *f = static_cast<CMenuForwarder *>(item);
|
||||
@@ -114,6 +108,12 @@ int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey)
|
||||
}
|
||||
else
|
||||
{
|
||||
CFileBrowser fileBrowser;
|
||||
CFileFilter fileFilter;
|
||||
fileFilter.addFilter("xml");
|
||||
fileFilter.addFilter("tv");
|
||||
fileFilter.addFilter("m3u");
|
||||
fileBrowser.Filter = &fileFilter;
|
||||
|
||||
dirname = dirname.substr(0, dirname.rfind('/'));
|
||||
if (fileBrowser.exec(dirname.c_str()))
|
||||
|
Reference in New Issue
Block a user