diff --git a/README.md b/README.md index 3362e6a..e1addf4 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The tag editor can read and write the following tag formats: - iTunes-style MP4 tags (MP4-DASH is supported) - ID3v1 and ID3v2 tags - conversion between ID3v1 and different versions of ID3v2 -- Vorbis and Opus comments in Ogg streams +- Vorbis, Opus and FLAC comments in Ogg streams - cover art via "METADATA_BLOCK_PICTURE" is supported - Matroska/WebM tags and attachments diff --git a/gui/picturepreviewselection.cpp b/gui/picturepreviewselection.cpp index 4f4cd5d..dde2998 100644 --- a/gui/picturepreviewselection.cpp +++ b/gui/picturepreviewselection.cpp @@ -327,7 +327,7 @@ void PicturePreviewSelection::addOfSelectedType(const QString &path) emit pictureChanged(); } } - } catch (ios_base::failure &) { + } catch (const ios_base::failure &) { QMessageBox::critical(this, QApplication::applicationName(), tr("An IO error occured when parsing the specified cover file.")); } catch (Media::Failure &) { QMessageBox::critical(this, QApplication::applicationName(), tr("Unable to parse specified cover file.")); diff --git a/gui/tageditorwidget.cpp b/gui/tageditorwidget.cpp index 34d934a..b0ba9a5 100644 --- a/gui/tageditorwidget.cpp +++ b/gui/tageditorwidget.cpp @@ -13,14 +13,12 @@ #include #include -#include -#include #include #include #include #include #include -#include +#include #include #include @@ -517,13 +515,21 @@ void TagEditorWidget::updateTagManagementMenu() } // add "Remove tag" and "Change target" actions for(Tag *tag : m_tags) { - // check whether the tag is not from a Vorbis stream because in this case removing the tag seems to cause problems and hence shouldn't be proposed - if(tag->type() != TagType::VorbisComment || static_cast(tag)->oggParams().streamFormat != GeneralMediaFormat::Vorbis) { - connect(m_removeTagMenu->addAction(QString::fromLocal8Bit(tag->toString().c_str())), &QAction::triggered, std::bind(&TagEditorWidget::removeTag, this, tag)); - if(tag->supportsTarget()) { - connect(m_changeTargetMenu->addAction(QString::fromLocal8Bit(tag->toString().c_str())), &QAction::triggered, std::bind(&TagEditorWidget::changeTarget, this, tag)); + // don't propose removal for Vorbis comments from Voribs or FLAC streams (removing from Opus streams should be ok) + if(tag->type() == TagType::OggVorbisComment) { + switch(static_cast(tag)->oggParams().streamFormat) { + case GeneralMediaFormat::Vorbis: + case GeneralMediaFormat::Flac: + continue; + default: + ; } } + + connect(m_removeTagMenu->addAction(QString::fromLocal8Bit(tag->toString().c_str())), &QAction::triggered, std::bind(&TagEditorWidget::removeTag, this, tag)); + if(tag->supportsTarget()) { + connect(m_changeTargetMenu->addAction(QString::fromLocal8Bit(tag->toString().c_str())), &QAction::triggered, std::bind(&TagEditorWidget::changeTarget, this, tag)); + } } } m_addTagMenu->setEnabled(!m_addTagMenu->actions().empty()); diff --git a/translations/tageditor_de_DE.ts b/translations/tageditor_de_DE.ts index 0cd27f0..e49a77b 100644 --- a/translations/tageditor_de_DE.ts +++ b/translations/tageditor_de_DE.ts @@ -1535,22 +1535,22 @@ another position would prevent rewriting the entire file QtGui::HttpResultsModel - + <p>Do you want to redirect form <i>%1</i> to <i>%2</i>?</p> - + Search - + Redirection to: - + Aborted by user. @@ -1928,12 +1928,12 @@ another position would prevent rewriting the entire file QtGui::MusicBrainzResultsModel - + Unable to fetch cover: Album ID is unknown. - + Cover reply is invalid (internal error). @@ -2250,42 +2250,42 @@ another position would prevent rewriting the entire file QtGui::QueryResultsModel - + Song title - + Album - + Artist - + Year - + Track - + Total tracks - + Genre - + Fetching the cover is not implemented for the selected provider. @@ -2638,7 +2638,7 @@ the file reverting all unsaved changings. - + Abort @@ -2703,203 +2703,203 @@ the file reverting all unsaved changings. - + Add tag - + Remove tag - + Change target - + Segment %1 - + Attachments - + Matroska tag - + MP4/iTunes tag - + Tag - + ID3v1 tag - + ID3v2 tag - - + + Copy - + Unable to load the selected file "%1" because the current process hasn't finished yet. - + The file is beeing parsed ... - + Unable to reload the file because the current process hasn't finished yet. - + Currently is not file opened. - + The file could not be opened because an IO error occurred. - + File could be parsed correctly. - + File couldn't be parsed correctly. - + There are critical parsing notifications. - + There are warnings. - + There is no (supported) tag assigned. - + File format is not supported (an ID3 tag can be added anyways). - + The file %1 has been opened. - + Unable to apply the entered tags to the file because the current process hasn't finished yet. - + Saving tags ... - + No file has been opened. - + Unable to delete all tags from the file because the current process hasn't been finished yet. - + Do you really want to delete all tags from the file? - + don't show this message again - + Deleting all tags ... - + The selected file stores no tag (at least no supported), so there is nothing to delete. - + No file has been opened, so no tags can be deleted. - + Unable to start saving process because there an other process hasn't finished yet. - + Cancelling ... - + Vorbis/Opus comment - + Expand all - + Collapse all - + No write access; the file has been opened in read-only mode. - + The file is composed of multiple segments. Dealing with such files has not been tested yet and might be broken. - + The tags have been saved, but there is/are %1 warning(s) @@ -2907,7 +2907,7 @@ the file reverting all unsaved changings. - + and %1 error(s). @@ -2915,7 +2915,7 @@ the file reverting all unsaved changings. - + The tags have been saved, but there is/are %1 warning(s). @@ -2923,72 +2923,72 @@ the file reverting all unsaved changings. - + The tags have been saved. - + The tags couldn't be saved. See the info box for detail. - + The tags couldn't be saved because an IO error occured. - + Automatic tag management - + The container format of the selected file is not supported. The file can be treated as MP3 file (an ID3 tag according to the settings will be created). This might break the file. Do you want to continue? - + Treat file as MP3 file - + The currently opened file changed on the disk. - + A tag (with the selected target) already exists. - + The tag can not be created. - + Unable to remove the tag because the current process hasn't been finished yet. - + Unable to remove the tag because no file is opened. - + Unable to change the target because the current process hasn't been finished yet. - + Unable to change the target because no file is opened. - + Can not change the target of the selected tag because the tag does not support targets. diff --git a/translations/tageditor_en_US.ts b/translations/tageditor_en_US.ts index be9ca63..5a91a84 100644 --- a/translations/tageditor_en_US.ts +++ b/translations/tageditor_en_US.ts @@ -1535,22 +1535,22 @@ another position would prevent rewriting the entire file QtGui::HttpResultsModel - + <p>Do you want to redirect form <i>%1</i> to <i>%2</i>?</p> - + Search - + Redirection to: - + Aborted by user. @@ -1928,12 +1928,12 @@ another position would prevent rewriting the entire file QtGui::MusicBrainzResultsModel - + Unable to fetch cover: Album ID is unknown. - + Cover reply is invalid (internal error). @@ -2250,42 +2250,42 @@ another position would prevent rewriting the entire file QtGui::QueryResultsModel - + Song title - + Album - + Artist - + Year - + Track - + Total tracks - + Genre - + Fetching the cover is not implemented for the selected provider. @@ -2573,203 +2573,203 @@ Error in line %1: %3 QtGui::TagEditorWidget - + Add tag - + Remove tag - + Change target - + Segment %1 - + Attachments - + Matroska tag - + MP4/iTunes tag - + Vorbis/Opus comment - + Tag - + ID3v1 tag - + ID3v2 tag - - + + Copy - + Expand all - + Collapse all - + The file is beeing parsed ... - + Unable to load the selected file "%1" because the current process hasn't finished yet. - + Currently is not file opened. - + Unable to reload the file because the current process hasn't finished yet. - + The file could not be opened because an IO error occurred. - + File could be parsed correctly. - + File couldn't be parsed correctly. - + There are critical parsing notifications. - + There are warnings. - + No write access; the file has been opened in read-only mode. - + File format is not supported (an ID3 tag can be added anyways). - + The file is composed of multiple segments. Dealing with such files has not been tested yet and might be broken. - + There is no (supported) tag assigned. - + The file %1 has been opened. - + Saving tags ... - + No file has been opened. - + Unable to apply the entered tags to the file because the current process hasn't finished yet. - + Do you really want to delete all tags from the file? - + don't show this message again - + Deleting all tags ... - + The selected file stores no tag (at least no supported), so there is nothing to delete. - + No file has been opened, so no tags can be deleted. - + Unable to delete all tags from the file because the current process hasn't been finished yet. - + Cancelling ... - + Unable to start saving process because there an other process hasn't finished yet. - + The tags have been saved, but there is/are %1 warning(s) The tags have been saved, but there is %1 warning @@ -2777,7 +2777,7 @@ Error in line %1: %3 - + and %1 error(s). @@ -2785,7 +2785,7 @@ Error in line %1: %3 - + The tags have been saved, but there is/are %1 warning(s). The tags have been saved, but there is %1 warning. @@ -2793,72 +2793,72 @@ Error in line %1: %3 - + The tags have been saved. - + The tags couldn't be saved. See the info box for detail. - + The tags couldn't be saved because an IO error occured. - + Automatic tag management - + The container format of the selected file is not supported. The file can be treated as MP3 file (an ID3 tag according to the settings will be created). This might break the file. Do you want to continue? - + Treat file as MP3 file - + The currently opened file changed on the disk. - + A tag (with the selected target) already exists. - + The tag can not be created. - + Unable to remove the tag because no file is opened. - + Unable to remove the tag because the current process hasn't been finished yet. - + Unable to change the target because no file is opened. - + Can not change the target of the selected tag because the tag does not support targets. - + Unable to change the target because the current process hasn't been finished yet. @@ -2928,7 +2928,7 @@ the file reverting all unsaved changings. - + Abort