Commit Graph

107 Commits

Author SHA1 Message Date
Martchus 761e3ee44b Mark all "final" tag, track and container classes as such 2020-12-18 21:13:52 +01:00
Martchus e4a89af3c0 Improve documentation 2020-12-16 17:49:02 +01:00
Martchus 6b469f1c26 Add Locale class to deal with differently specified languages/countries
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.
2020-12-16 17:48:08 +01:00
Martchus aa23750307 Make many constructors explicit to avoid unintended implicit conversions 2020-12-05 20:48:57 +01:00
Martchus 5f39e377dc Use std::size_t consistently 2020-11-25 17:54:30 +01:00
Martchus e7ce9e7ced Improve documentation 2020-11-05 19:52:09 +01:00
Martchus d26e594777 Deprecate 'Year' in favor of 'RecordDate' and 'ReleaseDate', fix handling in ID3v2
1. Convert TYER and related fields of old ID3v2 versions to the new TDRC
  field and only expose that via the generic accessors.
2. When writing an old ID3v2 tag, convert TDRC back to the old fields.
3. One can still manually unset the via 1. auto-populated TDRC to disable 2.
   and write the old fields directly. So the automatic handling does not
   reduce the flexibility of the library.
4. Deprecate 'Year'; it is replaced by the already existing 'RecordDate'
   which is now supposed to be used everywhere where 'Year' was used before
5. Introduce 'ReleaseDate' to support this field which is supported in
   ID3v2.4.0 and Matroska via the generic accessors.
6. Use ISO format when converting tag values of the type DateTime to/from
   string. This is closer to what's used in ID3v2 tags internally. (The
   library still allows the old format as fallback when parsing for
   compatibility.)
2020-04-24 23:15:13 +02:00
Martchus 0e66b34d48 Add human readable representation of certain IDs as comments 2020-04-22 22:08:02 +02:00
Martchus 6c8f237087 Show warning when reading/writing ID3v2 frames not matching the tag version 2020-04-22 19:48:27 +02:00
Martchus c9e0f82519 Add missing exports in id3v2frameids.h 2020-04-22 19:15:54 +02:00
Martchus 8f3eae59f1 Add more time-related ID3v2 IDs 2020-04-22 19:14:34 +02:00
Martchus 248a6555f3 Add links to upstream documentation of field IDs for the different formats 2020-04-22 18:43:41 +02:00
Martchus ed816a322d Rename Id2v2 frame ID "grouping" to "albumArtist" 2019-06-16 17:45:49 +02:00
Martchus 0af4044a50 Remove deprecated functions of Id3v2Frame 2019-06-16 17:43:58 +02:00
Martchus df9d869911 Fix const-corretness in Id3Genres::genreNames() 2019-06-16 17:42:14 +02:00
Martchus 9a5c78b725 Don't consider UTF-8 an encoding which can be used in ID3v1
UTF-8 within ID3v1 is still supported relying on the presence of
the BOM. However, the library should not advise that to tag editing
clients.
2019-06-14 18:07:59 +02:00
Martchus c9e1dde70b Adapt to changes in c++utilities 2019-06-12 20:40:45 +02:00
Martchus 5ad00a083c Adapt to changes in c++utilities 2019-06-10 23:11:39 +02:00
Martchus f042d216fd Do not completely refuse on UTF-8 in ID3v1
since it is apparently used by some software.

But
* Write at least a BOM so it can be interpreted later
  correctly as UTF-8
* Print a warning
* Keep proposing Latin-1

