summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-03 12:31:10 (UTC)
committer harlekin <harlekin>2002-08-03 12:31:10 (UTC)
commited2394a99f071d4779498325476094255607d019 (patch) (unidiff)
tree62e0a648e7045e2102d22da5872496e76b5d2cf6
parent3b1ab71b7bfe42310661764e1089200290c7b817 (diff)
downloadopie-ed2394a99f071d4779498325476094255607d019.zip
opie-ed2394a99f071d4779498325476094255607d019.tar.gz
opie-ed2394a99f071d4779498325476094255607d019.tar.bz2
better file detection
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
@@ -11,12 +11,14 @@ MediaDetect::~MediaDetect() {
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';
@@ -29,5 +31,5 @@ bool 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;