summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/talkfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/talkfile.cpp')
-rw-r--r--rbutil/rbutilqt/base/talkfile.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/base/talkfile.cpp b/rbutil/rbutilqt/base/talkfile.cpp
index bc3f5f965d..a069f3aa78 100644
--- a/rbutil/rbutilqt/base/talkfile.cpp
+++ b/rbutil/rbutilqt/base/talkfile.cpp
@@ -140,6 +140,13 @@ bool TalkFileCreator::createTalkList(QDir startDir)
// insert into List
if(!dir.dirName().isEmpty() && m_talkFolders)
{
+ // check if we should ignore it
+ if(m_generateOnlyNew && QFileInfo(dir.path() + "/_dirname.talk").exists())
+ {
+ continue;
+ }
+
+ //generate entry
TalkGenerator::TalkEntry entry;
entry.toSpeak = dir.dirName();
entry.wavfilename = QDir::tempPath()+ "/talkfiles/" + QCryptographicHash::hash(entry.toSpeak.toUtf8(),
@@ -150,7 +157,7 @@ bool TalkFileCreator::createTalkList(QDir startDir)
entry.voiced = false;
entry.encoded = false;
qDebug() << "toSpeak: " << entry.toSpeak << " target: " << entry.target << " intermediates: " <<
- entry.wavfilename << entry.talkfilename;
+ entry.wavfilename << entry.talkfilename;
m_talkList.append(entry);
}
}
@@ -171,6 +178,12 @@ bool TalkFileCreator::createTalkList(QDir startDir)
if(match)
continue;
+ // check if we should ignore it
+ if(m_generateOnlyNew && QFileInfo(fileInf.path() + "/" + fileInf.fileName() + ".talk").exists())
+ {
+ continue;
+ }
+
//generate entry
TalkGenerator::TalkEntry entry;
if(m_stripExtensions)
@@ -223,7 +236,7 @@ bool TalkFileCreator::copyTalkFiles(QString* errString)
continue; // this file was skipped in one of the previous steps
}
// remove target if it exists, and if we should overwrite it
- if(m_overwriteTalk && QFile::exists(m_talkList[i].target))
+ if(QFile::exists(m_talkList[i].target))
QFile::remove(m_talkList[i].target);
// copying