Commit Graph

60 Commits

Author SHA1 Message Date
Martchus 981db492e4 Avoid unqualified calls to `std::move` 2023-02-20 19:54:42 +01:00
Martchus b50de3cf4f Preserve present parts when converting old record date fields 2022-08-13 15:43:28 +02:00
Martchus f0d8a6efa7 Set only present parts when setting recording time of ID3 <= v2.3
See https://github.com/Martchus/tageditor/issues/86
2022-08-13 14:47:49 +02:00
Martchus 74f6d2b6ac Fix reference to ID3v2 field in error message 2022-08-13 14:43:43 +02:00
Martchus 99bb786eeb Improve comments about `lRecordingTime`-mapping 2022-08-12 19:41:15 +02:00
Martchus 0e3ccf8baa Support play counter ID3v2 frame 2022-06-19 17:40:01 +02:00
Martchus 46014def51 Add data type for ID3v2's Popularimeter field
See https://github.com/Martchus/tageditor/issues/84
2022-06-18 14:33:30 +02:00
Martchus 1457dec990 Map "popularity meter" of ID3v2 tags to the generic rating field
See https://github.com/Martchus/tageditor/issues/84
2022-06-15 23:50:15 +02:00
Martchus 87aea59735 Change mapping of publisher for ID3v2
TPUB is likely better be mapped to the recently added publisher field. Note
that MP4 and Matroska have a distinct record label field.
2022-04-10 00:06:20 +02:00
Martchus 4da00f8b75 Add more field mappings 2022-04-09 23:36:39 +02:00
Martchus bf1eee45ba Add field mappings for all fields mentioned in Matroska spec 2022-04-06 00:01:19 +02:00
Jonas Kvinge ea23d71e8a Fix spelling and typos 2021-07-02 11:12:39 +02:00
Martchus 9da53e6d82 Allow one to disable the automatic handling of ID3v2 record fields 2021-05-13 16:07:06 +02:00
Martchus 87357af974 Fix handling empty ID3v2 record date fields to avoid year "0001" in this case 2021-05-09 12:15:57 +02:00
Martchus f21ac07da0 Get rid of deprecated fields 2021-02-01 17:11:08 +01:00
Martchus 7692eec9af Make it easier to customize getting internal values 2021-01-30 19:12:04 +01:00
Martchus e4a89af3c0 Improve documentation 2020-12-16 17:49:02 +01:00
Martchus aa23750307 Make many constructors explicit to avoid unintended implicit conversions 2020-12-05 20:48:57 +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 8f3eae59f1 Add more time-related ID3v2 IDs 2020-04-22 19:14:34 +02:00
Martchus ed816a322d Rename Id2v2 frame ID "grouping" to "albumArtist" 2019-06-16 17:45:49 +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 7efa7a0d5a Adapt to c++utilities v5 2019-05-04 16:04:21 +02:00
Martchus 6afcd0f8d3 Support album artist and fix/improve grouping 2019-01-01 23:47:18 +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 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 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 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
Martchus a3bf8267ac Fix treating short and long ID3v2 frame IDs as equal 2018-05-31 00:25:06 +02:00
Martchus 59024a66a0 Don't clear field before parsing by default 2018-03-11 22:27:12 +01:00
Martchus c0336ed4bb Apply clang-format 2018-03-07 01:17:50 +01:00
Martchus a0986ad4a9 Fix style issues 2018-03-07 01:11:42 +01:00
Martchus 0e15c74103 Move everything into namespace TagParser 2018-03-06 23:09:15 +01:00
Martchus 36511fcc13 Add progress feedback and diagnostics replacing status provider 2018-03-06 22:44:01 +01:00
Martchus 7a02e8a325 Uniform/simplify typedefs in templates
* Begin type names with capital letter
* Remove typedefs for implementation type
* Remove useless/obsolete comments
* Simplify relevant code
2018-03-06 22:44:01 +01:00
Martchus 0daabba17a Use static polymorphism in FieldMapBasedTag 2018-03-06 22:44:01 +01:00
Martchus 138fa32f29 Restructure FieldMapBasedTag to use CRTP 2018-03-06 22:44:01 +01:00
Martchus 424b238539 Make context static const where possible 2017-02-06 18:53:09 +01:00
Martchus 5037713071 Remove numberToString() where possible 2017-01-30 00:42:35 +01:00
Martchus 230a14fcf1 Use string builder rather than stringstream 2017-01-27 21:27:24 +01:00
Martchus 541f14039b Make use of string builder 2017-01-27 18:59:22 +01:00