| 585 | } |
| 586 | |
| 587 | int format_handler([[maybe_unused]] void *user, const char *section, const char *name, const char *value) |
| 588 | { |
| 589 | FileType file_type = determine_section_type(section); |
| 590 | if (file_type == FileType::INVALID) |
| 591 | return 0; |
| 592 | |
| 593 | // Parse setting keys |
| 594 | if (MATCH(name, "Album")) |
| 595 | convert_bool(value, configs[static_cast<int>(file_type)].do_album); |
| 596 | else if (MATCH(name, "AlbumAsAES77")) |
| 597 | convert_bool(value, configs[static_cast<int>(file_type)].album_as_aes77); |
| 598 | else if (MATCH(name, "TagMode")) |
| 599 | parse_tag_mode_easy(value, configs[static_cast<int>(file_type)].tag_mode); |
| 600 | else if (MATCH(name, "ClipMode")) |
| 601 | parse_clip_mode(value, configs[static_cast<int>(file_type)].clip_mode); |
| 602 | else if (MATCH(name, "Lowercase")) |
| 603 | convert_bool(value, configs[static_cast<int>(file_type)].lowercase); |
| 604 | else if (MATCH(name, "ID3v2Version")) |
| 605 | parse_id3v2_version(value, configs[static_cast<int>(file_type)].id3v2version); |
| 606 | else if (MATCH(name, "TargetLoudness")) |
| 607 | parse_target_loudness(value, configs[static_cast<int>(file_type)].target_loudness); |
| 608 | else if (MATCH(name, "MaxPeakLevel")) |
| 609 | parse_max_peak_level(value, configs[static_cast<int>(file_type)].max_peak_level); |
| 610 | else if (MATCH(name, "TruePeak")) |
| 611 | convert_bool(value, configs[static_cast<int>(file_type)].true_peak); |
| 612 | else if (MATCH(name, "OpusMode")) |
| 613 | parse_opus_mode(value, configs[static_cast<int>(file_type)].opus_mode); |
| 614 | else if (file_type == FileType::M4A && MATCH(name, "SkipMP4")) |
| 615 | convert_bool(value, configs[static_cast<int>(file_type)].skip_mp4); |
| 616 | else if (MATCH(name, "PreserveMtimes")) |
| 617 | convert_bool(value, configs[static_cast<int>(file_type)].preserve_mtimes); |
| 618 | else if (MATCH(name, "DualMono")) |
| 619 | convert_bool(value, configs[static_cast<int>(file_type)].dual_mono); |
| 620 | return 0; |
| 621 | } |
| 622 | |
| 623 | inline bool join_path([[maybe_unused]] const std::filesystem::path &p) |
| 624 | { |
nothing calls this directly
no test coverage detected