You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Pull the [linuxserver/lidarr](https://hub.docker.com/r/linuxserver/lidarr"LinuxServer.io's Lidarr container") docker image from GitHub Container Registry or Docker Hub:
17
-
`docker pull lscr.io/linuxserver/lidarr:latest`
18
-
19
-
2. Configure the Docker container with all the port, volume, and environment settings from the *original container documentation* here:
This will use the defaults to create a 320Kbps MP3 file.
76
86
77
-
*For any other setting, you **must** use one of the supported methods to pass arguments to the script. See the [Command-Line Syntax](./README.md#command-line-syntax) section below.*
87
+
>![notes] *For any other setting, you **must** use one of the supported methods to pass arguments to the script. See the [Command-Line Syntax](./README.md#command-line-syntax) section below.*
78
88
79
89
# Usage
80
90
New file(s) will be placed in the same directory as the original FLAC file(s) (unless redirected with the `--output` option below) with permissions preserved. Existing files with the same track name will be overwritten. Owner is preserved if the script is executed as root.
81
91
82
92
By default, if you've configured Lidarr's **Recycle Bin** path correctly, the original audio file will be moved there.
83
-
![danger] **NOTE:** If you have *not* configured the Recycle Bin, the original FLAC audio file(s) will be deleted and permanently lost. This behavior may be modified with the `--keep-file` option.
93
+
>![warning] **WARNING:** If you have *not* configured the Recycle Bin, the original FLAC audio file(s) will be deleted and permanently lost. This behavior may be modified with the `--keep-file` option.
84
94
85
95
## Command-Line Syntax
86
-
>**Note:** The *Arguments* field for Custom Scripts was removed in Lidarr release [v0.7.0.1347](https://github.com/lidarr/Lidarr/commit/b9d240924f8965ebb2c5e307e36b810ae076101e "Lidarr commit notes") due to security concerns.
96
+
>![notes] The *Arguments* field for Custom Scripts was removed in Lidarr release [v0.7.0.1347](https://github.com/lidarr/Lidarr/commit/b9d240924f8965ebb2c5e307e36b810ae076101e "Lidarr commit notes") due to security concerns.
87
97
88
98
### Options and Arguments
89
99
The script may be called with optional command-line arguments.
<summary>Table of Command-Line Arguments</summary>
95
106
96
107
Option|Argument|Description
97
108
---|---|---
@@ -109,6 +120,8 @@ Option|Argument|Description
109
120
--help| |Display help and exit.
110
121
--version| |Display version and exit.
111
122
123
+
</details>
124
+
112
125
If neither `-b`, `-v`, `-a`, or `-e` options are specified, the script will default to a constant 320Kbps MP3.
113
126
114
127
#### Technical notes on advanced options
@@ -129,7 +142,7 @@ By default, the script only matches and interacts with FLAC files (specifically,
129
142
130
143
Files are passed to the script with the full Linux path intact. (Ex: `/path/to/audio/a-ha/Hunting High and Low/01 Take on Me.mp3`). Craft your regular expression with this in mind.
131
144
132
-
![warning] **NOTE:** Escaping special regular expression characters (like a dot `.`) requires a double backslash or a character class. A character class (i.e. `[.]`) is recommended because backslashes can be stripped by the bash shell and getting this right can be confusing.
145
+
>![notes] Escaping special regular expression characters (like a dot `.`) requires a double backslash or a character class. A character class (i.e. `[.]`) is recommended because backslashes can be stripped by the bash shell and getting this right can be confusing.
133
146
134
147
For example, to convert all audio files to AAC audio files, use the following options:
135
148
@@ -141,6 +154,9 @@ Regular expression syntax is beyond the scope of this document. See this [tutor
141
154
142
155
## Examples
143
156
157
+
<details>
158
+
<summary>Command-line Examples</summary>
159
+
144
160
```shell
145
161
-b 320k # Output 320 kbit/s MP3 (non-VBR; same as default behavior)
@@ -159,13 +175,18 @@ Regular expression syntax is beyond the scope of this document. See this [tutor
159
175
# Place the converted file(s) in the specified directory and do not delete the original audio file(s)
160
176
```
161
177
178
+
</details>
179
+
162
180
## Wrapper Scripts
163
181
To supply arguments to the script, you must either use one of the included wrapper scripts, create a custom wrapper script, or set the `FLAC2MP3_ARGS` [environment variable](./README.md#environment-variable).
164
182
165
183
### Included Wrapper Scripts
166
184
For your convenience, several wrapper scripts are included in the `/usr/local/bin/` directory.
167
185
You may use any of these scripts in place of the `flac2mp3.sh` mentioned in the [Installation](./README.md#installation) section above.
168
186
187
+
<details>
188
+
<summary>List of scripts</summary>
189
+
169
190
```shell
170
191
flac2mp3-debug.sh # Enable debugging, level 1
171
192
flac2mp3-debug-2.sh # Enable debugging, level 2
@@ -174,6 +195,8 @@ flac2opus.sh # Convert to Opus format using .opus extension, 192 kbi
174
195
flac2alac.sh # Convert to Apple Lossless using an .m4a extension
175
196
```
176
197
198
+
</details>
199
+
177
200
### Example Wrapper Script
178
201
To configure an entry from the [Examples](./README.md#examples) section above, create and save a file called `flac2mp3-custom.sh` to `/config` containing the following text:
Then put `/config/flac2mp3-custom.sh` in the **Path** field in place of `/usr/local/bin/flac2mp3.sh` mentioned in the [Installation](./README.md#installation) section above.
193
216
194
-
>**Note:** If you followed the Linuxserver.io recommendations when configuring your container, the `/config` directory will be mapped to an external storage location. It is therefore recommended to place custom scripts in the `/config` directory so they will survive container updates, but they may be placed anywhere that is accessible by Lidarr.
217
+
>![notes] If you followed the Linuxserver.io recommendations when configuring your container, the `/config` directory will be mapped to an external storage location. It is therefore recommended to place custom scripts in the `/config` directory so they will survive container updates, but they may be placed anywhere that is accessible by Lidarr.
195
218
196
219
## Environment Variable
197
220
The `flac2mp3.sh` script also allows the use of arguments provided by the `FLAC2MP3_ARGS` environment variable. This allows advanced use cases without having to provide a custom script.
>**NOTE:** The environment variable settings are *only* used when **no** command-line arguments are present. **Any** command-line argument will disable the use of the environment variable.
242
+
</details>
243
+
244
+
>![notes] The environment variable settings are *only* used when **no** command-line arguments are present. **Any** command-line argument will disable the use of the environment variable.
217
245
218
246
## Triggers
219
247
The only events/notification triggers that are supported are **On Release Import** and **On Upgrade**
@@ -239,18 +267,23 @@ find /music/ -type f -name "*.flac" | while read file; do /usr/local/bin/flac2mp
239
267
## Metadata Corrections
240
268
**This feature is not meant for general purpose use.** It is only documented here for completeness.
241
269
270
+
<details>
271
+
<summary>Metadata Tag Details</summary>
272
+
242
273
List of supported tags and metadata corrections that are applied:
243
274
244
-
|Tag|Original|Correction
245
-
|---|---|---
246
-
|title|Parenthesis for live\|remix, etc. "()"|Square brackets "\[]"
247
-
|disc|1|1/1
248
-
|genre|/Pop/|"Pop"
249
-
| |/Indie/|"Alternative & Indie"
250
-
| |/Industrial/|"Industrial Rock"
251
-
| |/Electronic/|"Electronica & Dance"
252
-
| |/Punk\|Alternative/|"Alternative & Punk"
253
-
| |/Rock/|"Rock"
275
+
Tag|Original|Correction
276
+
---|---|---
277
+
title|Parenthesis for live\|remix, etc. "()"|Square brackets "\[]"
278
+
disc|1|1/1
279
+
genre|/Pop/|"Pop"
280
+
|/Indie/|"Alternative & Indie"
281
+
|/Industrial/|"Industrial Rock"
282
+
|/Electronic/|"Electronica & Dance"
283
+
|/Punk\|Alternative/|"Alternative & Punk"
284
+
|/Rock/|"Rock"
285
+
286
+
</details>
254
287
255
288
## Logs
256
289
By default, a log file is created for the script activity called:
@@ -260,7 +293,8 @@ By default, a log file is created for the script activity called:
260
293
This log can be downloaded from Lidarr under *System* > *Log Files*. The log filename can be modified with the `--log` command-line option.
261
294
262
295
Log rotation is performed, with 5 log files of 1MB each kept, matching Lidarr's log retention.
263
-
>![danger] **NOTE:** If debug logging is enabled with a level above 1, the log file can grow very large very quickly and is much more likely to be rotated. *Do not leave high-level debug logging enabled permanently.*
296
+
297
+
>![warning] If debug logging is enabled with a level above 1, the log file can grow very large very quickly and is much more likely to be rotated. *Do not leave high-level debug logging enabled permanently.*
264
298
265
299
# Uninstall
266
300
To completely remove the mod:
@@ -281,4 +315,4 @@ This would not be possible without the following:
281
315
Icons made by [Freepik](https://www.freepik.com) from [Flaticon](https://www.flaticon.com/)
0 commit comments