moviebrowser: reset filter at startup if filter-directory not exists ...

to avoid a wrong display in footer


Origin commit data
------------------
Branch: ni/coolstream
Commit: d513480354
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-12-16 (Fri, 16 Dec 2016)

Origin message was:
------------------
- moviebrowser: reset filter at startup if filter-directory not exists ...

to avoid a wrong display in footer


------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-12-16 23:13:43 +01:00
parent 37e9819938
commit 6032ad60d0

View File

@@ -610,9 +610,21 @@ bool CMovieBrowser::loadSettings(MB_SETTINGS* settings)
settings->sorting.direction = (MB_DIRECTION)configfile.getInt32("mb_sorting_direction", MB_DIRECTION_UP);
settings->filter.item = (MB_INFO_ITEM)configfile.getInt32("mb_filter_item", MB_INFO_MAX_NUMBER);
settings->filter.optionString = configfile.getString("mb_filter_optionString", "");
settings->filter.optionString = configfile.getString("mb_filter_optionString", g_Locale->getText(LOCALE_OPTIONS_OFF));
settings->filter.optionVar = configfile.getInt32("mb_filter_optionVar", 0);
if (settings->filter.item == MB_INFO_FILEPATH)
{
struct stat info;
if (!(stat(settings->filter.optionString.c_str(), &info) == 0 && S_ISDIR(info.st_mode)))
{
//reset filter if directory not exists
settings->filter.item = MB_INFO_MAX_NUMBER;
settings->filter.optionString = g_Locale->getText(LOCALE_OPTIONS_OFF);
settings->filter.optionVar = 0;
}
}
settings->parentalLockAge = (MI_PARENTAL_LOCKAGE)configfile.getInt32("mb_parentalLockAge", MI_PARENTAL_OVER18);
settings->parentalLock = (MB_PARENTAL_LOCK)configfile.getInt32("mb_parentalLock", MB_PARENTAL_LOCK_ACTIVE);