summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediadetect.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/noncore/multimedia/opieplayer2/mediadetect.cpp b/noncore/multimedia/opieplayer2/mediadetect.cpp
index 7deeb2f..5e0da88 100644
--- a/noncore/multimedia/opieplayer2/mediadetect.cpp
+++ b/noncore/multimedia/opieplayer2/mediadetect.cpp
@@ -9,16 +9,18 @@ MediaDetect::~MediaDetect() {
9} 9}
10 10
11char MediaDetect::videoOrAudio( const QString& fileName ) { 11char MediaDetect::videoOrAudio( const QString& fileName ) {
12 if( fileName.right(4) == ".avi" || 12 if( (fileName.lower()).right(4) == ".avi" ||
13 fileName.right(4) == ".mpg" || 13 (fileName.lower()).right(4) == ".mpg" ||
14 fileName.right(4) == ".asf" || 14 (fileName.lower()).right(4) == ".asf" ||
15 fileName.right(4) == ".mov" || 15 (fileName.lower()).right(4) == ".mov" ||
16 fileName.right(5) == ".mpeg" ) { 16 (fileName.lower()).right(5) == ".mpeg" ) {
17 qDebug("Video out taken");
17 return 'v'; 18 return 'v';
18 } else if ( fileName.right(4) == ".avi" || 19 } else if ( (fileName.lower()).right(4) == "·mp1" ||
19 fileName.right(4) == ".mp3" || 20 (fileName.lower()).right(4) == ".mp3" ||
20 fileName.right(4) == ".ogg" || 21 (fileName.lower()).right(4) == ".ogg" ||
21 fileName.right(4) == ".wav" ) { 22 (fileName.lower()).right(4) == ".wav" ) {
23 qDebug("AUDIO out taken");
22 return 'a'; 24 return 'a';
23 } else { 25 } else {
24 return 'f'; 26 return 'f';
@@ -27,9 +29,9 @@ char MediaDetect::videoOrAudio( const QString& fileName ) {
27 29
28bool MediaDetect::isStreaming( const QString& fileName ) { 30bool MediaDetect::isStreaming( const QString& fileName ) {
29 // ugly 31 // ugly
30 if( fileName.left(4) == "http" ) { 32 if( (fileName.lower()).left(4) == "http" ) {
31 return true; 33 return true;
32 } else if (fileName.left(3) == "ftp" ) { 34 } else if ( (fileName.lower()).left(3) == "ftp" ) {
33 return true; 35 return true;
34 } else { 36 } else {
35 return false; 37 return false;