Don't set a "file" url scheme on files in devices that already have URL prefixes (like afc:// for iPod Touches)

Fixes issue 2564
This commit is contained in:
David Sansome 2012-01-04 22:10:41 +00:00
parent bfd725f2ed
commit 4cbc221f00
1 changed files with 6 additions and 1 deletions

View File

@ -849,7 +849,12 @@ void Song::InitFromLastFM(const lastfm::Track& track) {
QString filename = QString::fromLocal8Bit(track->ipod_path);
filename.replace(':', '/');
d->url_ = QUrl::fromLocalFile(prefix + filename);
if (prefix.contains("://")) {
d->url_ = prefix + filename;
} else {
d->url_ = QUrl::fromLocalFile(prefix + filename);
}
d->basefilename_ = QFileInfo(filename).fileName();
}