Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] - LIDARR - Add harmonize script to lidarr #218

Open
Intrinsically-Sublime opened this issue Mar 25, 2024 · 4 comments
Open

[FEATURE] - LIDARR - Add harmonize script to lidarr #218

Intrinsically-Sublime opened this issue Mar 25, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Intrinsically-Sublime
Copy link

Harmonize allows you to keep a transcoded copy of your entire music collection for use on devices with low storage capacity. While at the same time keeping the originals intact.

The original version of Harmonize by nvllsvm was made to convert FLAC to mp3 and then they added opus as an output. It also copies all other files as-is to make a complete copy of the collection with transcoded FLAC files.

I have added a bunch of functionality to Harmonize in my Branch

Add hardlink option (instead of copying the extra files)
Add symbolic link option (instead of copying the extra files)
Add m4a (mp4) as input source for transcoding
Add mp3 as input source for transcoding (from nvllsvm's branch)
Make transcoding flac optional
Make transcoding m4a optional
Make transcoding mp3 optional
Make sanitizing optional (allows syncing multiple sources to one target)
Make variables available as Docker Environment Variables
Add docker compose example with all variables

It would be really nice to add this to Lidarr to run automatically whenever there was a new file added.

I would add it myself but I am not sure where to start. You already have most of the requirements installed with the current scripts from what I can see and understand (which is very little). I am not a programmer and have to figure everything out as I go.

@Intrinsically-Sublime Intrinsically-Sublime added the enhancement New feature or request label Mar 25, 2024
@hockeygoalie35
Copy link
Contributor

hockeygoalie35 commented Mar 26, 2024

I'm not holding my breath, but I could take a look at this unless @RandomNinjaAtk objects.

Add hardlink option (instead of copying the extra files)
Add symbolic link option (instead of copying the extra files)

How does this work, unless I'm understanding it wrong. How can you hard/sym link a source file to the transcoded output? Or is this not relevant for the use you're describing?

@Intrinsically-Sublime
Copy link
Author

Intrinsically-Sublime commented Mar 26, 2024

@hockeygoalie35 It is only the extra files that are hardlinked / symbolic linked. So the nfo, jpg, png, lrc, etc. They may not be big files, but with a large collection we are talking many GB of extra files that we do not really need duplicates of.

edit: It will also link the non-transcoded audio files if you choose to not transcode certain types which can save a lot more space.

@RandomNinjaAtk
Copy link
Owner

You could just run 2 containers and have the libraries sync and then just have one target one format and the other target the other format...

@Intrinsically-Sublime
Copy link
Author

@RandomNinjaAtk I am not really sure I know what you mean.

Do you mean run two instances of Lidarr, download everything twice, use twice the bandwidth and twice the API calls to databases called by Lidarr and Beets. Then have one of the Lidarrs transcode the files to another format via the current scripts? I guess that would work to have two libraries of different formats. But you would have duplicates of all the extra files plus the albums that are only available in the lower quality formats would be duplicated taking up even more space.

But with my script it lets Lidarr and the current scripts do the downloading and tagging that involve the bandwidth and API calls just once. Then the script transcodes the files if needed and hardlinks the additional files without using more bandwidth or API calls as well as saving space with the hardlinked files.

I currently have the script run every 6 hours via cron which works okay as long as I do not need the transcoded files immediately.

Most of the music we listen to is obscure, hard to find and we are lucky to find a single format of a lot of it, nevermind multiple formats where we get to choose. A large portion of our collection are DJ sets and similar tracks that are never officially released anywhere and I have to curate manually outside of Lidarr so downloading multiple times in different formats is not as easy.

TLDR: The script maintains the two libraries syncronized but using the minimal drive space required and the minimal bandwidth and API calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants