A complex property can be set with
-C <complex-property-key> <key1=val1,key2=val2,...>
The second parameter can be set to "" to delete complex properties with the
given key. The set complex property values, a simple shorthand syntax can be
used. Multiple maps are separated by ';', values within a map are assigned
with key=value and separated by a ','. Types are automatically detected,
double quotes can be used to force a string. A ByteVector can be constructed
from the contents of a file with the path is given after "file://". There is
no escape, but hex codes are supported, e.g. "\x2C" to include a ',' and \x3B
to include a ';'.
Examples:
Set a GEOB frame in an ID3v2 tag:
examples/tagwriter -C GENERALOBJECT \
'data=file://file.bin,description=My description,fileName=file.bin,mimeType=application/octet-stream' \
file.mp3
Set an APIC frame in an ID3v2 tag (same as -p file.jpg 'My description'):
examples/tagwriter -C PICTURE \
'data=file://file.jpg,description=My description,pictureType=Front Cover,mimeType=image/jpeg' \
file.mp3
Set an attached file in a Matroska file:
examples/tagwriter -C file.bin \
'fileName=file.bin,data=file://file.bin,mimeType=application/octet-stream' \
file.mka
Set simple tag with target type in a Matroska file:
examples/tagwriter -C PART_NUMBER \
name=PART_NUMBER,targetTypeValue=20,value=2 file.mka
Set simple tag with binary value in a Matroska file:
examples/tagwriter -C BINARY \
name=BINARY,data=file://file.bin,targetTypeValue=60 file.mka
When trying to read a packet from the last page the readPages() method
would return false for all packets on the last page.
Move the lastPage check just before trying to create the next page, and
after the packetIndex check of the last fetched page.
FLAC in Ogg must have a Vorbis comment Metadata block, but in case
the file still has none avoid overwriting the first packet, i.e.
the Streaminfo Metadata block.
In case the Vorbis comment block is the last one the last block flag
has to be set.
As the other metadata blocks are kept as is, and in original order,
and no other metadata blocks are added/inserted, these can be kept
as is.
Also warn if the header scan loop detects a frame sync sequence (which
is the head of the first non-header packet). Previously, this was
detected as the last header packet, but streamStart and streamLength
are unused, and all packets but the vorbis comment packet are just copied
in order.
See taglib#1297
The check for the size of long is no longer needed because since
TagLib 2.0 the related fields are 64-bit on Windows too.
Related to https://bugs.kde.org/show_bug.cgi?id=513531
While CMake appears to accept the ".." notation, it does not correctly
apply the policy_max version in that case.
Amends ab31d11c8d
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
CMake 3.10 was released in 2017.
Amends 967aaf7af2, fixes warning since CMake-3.31:
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
The C bindings would convert a char* to String using the default
constructor, which uses the Latin1 encoding, breaking when a key
contains a Unicode character (e.g. an ID3v2 comment description).
The involvement/involvee pairs which are supported for TIPL properties
(ARRANGER, ENGINEER, PRODUCER, DJ-MIX, MIX) are left in the TIPL
frame, other pairs are moved to a TMCL frame. This will result in a
consistent behavior for both ID3v2.3 and ID3v2.4 tags produced by
MusicBrainz Picard.
In C++, wchar_t is a built-in fundamental type, but in C, it is not.
Compilation with MinGW will fail without a header included which
defines wchar_t (wchar.h or stddef.h). The other compilers used in our
CI (gcc on Ubuntu, clang on macOS and MSVC on Windows) seem to
know wchar_t without an include.
This will fail on MinGW because its gcc does not have wchar_t without
including wchar.h. With g++ as used with test_tag_c.cpp, the problem is
undetected because g++ supports wchar_t without including wchar.h.