mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 21:55:10 -05:00
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
This commit is contained in:
parent
5ccf18019e
commit
72b74478bf
1 changed files with 41 additions and 4 deletions
|
|
@ -70,12 +70,49 @@ bool Autodetection::detect()
|
||||||
return true;
|
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
|
//try ipodpatcher
|
||||||
struct ipod_t ipod;
|
struct ipod_t ipod;
|
||||||
n = ipod_scan(&ipod);
|
n = ipod_scan(&ipod);
|
||||||
|
|
@ -85,7 +122,7 @@ bool Autodetection::detect()
|
||||||
m_mountpoint = resolveMountPoint(ipod.diskname);
|
m_mountpoint = resolveMountPoint(ipod.diskname);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//try sansapatcher
|
//try sansapatcher
|
||||||
struct sansa_t sansa;
|
struct sansa_t sansa;
|
||||||
n = sansa_scan(&sansa);
|
n = sansa_scan(&sansa);
|
||||||
|
|
@ -95,7 +132,7 @@ bool Autodetection::detect()
|
||||||
m_mountpoint = resolveMountPoint(sansa.diskname);
|
m_mountpoint = resolveMountPoint(sansa.diskname);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue