summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2007-09-02 10:50:13 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2007-09-02 10:50:13 +0000
commit72b74478bfe0fd6fc54b4fae5ffeeee311fc3c6a (patch)
tree7db78e0f0a3bffd8779e23dc159fa4bde01a6d98 /rbutil
parent5ccf18019ed9529564300dc13313705ab35b94b3 (diff)
downloadrockbox-72b74478bfe0fd6fc54b4fae5ffeeee311fc3c6a.tar.gz
rockbox-72b74478bfe0fd6fc54b4fae5ffeeee311fc3c6a.zip
Add first time detection for some archos devices and gigabeat based on player-specific files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14576 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/autodetection.cpp45
1 files changed, 41 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/autodetection.cpp b/rbutil/rbutilqt/autodetection.cpp
index 8f478835be..59b3373f19 100644
--- a/rbutil/rbutilqt/autodetection.cpp
+++ b/rbutil/rbutilqt/autodetection.cpp
@@ -70,12 +70,49 @@ bool Autodetection::detect()
return true;
}
}
+ // check for some specific files in root folder
+ QDir root(mountpoints.at(i));
+ QStringList rootentries = root.entryList(QDir::Files);
+ if(rootentries.contains("archos.mod", Qt::CaseSensitive))
+ {
+ // archos.mod in root folder -> Archos Player
+ m_device = "player";
+ m_mountpoint = mountpoints.at(i);
+ return true;
+ }
+ if(rootentries.contains("ONDIOST.BIN"))
+ {
+ // ONDIOST.BIN in root -> Ondio FM
+ m_device = "ondiofm";
+ m_mountpoint = mountpoints.at(i);
+ return true;
+ }
+ if(rootentries.contains("ONDIOSP.BIN"))
+ {
+ // ONDIOSP.BIN in root -> Ondio SP
+ m_device = "ondiosp";
+ m_mountpoint = mountpoints.at(i);
+ return true;
+ }
+ if(rootentries.contains("ajbrec.ajz"))
+ {
+ qDebug() << "it's an archos. further detection needed";
+ }
+ // detection based on player specific folders
+ QStringList rootfolders = root.entryList(QDir::Dirs);
+ if(rootfolders.contains("GBSYSTEM"))
+ {
+ // GBSYSTEM folder -> Gigabeat
+ m_device = "gigabeatf";
+ m_mountpoint = mountpoints.at(i);
+ return true;
+ }
+ qDebug() << rootfolders;
}
}
-
- int n;
+ int n;
//try ipodpatcher
struct ipod_t ipod;
n = ipod_scan(&ipod);
@@ -85,7 +122,7 @@ bool Autodetection::detect()
m_mountpoint = resolveMountPoint(ipod.diskname);
return true;
}
-
+
//try sansapatcher
struct sansa_t sansa;
n = sansa_scan(&sansa);
@@ -95,7 +132,7 @@ bool Autodetection::detect()
m_mountpoint = resolveMountPoint(sansa.diskname);
return true;
}
-
+
return false;
}