-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtagcli.toml
More file actions
119 lines (102 loc) · 3.57 KB
/
htagcli.toml
File metadata and controls
119 lines (102 loc) · 3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Default configuration
# Settings under [filename] are used by:
# - the `fix-path` command
# - the `check` command’s `filematches` check (see also [checks.check_files])
[filename]
# Pattern used to generate or validate file paths
# Available placeholders:
# - {artist}: artist tag
# - {albumartist}: album artist tag
# - {album}: album tag
# - {title}: title tag
# - {genre}: genre tag
# - {track}: track number (see `pad_track_numbers`)
# - {year}: year tag
# - {disc}: disc number (see `pad_disc_numbers`)
# Additional syntax:
# - {albumartist|artist}: use albumartist tag; if missing, fall back to artist
# - {prefix-?disc?-suffix}: if the disc tag is present, include it with the
# given prefix and suffix; otherwise, omit everything between the braces
filename_matches = "{albumartist|artist}/{album}/{Disc-?disc?}/{track}-{title}"
# Characters to sanitize in file paths and how to handle them
# Each entry defines:
# - `char`: the character to match
# - `action`: one of:
# - "remove": delete the character
# - "replace:<new_char>": replace it with `<new_char>`
unwanted = [
{ char = " ", action = "replace:_" },
{ char = "/", action = "remove" },
{ char = "?", action = "remove" },
{ char = ":", action = "remove" },
{ char = "\"", action = "remove" },
{ char = "*", action = "remove" },
{ char = ">", action = "remove" },
]
# How to pad track numbers in the {track} placeholder
# Accepted values:
# - "ignore": ignore padding when checking; no padding when fixing
# - "1": no padding
# - "2": pad to 2 digits (01, 02, ..., 10, 11, ...)
# - "3", "4", ...: pad to N digits
pad_track_numbers = "2"
# Same for disc numbers
pad_disc_numbers = "ignore"
# htagcli will truncate any placeholder value exceeding this length. Useful for
# tracks with very long titles.
placeholder_max_length = 30
# Settings for the `fix-path` command
[fix_paths]
# Directory where music files are moved when fixing their paths
base_dir = "/absolute/path/to/your/Music"
# Configuration for validation checks
[checks]
# Ensure required tags are present
[checks.track_tags]
enable = true
tags = ["title", "artist", "album", "genre", "year", "track"]
# Ensure the genre tag matches one of the allowed values
[checks.track_genre]
enable = true
among = [
"Pop/Rock",
"Jazz",
"Country",
"Blues",
"Latin",
"International",
"Classical",
"Hip-Hop",
]
# Verify that file paths match the expected naming pattern and formatting
# options
[checks.track_filename]
enable = true
# Verify that each album directory contains a cover image
[checks.album_cover]
enable = true
filenames = ["cover.jpg", "cover.png", "cover.gif"]
# optional size constraints in pixels, not taken into account if left
# unspecified.
# Warning: this makes the check significantly slower
min_size = { width = 300, height = 300 }
max_size = { width = 1000, height = 1000 }
# Verify that all tracks from the same album reside in a single directory
# Note: htagcli groups files by album while scanning input paths recursively.
[checks.album_same_dir]
enable = true
# Verify that album-level tags are consistent across all tracks of an album
[checks.album_tags]
enable = true
tags = ["albumartist", "album", "year", "genre"]
# Verify that track numbers in each album are sequential starting from 1
[checks.album_tracks_sequential]
enable = true
# Verify that all tracks from an artist have the same genre
[checks.artist_same_genre]
enable = true
# In some cases, an artist may legitimately span multiple genres. One can list
# them here to have the check pass for those artists.
except = [
{ artist = "Some Artist", genres = ["Pop/Rock", "Original Soundtracks"] }
]