aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/gme/gmehelper.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-04-27 17:17:23 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-04-27 17:17:23 +0000
commitbdf24cc25723a9d3db5ae8e8733836c7394506bb (patch)
treea174ee0986bb71750586a33de9d1c43bf0b713b3 /src/plugins/Input/gme/gmehelper.cpp
parentf6de884f893ced4898bea36db4908fc449ebe9d9 (diff)
downloadqmmp-bdf24cc25723a9d3db5ae8e8733836c7394506bb.tar.gz
qmmp-bdf24cc25723a9d3db5ae8e8733836c7394506bb.tar.bz2
qmmp-bdf24cc25723a9d3db5ae8e8733836c7394506bb.zip
gme plugin: fixed windows support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3415 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/gme/gmehelper.cpp')
-rw-r--r--src/plugins/Input/gme/gmehelper.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/plugins/Input/gme/gmehelper.cpp b/src/plugins/Input/gme/gmehelper.cpp
index 35635b5f0..20fc843bc 100644
--- a/src/plugins/Input/gme/gmehelper.cpp
+++ b/src/plugins/Input/gme/gmehelper.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010-2012 by Ilya Kotov *
+ * Copyright (C) 2010-2013 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -42,11 +42,8 @@ Music_Emu *GmeHelper::load(const QString &url, int sample_rate)
QString path = url;
if(url.contains("://"))
{
- path = QUrl(url).path();
- path.replace(QString(QUrl::toPercentEncoding("#")), "#");
- path.replace(QString(QUrl::toPercentEncoding("?")), "?");
- path.replace(QString(QUrl::toPercentEncoding("%")), "%");
- path.replace(QString(QUrl::toPercentEncoding(":")), ":");
+ path.remove("gme://");
+ path.remove(QRegExp("#\\d+$"));
}
const char *err = 0;
gme_type_t file_type;
@@ -103,12 +100,7 @@ QList <FileInfo*> GmeHelper::createPlayList(bool meta)
info->setMetaData(Qmmp::COMMENT, track_info->comment);
info->setMetaData(Qmmp::TRACK, i+1);
}
- QString path = m_path;
- path.replace("%", QString(QUrl::toPercentEncoding("%"))); //replace special symbols
- path.replace("#", QString(QUrl::toPercentEncoding("#")));
- path.replace("?", QString(QUrl::toPercentEncoding("?")));
- path.replace(":", QString(QUrl::toPercentEncoding(":")));
- info->setPath("gme://"+path+QString("#%1").arg(i+1));
+ info->setPath("gme://" + m_path + QString("#%1").arg(i+1));
info->setLength(track_info->length/1000);
gme_free_info(track_info);
list << info;