From 4cbc221f0001427c85a08ef30ca01c147a462aae Mon Sep 17 00:00:00 2001 From: David Sansome Date: Wed, 4 Jan 2012 22:10:41 +0000 Subject: [PATCH] Don't set a "file" url scheme on files in devices that already have URL prefixes (like afc:// for iPod Touches) Fixes issue 2564 --- src/core/song.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/song.cpp b/src/core/song.cpp index 9af1e0c4b..b8b12aada 100644 --- a/src/core/song.cpp +++ b/src/core/song.cpp @@ -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(); }