* The warning about `bsEnvCount` is actually correct.
* The warning about `lastAtomToBeWritten` might be correct.
* The warning about `relPos` is definitely unjustified because `relPos` is
only used when `cueRelativePositionElement` is not `nullptr` and `relPos`
is initialized in that case.
* The warnings about `pos`, `nextPageOffset` and `startOfLastMetaDataBlock`
are also wrong for similar reasons.
It is likely not worth adding support for APE tags at this point.
However, it still makes sense to acknowledge the presence of them
despite not being actually supported to avoid possible confusion.
With this change, APE tags at the beginning of the file will be
dropped when applying changes as the container offset is updated
when skipping the tag. I suppose that makes sense considering
putting those tags at the beginning is not recommended anyways.
The diag messages and README have been updated accordingly.
The bytes skipped while searching for MP3 frames should not be used as
container offset. The container offset should just the offset after the
first ID3v2 tag (or zero if there are no tags).
* Cache result of `verifyPresentTrackHeader()` instead of running the code
unnecassarily multiple times
* Do not tamper with existing/raw values by default to avoid
inconsistencies through rounding errors and possibly fix
https://github.com/Martchus/tageditor/issues/80
* Avoid conversions to double (depending on the time scale rounding errors
might still occur)
* Fix applying changes to symlinks so that the target is modified in any
case (and not just if a rewrite isn't necessary)
* Avoid using `std::rename` and `std::remove` because they might not work
under Windows when the path contains non-ASCII characters
* Simplify code, remove `isRelative()`
* Do this by default with an opt-out; changing only known fields should not
be very intrusive
* Fix recognizing known fields when only the case differs, see
https://github.com/Martchus/tageditor/issues/72
Different media/tag formats specify languages and countries
differently. This change introduces a Locale class to keep track
of the format being used. So far there are no automatic conversions
implemented so it is entirely up to the user to pass valid values using
a format which matches the one required by the media/tag format.
This change also adds support for Matroska's IETF elements so at least the
raw value can be read, written and is preserved.
Most players/tools can cope with MP3 files which have some bytes of junk
after the ID3v2 tag just fine, e.g. ffmpeg shows just
```
[mp3 @ 0x559e1f4cbd80] Skipping 1670 bytes of junk at 1165.
```
and most players can play the file just fine.
This change makes the tag editor also more resilient, allowing it to skip
a certain amount of junk bytes before a known container is detected. It
will also skip a certain amount of junk MPEG audio frames.
* Close or flush streams explicitely so writing is not
deferred
* to catch errors in the right place
* to avoid suppressing errors completely when writing
would be deferred to the destructor invocation
* Improve comments
FLAC stores tags on track level. Hence we must parse the
tracks here in order to parse the tags. This hasn't been taken
into account when refactoring the tag editor CLI leading to
https://github.com/Martchus/tageditor/issues/36.
So let's handle these format specific details in the tagparser
library which will now internally parse tracks when calling
parseTags() on FLAC files.
This also fixes the weird behavior to consider tags supported
although the container format is unknown.