aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Visual/Visual.pro
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2015-11-03 14:56:59 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2015-11-03 14:56:59 +0000
commitc0cfcc9dd6d12c649f083e17fc7dffd8a0abbfe5 (patch)
treede5fd322949a64bde431659513c9ff1b6ae9d1b0 /src/plugins/Visual/Visual.pro
parent7dd66f1ceacf99a38b9774fe98e852e9afe73cd6 (diff)
downloadqmmp-c0cfcc9dd6d12c649f083e17fc7dffd8a0abbfe5.tar.gz
qmmp-c0cfcc9dd6d12c649f083e17fc7dffd8a0abbfe5.tar.bz2
qmmp-c0cfcc9dd6d12c649f083e17fc7dffd8a0abbfe5.zip
fixed Dutch translation (patch by Rhythmdrill, see #825); updated .ts files
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@5735 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Visual/Visual.pro')
0 files changed, 0 insertions, 0 deletions
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188



























































































































































































                                                                                                             
/***************************************************************************
 *   Copyright (C) 2008 by Ilya Kotov                                      *
 *   forkotov02@hotmail.ru                                                 *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/


#include <QDir>
#include <QSettings>
#include <QTextStream>
#include <QTextCodec>

#include <qmmp/decoder.h>

#include "cueparser.h"

CUEParser::CUEParser(const QByteArray &array, const QString &fileName)
{
    QString album, genre, date, comment;
    QTextStream textStream (array);
    QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
    QTextCodec *codec = QTextCodec::codecForName(settings.value("CUE/encoding","ISO-8859-1").toByteArray ());
    textStream.setCodec(codec);
    m_filePath = fileName;
    QString artist;
    while (!textStream.atEnd())
    {
        QString line = textStream.readLine().trimmed();
        QStringList words = splitLine(line);
        if (words.size() < 2)
            continue;

        if (words[0] == "PERFORMER")
        {
            if (m_infoList.isEmpty())
            {
                artist = words[1];
                continue;
            }
            else
                m_infoList.last().setMetaData(Qmmp::ARTIST, words[1]);

        }
        else if (words[0] == "TITLE")
        {
            if (m_infoList.isEmpty())
                album = words[1];
            else
                m_infoList.last().setMetaData(Qmmp::TITLE, words[1]);
        }
        else if (words[0] == "TRACK")
        {
            FileInfo info("wvpack://" + fileName + QString("#%1").arg(words[1].toInt()));
            info.setMetaData(Qmmp::TRACK, words[1].toInt());
            m_infoList << info;
            m_offsets << 0;
        }
        else if (words[0] == "INDEX")
        {
            if (m_infoList.isEmpty())
                continue;
            m_infoList.last ().setLength(getLength(words[2]));
            m_offsets.last() = getLength(words[2]);
        }
        else if (words[0] == "REM")
        {
            if (words.size() < 3)
                continue;
            if (words[1] == "GENRE")
                genre = words[2];