mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user