diff --git a/CMakeLists.txt b/CMakeLists.txt index 980e0da..9e4d107 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,8 +13,8 @@ set(META_APP_DESCRIPTION set(META_GUI_OPTIONAL true) set(META_JS_SRC_DIR renamingutility) set(META_VERSION_MAJOR 3) -set(META_VERSION_MINOR 5) -set(META_VERSION_PATCH 2) +set(META_VERSION_MINOR 6) +set(META_VERSION_PATCH 0) set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON) # add project files @@ -199,7 +199,7 @@ if (WIDGETS_GUI OR QUICK_GUI) endif () # find tagparser -find_package(tagparser${CONFIGURATION_PACKAGE_SUFFIX} 10.1.0 REQUIRED) +find_package(tagparser${CONFIGURATION_PACKAGE_SUFFIX} 10.4.0 REQUIRED) use_tag_parser() # enable experimental JSON export diff --git a/cli/helper.cpp b/cli/helper.cpp index 610949d..7e5aec8 100644 --- a/cli/helper.cpp +++ b/cli/helper.cpp @@ -579,6 +579,12 @@ FieldDenotations parseFieldDenotations(const Argument &fieldsArg, bool readOnly) continue; } else if (applyTargetConfiguration(scope.tagTarget, fieldDenotationString)) { continue; + } else if (!strcmp(fieldDenotationString, "target-matching=exact")) { + scope.exactTargetMatching = true; + continue; + } else if (!strcmp(fieldDenotationString, "target-matching=relaxed")) { + scope.exactTargetMatching = false; + continue; } else if (!strncmp(fieldDenotationString, "track-id=", 9)) { const vector parts = splitString>(fieldDenotationString + 9, ",", EmptyPartsTreat::Omit); bool allTracks = false; diff --git a/cli/helper.h b/cli/helper.h index aa044e4..fe34ec9 100644 --- a/cli/helper.h +++ b/cli/helper.h @@ -125,6 +125,7 @@ struct FieldScope { FieldId field; TagType tagType; TagTarget tagTarget; + bool exactTargetMatching; bool allTracks; std::vector trackIds; }; @@ -133,13 +134,14 @@ inline FieldScope::FieldScope(KnownField field, TagType tagType, TagTarget tagTa : field(field) , tagType(tagType) , tagTarget(tagTarget) + , exactTargetMatching(true) , allTracks(false) { } inline bool FieldScope::operator==(const FieldScope &other) const { - return field == other.field && tagType == other.tagType && tagTarget == other.tagTarget; + return field == other.field && tagType == other.tagType && tagTarget == other.tagTarget && exactTargetMatching == other.exactTargetMatching; } inline bool FieldScope::isTrack() const diff --git a/cli/mainfeatures.cpp b/cli/mainfeatures.cpp index 19bcd6d..ef31c88 100644 --- a/cli/mainfeatures.cpp +++ b/cli/mainfeatures.cpp @@ -663,7 +663,9 @@ void setTagInfo(const SetTagInfoArgs &args) const FieldScope &denotedScope = fieldDenotation.first; // skip values which scope does not match the current tag if (denotedScope.isTrack() || !(denotedScope.tagType == TagType::Unspecified || (denotedScope.tagType & tagType)) - || !(!targetSupported || denotedScope.tagTarget == tagTarget)) { + || !(!targetSupported + || (denotedScope.exactTargetMatching ? denotedScope.tagTarget == tagTarget + : denotedScope.tagTarget.matches(tagTarget)))) { continue; } // convert the values to TagValue