small adjustments

This commit is contained in:
Martchus 2015-08-16 23:41:49 +02:00
parent 0d70b95965
commit 1371ca5ce7
3 changed files with 6 additions and 5 deletions

View File

@ -661,7 +661,7 @@ void setTagInfo(const StringVector &parameterValues, const Argument &filesArg, c
MediaFileInfo fileInfo(selectedDenotatedValue->second.toLocal8Bit().constData());
fileInfo.open(true);
fileInfo.parseContainerFormat();
unique_ptr<char[]> buff = make_unique<char []>(fileInfo.size());
auto buff = make_unique<char []>(fileInfo.size());
fileInfo.stream().seekg(0);
fileInfo.stream().read(buff.get(), fileInfo.size());
TagValue value(move(buff), fileInfo.size(), TagDataType::Picture);

View File

@ -687,8 +687,6 @@ bool MainWindow::startParsing(const QString &path, bool forceRefresh)
// update directory
m_lastDir = m_currentDir;
m_currentDir = QString::fromLocal8Bit(m_fileInfo.containingDirectory().c_str());
} else {
m_fileInfo.reopen();
}
// update availability of making results
m_makingResultsAvailable &= sameFile;
@ -698,10 +696,13 @@ bool MainWindow::startParsing(const QString &path, bool forceRefresh)
// show filename
m_ui->fileNameLabel->setText(QString::fromLocal8Bit(m_fileInfo.fileName().c_str()));
// define function to parse the file
auto startThread = [this] {
auto startThread = [this, sameFile] {
m_fileOperationMutex.lock();
char result;
try {
if(sameFile) {
m_fileInfo.reopen();
}
m_fileInfo.setForceFullParse(Settings::forceFullParse());
m_fileInfo.parseEverything();
result = ParsingSuccessful;

View File

@ -1,6 +1,6 @@
[Desktop Entry]
Name=Tageditor
GenericName=Tageditor
GenericName=Tag Editor
Comment=A tag editing utility supporting ID3 and iTunes tags.
Exec=tageditor
Icon=tageditor