From 1371ca5ce71d92c6a3df61446b852035036534da Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 16 Aug 2015 23:41:49 +0200 Subject: [PATCH] small adjustments --- cli/mainfeatures.cpp | 2 +- gui/mainwindow.cpp | 7 ++++--- resources/desktop/applications/tageditor.desktop | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cli/mainfeatures.cpp b/cli/mainfeatures.cpp index 612306b..489a517 100644 --- a/cli/mainfeatures.cpp +++ b/cli/mainfeatures.cpp @@ -661,7 +661,7 @@ void setTagInfo(const StringVector ¶meterValues, const Argument &filesArg, c MediaFileInfo fileInfo(selectedDenotatedValue->second.toLocal8Bit().constData()); fileInfo.open(true); fileInfo.parseContainerFormat(); - unique_ptr buff = make_unique(fileInfo.size()); + auto buff = make_unique(fileInfo.size()); fileInfo.stream().seekg(0); fileInfo.stream().read(buff.get(), fileInfo.size()); TagValue value(move(buff), fileInfo.size(), TagDataType::Picture); diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 51a5212..b456bc1 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -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; diff --git a/resources/desktop/applications/tageditor.desktop b/resources/desktop/applications/tageditor.desktop index c52771b..298ba3a 100644 --- a/resources/desktop/applications/tageditor.desktop +++ b/resources/desktop/applications/tageditor.desktop @@ -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