gui/moviebrowser.cpp: case-insensitive extension compare

Origin commit data
------------------
Branch: ni/coolstream
Commit: 879652a300
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-09-28 (Sun, 28 Sep 2014)


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

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2014-09-28 12:26:39 +04:00
parent 30d8d5c101
commit 116e13c038

View File

@@ -65,6 +65,7 @@
#include <driver/record.h>
#include <system/helpers.h>
#include <system/ytcache.h>
#include <zapit/debug.h>
#include <timerdclient/timerdclient.h>
#include <system/hddstat.h>
@@ -2311,7 +2312,7 @@ void CMovieBrowser::loadAllTsFileNamesFromStorage(void)
static const char * const ext_list[] =
{
"avi", "mkv", "mpg", "mpeg", "m2ts", "mp4", "mov", "flv", "iso"
"avi", "mkv", "mp4", "flv", "mov", "mpg", "mpeg", "m2ts", "iso"
};
static int ext_list_size = sizeof(ext_list) / sizeof (char *);
@@ -2327,10 +2328,8 @@ bool CMovieBrowser::supportedExtension(CFile &file)
bool result = (ext == "ts");
if (!result && !m_settings.ts_only) {
for (int i = 0; i < ext_list_size; i++) {
if (ext == ext_list[i]) {
result = true;
break;
}
if (!strcasecmp(ext.c_str(), ext_list[i]))
return true;
}
}
return result;