Commit Graph

176 Commits

Author SHA1 Message Date
73dc64ce6a Expose target to JavaScript 2023-08-02 18:08:35 +02:00
1d4c18f474 Allow setting the save path via JavaScript 2023-08-02 17:56:20 +02:00
ccb516d47b Avoid implicit type conversion 2023-08-02 17:56:01 +02:00
24b397b930 Add functions to read dirs/files from the JavaScript 2023-08-02 17:55:36 +02:00
9aca90538d Execute JavaScript after tags have been added/removed 2023-08-02 17:42:47 +02:00
57b6d38e43 Simplify dealing with fields in JavaScript
* Expose PositionInSet as Object (that is still convertable to String)
* Allow assigning field values directly without having to have a
  TagValueObject and without having to have an Array
2023-08-01 00:50:33 +02:00
c3af3d43e6 Allow dealing with multiple fields values in JavaScript 2023-07-31 23:53:35 +02:00
9cb8702d13 Fix use of QT_BEGIN_NAMESPACE when declaring qHash() function 2023-07-30 16:57:19 +02:00
8c2ab29927 Make JavaScript processing code compatible with Qt 5 2023-07-30 16:55:35 +02:00
22953ad0da Allow tag processing via JavaScript 2023-07-30 16:15:19 +02:00
a6231b8442 Add the tag type the "not supported for" message refers to 2023-05-03 21:09:36 +02:00
0e36eec6c7 Suppress "field not supported" for ID3v1 fields if writing ID3v2 as well 2023-05-03 21:00:59 +02:00
b7016f98a2 Add pedantic argument to allow returning a non-zero exit code in case of errors
This is especially useful to check whether a file is complete, e.g. one might
use `tageditor info --validate --pedantic --files …` to check whether the
specified files are ok. (If they were truncated there's be an error about it
and the command would return a non-zero exit code. Without pedantic this would
just return in a non-zero exit code if the file couldn't be parsed at all.)
2023-04-25 23:16:15 +02:00
b023c26205 Avoid use of non-standard escape character to avoid MSVC warning about it 2023-03-26 21:59:31 +02:00
9b143ffbef Avoid unqualified calls to std::move 2023-02-20 19:55:16 +01:00
a220b86672 Disable code relying on unistd.h when compiling with MSVC
Not sure what to do instead, so for now let's just disable the logging from
the signal handler completely for MSVC builds so the code at least
compiles.
2023-02-02 00:33:15 +01:00
Stent
3fe8db2c01
Fix language mistakes in cli help text
Closes #96
2022-12-22 13:37:08 +00:00
08629ef4ee Improve error handling when setting tags in CLI 2022-08-12 00:28:57 +02:00
9eeae7ae22 Use TagValue::toDisplayString() instead of handling exception 2022-06-19 13:32:46 +02:00
b5c12f09b5 Apply clang-format 2022-05-26 21:40:55 +02:00
90d2d7bde4 Support all known fields in renaming utility
* Generalize and simplify code for populating tag object
2022-05-24 18:12:50 +02:00
e8c0450c1c Preserve casing in field mapping consistently for cases where it is wanted 2022-05-24 18:11:33 +02:00
794afdb01e Print diagnostic messages to stderr
They contain errors and debugging information so stderr fits better. This
also ensures they don't conflict with the output, e.g. when extracting to
stdout.
2022-05-21 13:25:44 +02:00
b26b972e25 Return non-zero exit code in all fatal error cases
See https://github.com/Martchus/tageditor/issues/83
2022-05-21 13:06:34 +02:00
56ca398dda Apply changes to any Ogg Vorbis comment unless a track has been specified
This is required since the parsed Ogg Vorbis comment's target is set to the
containing Ogg stream as it still makes sense not having to care about the
specific track in most cases.
2022-05-04 00:42:48 +02:00
5e808d069b Support many more fields 2022-04-06 01:15:21 +02:00
a40cff17a9 Apply clang-format 2022-04-05 20:17:33 +02:00
32c9cbaae2 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:51 +01:00
30bf73163f cli: Catch conversion exceptions when making tag values from CLI args 2022-03-16 21:09:20 +01:00
df1c949f88 cli: Revamp extract to allow specifying index of value to extract 2022-03-16 20:37:35 +01:00
7f1e234f36 Fix occurrences of wrong encoding handling with std::filesystem 2022-03-16 19:51:54 +01:00
7ba63ad79f cli: Display at least MIME-type if field cannot be displayed as string 2022-03-16 19:38:51 +01:00
a21d91e716 Improve coding style in CLI code for parsing specified fields
* Use `std::string_view` instead of C-style strings and e.g. `strncmp`
* Use consistent coding style, e.g. for initialization
2022-01-01 21:15:22 +01:00
ef637cb361 Use more uniform coding style in setTagInfo() 2022-01-01 20:45:06 +01:00
28691378ce Avoid creation of targets when relevat values are empty or when using relaxed matching 2022-01-01 20:44:42 +01:00
4905aa96b4 Avoid copy when registering interrupt handler 2021-12-31 00:44:52 +01:00
2c9be7c223 Fix parsing CLI argument "target-attachments" 2021-12-31 00:42:43 +01:00
dca5905744 Improve coding style in CLI code
* Use `std::string_view` instead of `const std::string &`
* Use `const` and `auto` where it makes sense
2021-12-31 00:41:56 +01:00
c71fde86ec Allow relaxed target matching 2021-12-31 00:40:36 +01:00
34282ebbe9 Remove handling for comma-separated specifications of targets to remove 2021-12-31 00:35:42 +01:00
c753c2e1fd Remove unused variable 2021-12-05 17:52:55 +01:00
43ebafe6dc Improve error message when trying to assign attachments to format not supporting it
See https://github.com/Martchus/tageditor/issues/74
2021-09-24 21:54:52 +02:00
fef97aa1db Allow specifying --validate flag when displaying file info 2021-08-18 23:12:27 +02:00
33b346fb7e Improve error message when file for tag value not found 2021-08-14 14:23:08 +02:00
9c1bd4c210 Avoid warning about implicit conversion 2021-07-03 23:53:20 +02:00
b4d1df8592 Fix typos found via codespell --skip .git -w 2021-07-03 19:38:36 +02:00
a9f3a607a3 Improve showing IO errors
* Make error messages and dialogs more consistent
* Print the actual error message (which might actually contain something
  useful when NativeFileStream is used)
2021-06-01 22:36:48 +02:00
523971ad9d Suppress warning about cover type for ID3v1 tag when also an ID3v2 tag is present 2021-06-01 22:05:07 +02:00
7ada28b06e cli: Allow preserving the modification time
See https://github.com/Martchus/tageditor/issues/66
2021-06-01 21:56:23 +02:00
3203d4403e Apply clang-format 2021-05-27 18:56:53 +02:00