scribbu genre
¶scribbu genre
will set the genre (i.e. the TCON frame for ID3v2
tags and the genre byte for ID3v1) for all tags in all files named on
the command line. If an argument is a file, operate on the tags in
that file. If the argument is a directory, operate recursively on all
files containing ID3 tags therein.
The genre can be specified in a few ways:
scribbu genre -w N
will interpret N
as one of the genres defined by Winamp
See Winamp, specified as an integer between 0 & 191
(inclusive). Run scribbu genre -W
to print a list of the Winamp
genres.
scribbu genre -g GENRE
will attempt to map to map the string GENRE
to one of the
Winamp genres using Damerau-Levenshtein distance, but disregarding
case. For instance scribbu genre -g rok
will be interpreted as
Winamp genre 17: "Rock".
scribbu genre -G GENRE
will accept GENRE uncritically as the TCON to be used for ID3v2
tags. ID3v1 tags, if present, will have their genre field mapped to
one of the Winamp values again by case-insensitive Damerau-Levenshtein
distance (or just set to 255 if that fails). To explicitly set the
ID3v1 version when specifying genre in this way, add the --v1
flag (e.g. scribbu genre -G foo --v1 17
).
This brings up the question of what to do if there is no ID3v1 and/or no ID3v2 tag(s) in a given file. By default, in the absence of a tag, nothing will be done (so if invoked, for instance, on a file with neither an ID3v1 nor an ID3v2 tag, this sub-command would do nothing). This behavior can be customized in two ways. If --create-v2 or --create-v1 are given, an ID3v2 (ID3v1, resp.) tag will be created for any file which already possess an ID3v1 (ID3v2, resp.) tag. If --always-create-v2 or --always-create-v1 are given, an ID3v2 (ID3v1, resp.) tag will always be created if it doesn’t exist.