mirror of https://github.com/xiph/flac
add option metaflac --show-all-tags
Co-authored-by: Martijn van Beurden <mvanb1@gmail.com>
This commit is contained in:
parent
20d8b0f50c
commit
0ab961de52
|
@ -109,6 +109,9 @@ modification time is set to the current time):
|
|||
**\--show-tag=name**
|
||||
: Show all tags where the field name matches 'name'.
|
||||
|
||||
**\--show-all-tags**
|
||||
: Show all tags. This is an alias for --export-tags-to=-.
|
||||
|
||||
**\--remove-tag=name**
|
||||
: Remove all tags whose field name is 'name'.
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ struct share__option long_options_[] = {
|
|||
{ "set-bps", 1, 0, 0 }, /* undocumented */
|
||||
{ "set-total-samples", 1, 0, 0 }, /* undocumented */ /* WATCHOUT: used by test/test_flac.sh on windows */
|
||||
{ "show-vendor-tag", 0, 0, 0 },
|
||||
{ "show-all-tags", 0, 0, 0 },
|
||||
{ "show-tag", 1, 0, 0 },
|
||||
{ "remove-all-tags", 0, 0, 0 },
|
||||
{ "remove-all-tags-except", 1, 0, 0 },
|
||||
|
@ -496,6 +497,10 @@ FLAC__bool parse_option(int option_index, const char *option_argument, CommandLi
|
|||
ok = false;
|
||||
}
|
||||
}
|
||||
else if(0 == strcmp(opt, "show-all-tags")) {
|
||||
op = append_shorthand_operation(options, OP__EXPORT_VC_TO);
|
||||
parse_string("-",&op->argument.filename.value);
|
||||
}
|
||||
else if(0 == strcmp(opt, "remove-all-tags")) {
|
||||
(void) append_shorthand_operation(options, OP__REMOVE_VC_ALL);
|
||||
}
|
||||
|
|
|
@ -124,6 +124,7 @@ int long_usage(const char *message, ...)
|
|||
fprintf(out, "\n");
|
||||
fprintf(out, "--show-vendor-tag Show the vendor string from the VORBIS_COMMENT block.\n");
|
||||
fprintf(out, "--show-tag=NAME Show all tags where the field name matches 'NAME'.\n");
|
||||
fprintf(out, "--show-all-tags Show all tags. This is an alias for --export-tags-to=-.\n");
|
||||
fprintf(out, "--remove-tag=NAME Remove all tags whose field name is 'NAME'.\n");
|
||||
fprintf(out, "--remove-first-tag=NAME Remove first tag whose field name is 'NAME'.\n");
|
||||
fprintf(out, "--remove-all-tags Remove all tags, leaving only the vendor string.\n");
|
||||
|
|
|
@ -80,7 +80,8 @@ EXTRA_DIST = \
|
|||
case60-expect.meta \
|
||||
case61-expect.meta \
|
||||
case62-expect.meta \
|
||||
case63-expect.meta
|
||||
case63-expect.meta \
|
||||
case64-expect.meta
|
||||
|
||||
clean-local:
|
||||
-rm -f out.*
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
TITLE=Tittle
|
||||
artist=Fartist
|
||||
artist=artits
|
|
@ -372,6 +372,8 @@ metaflac_test case62 "--import-picture-from" "--list"
|
|||
run_metaflac --remove-all-tags-except=artist=title $flacfile
|
||||
check_flac
|
||||
metaflac_test case63 "--remove-all-tags-except=artist=title" "--list"
|
||||
metaflac_test case64 "--export-tags-to=-" "--export-tags-to=-"
|
||||
metaflac_test case64 "--show-all-tags" "--show-all-tags"
|
||||
|
||||
# UNKNOWN blocks
|
||||
echo $ECHO_N "Testing FLAC file with unknown metadata... " $ECHO_C
|
||||
|
|
Loading…
Reference in New Issue