Skip to content

Commit eade662

Browse files
committed
Updated README
Update graphic assets
1 parent 7e7340e commit eade662

File tree

5 files changed

+70
-36
lines changed

5 files changed

+70
-36
lines changed

.assets/danger.png

-947 Bytes
Binary file not shown.

.assets/notes.png

1.52 KB
Loading

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
.gitignore
44
.github
55
.gitattributes
6+
.vscode
67
.assets
7-
hooks
88
READMETEMPLATE.md
99
README.md
1010
SECURITY.md

.github/workflows/BuildImage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
echo "BASEIMAGE=${{ env.BASEIMAGE }}" >> $GITHUB_OUTPUT
2121
echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT
2222
# **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. ****
23-
MOD_VERSION="2.4.0"
23+
MOD_VERSION="2.4.2"
2424
echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT
2525
outputs:
2626
GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }}

README.md

Lines changed: 68 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,19 @@ A [Docker Mod](https://github.com/linuxserver/docker-mods) for the LinuxServer.i
33
Advanced options act as a light wrapper to ffmpeg, allowing conversion to any supported audio format, including AAC, AC3, Opus, and many others.
44
A [Batch Mode](./README.md#batch-mode) is also supported that allows usage outside of Lidarr.
55

6-
>**NOTE:** This mod supports Linux OSes only.
7-
8-
Production Container info: ![Docker Image Size](https://img.shields.io/docker/image-size/linuxserver/mods/lidarr-flac2mp3 "Container Size")
9-
[![linuxserver/docker-mods/mods/lidarr-flac2mp3](https://img.shields.io/badge/dynamic/json?logo=github&url=https%3A%2F%2Fthecaptain989.github.io%2Fghcr-pulls%2Flidarr-flac2mp3.json&query=%24.pulls&label=ghcr%20pulls&color=1572A4)](https://github.com/linuxserver/docker-mods/pkgs/container/mods)
6+
>![notes] This mod supports Linux OSes only.
7+
<!-- markdownlint-disable -->
8+
Production Container info: [![Docker Image Size](https://img.shields.io/docker/image-size/linuxserver/mods/lidarr-flac2mp3)](https://hub.docker.com/r/linuxserver/mods/tags?name=lidarr-flac2mp3 "Docker image size")
9+
[![linuxserver/docker-mods/mods/lidarr-flac2mp3](https://img.shields.io/badge/dynamic/json?logo=github&url=https%3A%2F%2Fthecaptain989.github.io%2Fghcr-pulls%2Flidarr-flac2mp3.json&query=%24.pulls&label=ghcr%20pulls&color=1572A4)](https://github.com/linuxserver/docker-mods/pkgs/container/mods "GitHub package pulls")
1010
Development Container info:
11-
![Docker Image Size](https://img.shields.io/docker/image-size/thecaptain989/lidarr-flac2mp3 "Container Size")
12-
![Docker Pulls](https://img.shields.io/docker/pulls/thecaptain989/lidarr-flac2mp3?logo=docker "Container Pulls")
13-
[![GitHub Super-Linter](https://github.com/TheCaptain989/lidarr-flac2mp3/actions/workflows/linter.yml/badge.svg)](https://github.com/TheCaptain989/lidarr-flac2mp3/actions/workflows/linter.yml "Linter Job")
11+
[![Docker Image Size](https://img.shields.io/docker/image-size/thecaptain989/lidarr-flac2mp3)](https://hub.docker.com/r/thecaptain989/lidarr-flac2mp3 "Docker image size")
12+
[![Docker Pulls](https://img.shields.io/docker/pulls/thecaptain989/lidarr-flac2mp3?logo=docker)](https://hub.docker.com/r/thecaptain989/lidarr-flac2mp3 "Docker container pulls")
13+
[![GitHub Super-Linter](https://github.com/TheCaptain989/lidarr-flac2mp3/actions/workflows/BuildImage.yml/badge.svg)](https://github.com/TheCaptain989/lidarr-flac2mp3/actions/workflows/BuildImage.yml "BuildImage Job")
14+
<!-- markdownlint-restore -->
1415

1516
# Installation
16-
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:
20-
**[linuxserver/lidarr](https://hub.docker.com/r/linuxserver/lidarr "Docker container")**
17+
1. Configure the Docker container with all the port, volume, and environment settings from the *original container documentation* here:
18+
**[linuxserver/lidarr](https://hub.docker.com/r/linuxserver/lidarr "Lidarr Docker container")**
2119
1. Add a **DOCKER_MODS** environment variable to your `compose.yml` file or `docker run` command, as follows:
2220
- Stable release: `DOCKER_MODS=linuxserver/mods:lidarr-flac2mp3`
2321
- Dev/test release: `DOCKER_MODS=thecaptain989/lidarr-flac2mp3:latest`
@@ -44,7 +42,8 @@ Development Container info:
4442
restart: unless-stopped
4543
```
4644
47-
*Example Docker Run Command*
45+
<details>
46+
<summary>Example Docker Run Command</summary>
4847
4948
```shell
5049
docker run -d \
@@ -61,37 +60,49 @@ Development Container info:
6160
lscr.io/linuxserver/lidarr
6261
```
6362

63+
</details>
64+
<details>
65+
<summary>Synology Screenshot</summary>
66+
6467
*Example Synology Configuration*
6568
![flac2mp3](.assets/lidarr-synology.png "Synology container settings")
6669

70+
</details>
71+
6772
2. Start the container.
6873

69-
3. Configure a custom script from Lidarr's *Settings* > *Connect* screen and type the following in the **Path** field:
74+
2. Configure a custom script from Lidarr's *Settings* > *Connect* screen and type the following in the **Path** field:
7075
`/usr/local/bin/flac2mp3.sh`
7176

72-
*Example*
77+
<details>
78+
<summary>Screenshot</summary>
79+
80+
*Example Custom Script*
7381
![lidarr-flac2mp3](.assets/lidarr-custom-script.png "Lidarr Custom Script dialog")
7482

83+
</details>
84+
7585
This will use the defaults to create a 320Kbps MP3 file.
7686

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.*
7888

7989
# Usage
8090
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.
8191

8292
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.
8494

8595
## 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.
8797

8898
### Options and Arguments
8999
The script may be called with optional command-line arguments.
90100

91101
The syntax for the command-line is:
92102
`flac2mp3 [{-b|--bitrate} <bitrate> | {-v|--quality} <quality> | {-a|--advanced} "<options>" {-e|--extension} <extension>] [{-f|--file} <audio_file>] [{-k|--keep-file}] [{-o|--output} <directory>] [{-r|--regex} '<regex>'] [{-t|--tags} <taglist>] [{-l|--log} <log_file>] [{-d|--debug} [<level>]]`
93103

94-
Where:
104+
<details>
105+
<summary>Table of Command-Line Arguments</summary>
95106

96107
Option|Argument|Description
97108
---|---|---
@@ -109,6 +120,8 @@ Option|Argument|Description
109120
--help| |Display help and exit.
110121
--version| |Display version and exit.
111122

123+
</details>
124+
112125
If neither `-b`, `-v`, `-a`, or `-e` options are specified, the script will default to a constant 320Kbps MP3.
113126

114127
#### Technical notes on advanced options
@@ -129,7 +142,7 @@ By default, the script only matches and interacts with FLAC files (specifically,
129142

130143
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.
131144

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.
133146

134147
For example, to convert all audio files to AAC audio files, use the following options:
135148

@@ -141,6 +154,9 @@ Regular expression syntax is beyond the scope of this document. See this [tutor
141154

142155
## Examples
143156

157+
<details>
158+
<summary>Command-line Examples</summary>
159+
144160
```shell
145161
-b 320k # Output 320 kbit/s MP3 (non-VBR; same as default behavior)
146162
-v 0 # Output variable bitrate MP3, VBR 220-260 kbit/s
@@ -159,13 +175,18 @@ Regular expression syntax is beyond the scope of this document. See this [tutor
159175
# Place the converted file(s) in the specified directory and do not delete the original audio file(s)
160176
```
161177

178+
</details>
179+
162180
## Wrapper Scripts
163181
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).
164182

165183
### Included Wrapper Scripts
166184
For your convenience, several wrapper scripts are included in the `/usr/local/bin/` directory.
167185
You may use any of these scripts in place of the `flac2mp3.sh` mentioned in the [Installation](./README.md#installation) section above.
168186

187+
<details>
188+
<summary>List of scripts</summary>
189+
169190
```shell
170191
flac2mp3-debug.sh # Enable debugging, level 1
171192
flac2mp3-debug-2.sh # Enable debugging, level 2
@@ -174,6 +195,8 @@ flac2opus.sh # Convert to Opus format using .opus extension, 192 kbi
174195
flac2alac.sh # Convert to Apple Lossless using an .m4a extension
175196
```
176197

198+
</details>
199+
177200
### Example Wrapper Script
178201
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:
179202

@@ -191,7 +214,7 @@ chmod +x /config/flac2mp3-custom.sh
191214

192215
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.
193216

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.
195218

196219
## Environment Variable
197220
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.
@@ -210,10 +233,15 @@ environment:
210233
- FLAC2MP3_ARGS=-a "-vn -c:a libopus -b:a 192k" -e .opus -r '[.]mp3$$'
211234
```
212235

236+
<details>
237+
<summary>Synology Screenshot</summary>
238+
213239
*Example Synology Configuration*
214240
![flac2mp3](.assets/lidarr-synology-2.png "Synology container settings")
215241

216-
>**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.
217245

218246
## Triggers
219247
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
239267
## Metadata Corrections
240268
**This feature is not meant for general purpose use.** It is only documented here for completeness.
241269

270+
<details>
271+
<summary>Metadata Tag Details</summary>
272+
242273
List of supported tags and metadata corrections that are applied:
243274

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+
&nbsp;|/Indie/|"Alternative & Indie"
281+
&nbsp;|/Industrial/|"Industrial Rock"
282+
&nbsp;|/Electronic/|"Electronica & Dance"
283+
&nbsp;|/Punk\|Alternative/|"Alternative & Punk"
284+
&nbsp;|/Rock/|"Rock"
285+
286+
</details>
254287

255288
## Logs
256289
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:
260293
This log can be downloaded from Lidarr under *System* > *Log Files*. The log filename can be modified with the `--log` command-line option.
261294

262295
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.*
264298

265299
# Uninstall
266300
To completely remove the mod:
@@ -281,4 +315,4 @@ This would not be possible without the following:
281315
Icons made by [Freepik](https://www.freepik.com) from [Flaticon](https://www.flaticon.com/)
282316

283317
[warning]: .assets/warning.png "Warning"
284-
[danger]: .assets/danger.png "Danger"
318+
[notes]: .assets/notes.png "Note"

0 commit comments

Comments
 (0)