2020-11-02 11:13:55 -05:00
2020-10-31 11:52:25 -05:00
2020-11-01 15:35:25 -06:00
2020-10-31 11:52:25 -05:00
2020-02-02 15:55:44 -05:00
2020-02-02 15:55:44 -05:00
2020-02-02 15:55:44 -05:00
2020-10-31 11:51:24 -05:00
2019-05-30 20:35:20 +01:00
2020-10-31 11:52:25 -05:00

A Docker Mod for the LinuxServer.io Lidarr Docker container that adds a script to automatically convert downloaded FLAC files to MP3s using ffmpeg. Default quality is 320Kbps.

NOTE: This mod support Linux OSes only.

Container info: Docker Image Size (latest by date))

Installation

  1. Pull the linuxserver/lidarr docker image from Docker Hub:
    docker pull linuxserver/lidarr:latest

  2. Configure the Docker container with all the port, volume, and environment settings from the original container documentation here:
    linuxserver/lidarr

    1. Add the DOCKER_MODS environment variable to the docker create command, as follows:
      -e DOCKER_MODS=linuxserver/mods:lidarr-flac2mp3

      Example Synology Configuration
      flac2mp3

    2. Start the container.

  3. After all of the above configuration is complete, to use ffmpeg, configure a custom script from the Settings->Connect screen and type the following in the Path field:
    /usr/local/bin/flac2mp3.sh

Usage

New file(s) with an MP3 extension will be placed in the same directory as the original FLAC file(s). Existing MP3 files with the same track name will be overwritten.

If you've configured the Lidarr Recycle Bin path correctly, the original video will be moved there.
warning24 NOTE: If you have not configured the Recycle Bin, the original FLAC audio file(s) will be deleted and permanently lost.

Syntax

Note: The Arguments field for Custom Scripts was removed in Lidarr release v0.7.0.1347 due to security concerns. To support options with this version and later, a wrapper script can be manually created that will call flac2mp3.sh with the required arguments.

The script accepts two options which may be placed in the Arguments field:

[-d] [-b <bitrate>]

The -b bitrate option, if specified, sets the output quality in bits per second. If no -b option is specified, the script will default to 320Kbps.

The -d option enables debug logging.

Examples

-b 320k        # Output 320 kilobits per second MP3 (same as default behavior)
-d -b 160k     # Enable debugging, and output 160 kilobits per second MP3

Included Wrapper Script

For your convenience, a wrapper script to enable debugging is included in the /usr/local/bin/ directory.
Use this script in place of the flac2mp3.sh mentioned in the Installation section above.

flac2mp3-debug.sh        # Enable debugging

Example Wrapper Script

To configure the last entry from the Examples section above, create and save a file called wrapper.sh to /usr/local/bin containing the following text:

#!/bin/bash

. /usr/local/bin/flac2mp3.sh -d -b 160k

Then put /usr/local/bin/wrapper.sh in the Path field in place of /usr/local/bin/flac2mp3.sh mentioned in the Installation section above.

Triggers

The only events/notification triggers that have been tested are On Release Import and On Upgrade

lidarr-flac2mp3

Logs

A log file is created for the script activity called:

/config/logs/flac2mp3.txt

This log can be downloaded from the Lidarr GUI under System->Log Files

Log rotation is performed, with 5 log files of 1MB each kept, matching Lidarr's log retention.

warning24 NOTE: If debug logging is enabled, the log file can grow very large very quickly. Do not leave debug logging enabled permanently.


Credits

This would not be possible without the following:

Lidarr
LinuxServer.io Lidarr container
LinuxServer.io Docker Mods project
ffmpeg

Description
No description provided
Readme 6.6 MiB
Languages
Text 100%