aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Effect/filewriter/filewriterplugin.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-02-20 19:28:44 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-02-20 19:28:44 +0000
commit8cede851af210c0ce8d09199170223d6960c081b (patch)
treee94b87d7b794373332214b05bb733462ea98bbbc /src/plugins/Effect/filewriter/filewriterplugin.cpp
parent94aa57d698a6400ae9c9d46991193d8ee844bb83 (diff)
downloadqmmp-8cede851af210c0ce8d09199170223d6960c081b.tar.gz
qmmp-8cede851af210c0ce8d09199170223d6960c081b.tar.bz2
qmmp-8cede851af210c0ce8d09199170223d6960c081b.zip
filewriter: feature to write singe file (#1033)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9236 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Effect/filewriter/filewriterplugin.cpp')
-rw-r--r--src/plugins/Effect/filewriter/filewriterplugin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/Effect/filewriter/filewriterplugin.cpp b/src/plugins/Effect/filewriter/filewriterplugin.cpp
index f45a8b4e3..da7598284 100644
--- a/src/plugins/Effect/filewriter/filewriterplugin.cpp
+++ b/src/plugins/Effect/filewriter/filewriterplugin.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2017 by Ilya Kotov *
+ * Copyright (C) 2017-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -28,7 +28,6 @@
FileWriterPlugin::FileWriterPlugin()
{
qsrand(time(nullptr));
- m_inited = false;
}
FileWriterPlugin::~FileWriterPlugin()
@@ -45,7 +44,7 @@ void FileWriterPlugin::configure(quint32 srate, ChannelMap map)
void FileWriterPlugin::applyEffect(Buffer *b)
{
- if(!b->trackInfo.isNull())
+ if(!b->trackInfo.isNull() && !m_singleFile)
init(*b->trackInfo);
if(!m_inited || !b->samples)
@@ -121,6 +120,7 @@ void FileWriterPlugin::init(const TrackInfo &info)
QString fileName = settings.value("FileWriter/file_name", "%p%if(%p&%t, - ,)%t").toString();
if(fileName.isEmpty())
fileName = info.path().section("/", 1);
+ m_singleFile = settings.value("FileWriter/single_file", false).toBool();
MetaDataFormatter formatter(fileName);
fileName = formatter.format(info);