The tag editor should allow to configure which encoding
is used and whether the BOM is used and which encoding is
assumed when parsing a file.
2019-06-01 22:53:59 +02:00
Martchus a4665456d6 Fix warnings in Id3v2Frame 2019-06-01 22:26:16 +02:00
Martchus 69c72909e8 Fix some Doxygen warnings 2019-06-01 15:07:48 +02:00
Martchus c17db5f2f6 Apply cmake-format and clang-format 2019-05-04 21:03:09 +02:00
Martchus 7efa7a0d5a Adapt to c++utilities v5 2019-05-04 16:04:21 +02:00
Martchus dbce74444a Deprecate unused methods in Id3v2Frame 2019-02-13 21:44:19 +01:00
Martchus e93a7c53b3 Fix warnings in ID3v2Frame 2019-02-13 21:43:56 +01:00
Martchus 3d3bc94e39 Prevent warning "Cannot make an empty frame" 2019-02-13 20:19:46 +01:00
Martchus 5140b76f08 Treat 255 as empty ID3v1 genre index 2019-02-13 18:56:03 +01:00
Martchus 6afcd0f8d3 Support album artist and fix/improve grouping 2019-01-01 23:47:18 +01:00
Martchus f1382bd286 Make message about empty frames only a warning
Empty frames don't cause any trouble in general. They only
*might* indicate that something went wrong.
2018-11-15 22:09:10 +01:00
Martchus a775ee61a2 Remove debug messages that the padding has been reached
This is true for most MP3 files and therefore not really helpful.
2018-11-15 22:07:07 +01:00
Martchus e74645e833 Handle unknown short IDs correctly when comparing ID3v2 frame IDs 2018-07-13 12:37:21 +02:00
Martchus 7d709ce9af Add Tag::supportsMultipleValues() 2018-07-13 12:25:00 +02:00
Martchus 341c7bbfd0 Fix setting ID in Id3v2Tag::internallySetValues() for new fields 2018-07-12 12:35:33 +02:00
Martchus e75a8d25c5 Adjust values()/setValues() to handle multiple values per text frame
See https://github.com/Martchus/tagparser/issues/10
2018-07-12 12:34:38 +02:00
Martchus af4b43ff79 Replace typedef with using 2018-07-12 12:34:38 +02:00
Martchus 8d89954cd3 Remove frameIdString() 2018-07-12 12:34:38 +02:00
Martchus e81c6bb169 Implement small TODOs for v8 2018-07-12 12:34:38 +02:00
Martchus 9361e0bc13 Use constexpr where possible 2018-07-12 12:34:38 +02:00
Martchus 1a97d91b27 Preserve multiple strings in ID3v2 text frames 2018-07-12 12:34:38 +02:00
Martchus f27dbd8934 Update documentation 2018-07-09 12:42:14 +02:00
Martchus d64084ec78 Refactor formatting list of values 2018-07-01 22:11:34 +02:00
Martchus 943123afa1 Warn about ID3v2 text frame with multiple strings
First step to support multiple strings within ID3v2 text
frame.

See
* https://github.com/Martchus/tagparser/issues/10
* https://github.com/Martchus/tageditor/issues/38
2018-07-01 02:04:29 +02:00
Martchus 3265e0bea4 Fix documentation which was still using the old namespace 2018-06-03 20:38:32 +02:00
Martchus a065412d98 Add support for disk position in ID3v2.0 2018-06-02 23:08:38 +02:00
Martchus 0a640c9f7f Fix warnings, mostly about implicit int conversions
This should fix all non-erros, leaving only warnings which
are indeed potential problems.

The following warnings should be safe to ignore:

* Conversions of various offsets from uint64 to
  std::streamoff/int64 are safe because such offsets have
  been obtained via tellg() and other functions
  returning std::streamoff in the first place.
* It also works vice-versa since tellg() should not
  return negative offsets with exceptions enabled.
* Conversions from char to unsigned char are also ok.
* Unused diag arguments can be ignored (those might be
  useful later).
* Annotate all intended fallthoughs.
2018-06-02 23:04:53 +02:00
Martchus 404e4f751f Improve comments and accessing the value in Id3v2FrameMaker 2018-06-02 19:34:07 +02:00
Martchus 710b7b420a Prevent writing float/e-notation to Id3v2 duration field 2018-06-02 19:31:39 +02:00
Martchus 878b3a3c4e Make diag msg on conversion error in Id3v2FrameMaker more specific 2018-06-02 19:29:43 +02:00
Martchus ba23b49d39 Ensure iostream is included in id3v2tag.cpp 2018-06-02 19:27:29 +02:00
Martchus bf7428d066 Fix warnings, improve coding style 2018-05-31 00:25:32 +02:00