From 116e13c038e2efdc6fd08eae11dcf9a7a11495cc Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Sun, 28 Sep 2014 12:26:39 +0400 Subject: [PATCH] gui/moviebrowser.cpp: case-insensitive extension compare Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/879652a300662e7aee75303b8883314b029fd575 Author: [CST] Focus Date: 2014-09-28 (Sun, 28 Sep 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/moviebrowser.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index a690d1c77..3704dfb50 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -65,6 +65,7 @@ #include #include #include +#include #include #include @@ -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;