diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-08-05 08:21:43 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-08-05 08:21:43 +0000 |
| commit | 8d146b246e3da5d26b9501ca509a43ef4112e27d (patch) | |
| tree | c2f6afa22262a836e2178786fdd43b6b269c21c0 /src/plugins/Input/archive/archivemetadatamodel.cpp | |
| parent | b662d3c4f6c525f401d08ec710f4a76b0c30b0b7 (diff) | |
| download | qmmp-8d146b246e3da5d26b9501ca509a43ef4112e27d.tar.gz qmmp-8d146b246e3da5d26b9501ca509a43ef4112e27d.tar.bz2 qmmp-8d146b246e3da5d26b9501ca509a43ef4112e27d.zip | |
fixed remaing plugins
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8229 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/archive/archivemetadatamodel.cpp')
| -rw-r--r-- | src/plugins/Input/archive/archivemetadatamodel.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/plugins/Input/archive/archivemetadatamodel.cpp b/src/plugins/Input/archive/archivemetadatamodel.cpp deleted file mode 100644 index 6509d3ca9..000000000 --- a/src/plugins/Input/archive/archivemetadatamodel.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2016 by Ilya Kotov * - * forkotov02@ya.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., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#include "archiveinputdevice.h" -#include "archivetagreader.h" -#include "archivemetadatamodel.h" - -ArchiveMetaDataModel::ArchiveMetaDataModel(const QString &url, QObject *parent) : - MetaDataModel(parent) -{ - m_reader = 0; - m_input = 0; - m_url = url; -} - -ArchiveMetaDataModel::~ArchiveMetaDataModel() -{ - if(m_reader) - delete m_reader; - if(m_input) - delete m_input; -} - -QHash<QString, QString> ArchiveMetaDataModel::audioProperties() -{ - if(!m_input) - { - m_input = new ArchiveInputDevice(m_url); - if(m_input->isOpen()) - m_reader = new ArchiveTagReader(m_input, m_url); - } - - QHash <QString, QString> ap; - if(m_reader && m_reader->audioProperties()) - { - TagLib::AudioProperties *p = m_reader->audioProperties(); - ap.insert(tr("Length"), QString("%1:%2").arg(p->length()/60).arg(p->length()%60, 2, 10, QChar('0'))); - ap.insert(tr("Sample rate"), QString("%1 " + tr("Hz")).arg(p->sampleRate())); - ap.insert(tr("Channels"), QString("%1").arg(p->channels())); - ap.insert(tr("Bitrate"), QString("%1 " + tr("kbps")).arg(p->bitrate())); - ap.insert(tr("File size"), QString("%1 "+tr("KB")).arg(m_input->size()/1024)); - } - return ap; -} |
