Commit Graph

832 Commits

Author SHA1 Message Date
Martchus 08570aea32 Support unsigned integers in TagValue 2022-06-19 17:38:54 +02:00
Martchus dcda6b673b Avoid breaking binary compatibility of TagDataType 2022-06-19 16:46:19 +02:00
Martchus 5205d08258 Improve coding style of a few functions in `id3v2frame.cpp`
* Declare functions only used in the compile unit as static
* Use `std` namespace explicitly
* Use `auto` where it makes sense
2022-06-19 16:32:42 +02:00
Martchus 669b054a48 Implement parsing popularimeter ID3v2 frame 2022-06-19 16:29:29 +02:00
Martchus f52b2958df Add implicit conversion of popularity to integer to generalize usage of popularity
* Propose the usage of the popularity type in general for the rating field
  so GUIs can show an appropriate UI element
* Do not just propose the popularity type for ID3v2 tags so a uniform UI
  element can be shown accross tag formats; and API to convert from a
  uniform scale is still TODO
2022-06-19 14:32:45 +02:00
Martchus c41046bd24 Simplify TagValue's comparision code 2022-06-18 14:54:55 +02:00
Martchus aa4b8a8e47 Ensure to handle all conversion errors in TagValue's equality operator
For instance, if a DateTime of wrong size is assigned this would lead to a
conversion error which would otherwise be unhandled.
2022-06-18 14:40:53 +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 9511d61371 Add comment about meaning of iTunes rating values 2022-06-16 01:15:51 +02:00
Martchus d6e1b4b77d Fix mapping of iTunes "advisory" rating to KnownField::LawRating
That likely fits the "advisory" rating better than KnownField::Rating which
is more a personal rating.
2022-06-16 01:15:51 +02:00
Martchus 5d7b7488fa Fix TagValue::toWString() for TagDataType::DateTime 2022-06-16 00:29:05 +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 7a70a8e098 Apply clang-format 2022-05-23 19:55:50 +02:00
Martchus e40c1901e1 Fix crash when parsing FLAC header 2022-05-23 19:55:32 +02:00
Martchus b27c82ef8c Bump patch version 2022-05-23 19:55:12 +02:00
Martchus 72f56f4297 Set the OggIterator filter correctly when parsing tags
I suppose otherwise parsing will fail if there are multiple streams and the
tag spans multiple interleaved pages.
2022-05-03 23:52:18 +02:00
Martchus 5106d94f2a Add Ogg stream serial number to tag target when parsing Vorbis comments
So the stream the Vorbis comment belongs to is shown in the tag editor GUI.
Otherwise it shouldn't change the behavior.
2022-05-03 23:50:20 +02:00
Martchus 84b4d06f53 Add stalebot config 2022-04-12 01:04:24 +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 520a913b07 Fix field ID of original year in ID3v2.0 2022-04-09 23:37:13 +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
Martchus 26c88befda Make dummy definition in supportsField() const 2022-04-05 23:30:06 +02:00
Martchus 01813e7879 Add missing official Matroska tag field IDs 2022-04-05 21:54:04 +02:00
Martchus 5c4f94de8e Fix originalMediaType() 2022-04-05 21:48:02 +02:00
Martchus 169760c996 Organize matroskatagid.h with sections in accordance to specification 2022-04-05 21:47:35 +02:00
Martchus a3dc63b677 Fix parsing flags of Matroska tracks
The default for the flags "default" and "enabled" is actually 1.
2022-04-05 21:27:58 +02:00
Martchus 8e3055291e Add copyright notice 2022-04-05 20:15:32 +02:00
Martchus a5830319b1 Avoid requiring OpenSSL package in CMake find module
as it is only required for unit tests
2022-04-03 23:20:43 +02:00
Martchus ff86df8e25 Use `makeNativePath()` instead of `u8path()`
On non-Windows platforms the internal representation used for paths is the
configured native (narrow) character set. Most of the time that's UTF-8 but
only on Windows UTF-8 is *always* used for the internal representation.
2022-03-17 22:41:35 +01:00
Martchus b441860cc6 Fix one more occurance of wrong encoding handling with `std::filesystem` 2022-03-16 19:45:59 +01:00
Martchus 1ac689392e Apply clang-format 2022-03-16 19:24:14 +01:00
Martchus 4f221798e9 Fix dealing with non-ASCII characters in backup helper on Windows
See https://github.com/Martchus/tageditor/issues/81
2022-03-16 19:13:09 +01:00
Martchus 526352e016 Increment patch version 2022-03-15 21:51:38 +01:00
Martchus 4140c07512 Clarify that license is "GPL-2-or-later" 2022-03-15 21:49:33 +01:00
Martchus ede94518d0 Add fields to AbstractTrack to support a few more Mkv specs in the future 2022-02-16 00:24:21 +01:00
Martchus 28abe151fd Avoid duplicating MP4 epoch 2022-02-16 00:04:09 +01:00
Martchus 503fb725a2 Improve handling time values of MP4 files
* 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)
2022-02-15 23:22:48 +01:00
Martchus d19a09db5b Make `startDate` static as it isn't used in any other units 2022-02-15 21:35:49 +01:00
Martchus eafe2fa997 Avoid constructor for TrackHeaderInfo 2022-02-15 21:23:29 +01:00
Martchus d390e8c9cf Deduplicate code for computing timing values of MP4 track 2022-02-15 21:22:07 +01:00
Martchus 41ddccb455 Avoid copying fields when making Vorbis comment 2021-12-31 01:18:45 +01:00
Martchus 4e80c31e98 Avoid writing cleared-out Matroska tag fields 2021-12-31 01:16:21 +01:00
Martchus 478b47d114 Improve documentation for `TagValue::isNull()`/`TagValue::isEmpty()` 2021-12-31 01:15:50 +01:00
Martchus 532a805254 Avoid adding empty values when setting values and field does not exist 2021-12-31 01:15:13 +01:00
Martchus 9ca4c57c0e Add `TagTarget::matches()` 2021-12-31 00:31:32 +01:00
Martchus b740d2c1e0 Simplify code 2021-12-31 00:30:11 +01:00
Martchus 31c1bb47e6 Add missing `TrackFlag…` Matroska IDs 2021-12-30 22:49:06 +01:00
Martchus 330e67844d Apply clang-format to example code 2021-12-21 01:08:10 +01:00
Martchus e4c9e9be31 Mention "Building this straight" instructions of tag editor 2021-12-20 23:31:58 +01:00