mirror of
https://github.com/Lidarr/Lidarr.git
synced 2026-03-02 22:56:57 -05:00
Handle Single File Album (with .cue file) #355
Labels
No labels
Area: API
Area: Database
Area: Db-migration
Area: Download Clients
Area: Extras
Area: Import Lists
Area: Indexer
Area: Metadata API
Area: Notifications
Area: Organizer
Area: Parser
Area: Scanning
Area: Tooling
Area: UI
Area: Unit Tests
Area: Update API
On Hold: MetadataAPI Blocking
Priority: High
Priority: Low
Priority: Medium
Status: Accepted
Status: Cannot Reproduce
Status: Confirmed
Status: Don't Merge
Status: Help Wanted
Status: In Progress
Status: Info Needed
Status: Investigating
Status: Logs Needed
Status: Maybe One Day
Status: Needs Triage
Status: On Hold
Status: Ready for Review
Status: Unlikely
Status: Waiting for OP
Status: Won't Fix
Type: Bug
Type: Documentation
Type: Duplicate
Type: Enhancement
Type: Enhancement
Type: External Bug
Type: Feature Request
Type: Regression
Type: Support
Type: Support.
conflict
conflict
no-conflict
not-pulled
radarr-pull
readarr-pull
sonarr upstream
sonarr-pull
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Lidarr#355
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ChaosBlades on GitHub (Oct 15, 2018).
Describe the bug
If Lidarr downloads an album for example that is called "FLAC is better than MP3" (has a .flac file and .cue file) and for example track 3 in that album is named "FLAC is better than MP3" then the whole album will be processed as only Track 3 of that album. Deleting the .cue in the process.
Expected behavior
Lidarr having the ability to detected single file albums and wait for user intervention. Or better yet split albums into multiple tracks via cue file.
System info:
Additional context
Just started a search for bunch wanted albums and a LOT of them are running into this issue. A significant amount of lossless audio that you can download with Lidarr is going to be in a single .flac/.ape with a .cue file format. Lidarr needs to handle this by splitting the album into individual tracks sooner rather than later.
AB#482
@ChaosBlades commented on GitHub (Oct 15, 2018):
Correction, just had this happen to an album that didn't have an album name that matched a track. I think having Lidarr look for cue files and stopping there would be the best short-term solution to this problem.
@just-Addict commented on GitHub (Apr 13, 2019):
Instead of having Lidarr actually split the single file into separate tracks, I'd rather have it be able to retrieve the info from a cue file (if present). I've got a lot of archived material that I'd like to keep in single album files.
So my suggestion would be to have an option in the settings to make Lidarr switch to parsing a cue file if found, instead of any present tracks/singe file album.
e.g.
Use Cue File to parse tracks (if present)At the moment I've got a folder I can't even begin adding to Lidarr because all it contains is archived single file albums which it simply won't recognize.
@GaroRobe commented on GitHub (Jul 17, 2019):
FLAC/APE+CUE albums are good (as gapeless experience?) and all, but quite impractical, because:
2.1 Inserts both CUE as tracks and FLAC - which makes "just playing" or shuffling work not as expected
2.2 Doesn't support CUEs at all - and that's a huge issue with Plex. I wish it did, but nope. Have to split by hand and that's bad.
@GaroRobe commented on GitHub (Sep 3, 2019):
Okay, a tiny update. I literally an-hoc-fixed this by manually calling "shnsplit -f *.cue -t %n -o flac *.flac" (or shnsplit -f *.cue -t %n -o flac *.ape) for single-file albums. Tedious, but works. Requires only audio/shntool. Probably could be integrated into manual import UI with relatively small effort.
@YodaSpow commented on GitHub (Sep 27, 2019):
Can this script for
shnsplitor something similar be added to avoid the manual command line as part of a post-process, to avoid single FLAC files with cue being parked in Wanted?Automatically split single file albums via .CUE file:
https://feathub.com/lidarr/Lidarr/+50
@ChaosBlades commented on GitHub (Sep 27, 2019):
Not sure exactly the script https://github.com/rembo10/headphones uses but they do this. When it finds a .cue file during post processing it runs a shnsplit script then processes the files it outputs.
@vKnmnn commented on GitHub (Oct 1, 2019):
There's this script (Post # 10) an arch-user wrote to split single-file-albums, which could probably be reused for this purpose.
could a dev maybe point into a direction where one could start looking at to implement this?
@GaroRobe commented on GitHub (Oct 1, 2019):
A note: it doesn't always work. I don't get why actually, but sometimes it fails. Still succeeds in like 9 out of 10 cases for me, which is reasonably good for me.
@mabushey commented on GitHub (Oct 7, 2019):
I find single file FLAC+CUE to be quite practical. My approach is to use CueTools to merge multiple track albums into single file FLAC's. A lot of utilities like Beets or as you say Plex doesn't work. That's OK with me. Plenty of players work fine.
@GaroRobe commented on GitHub (Oct 9, 2019):
Well, since I specifically use (whatever)arrs for managing home media server, not having a proper way to stream media looks like missing the whole point of installing them in the first place. Managing one personal playlist is not that difficult even manually.
@cjmanca commented on GitHub (Jun 14, 2020):
Could we maybe get an option to split them into separate files automatically though for those of us who would like them separated? A good portion of the things that are being grabbed are in this flac/cue single file format, and I need to split each manually and then manually import. At that point, lidarr isn't really doing it's job anymore.
@hughesjs commented on GitHub (Jun 17, 2020):
Is there any reason why we can't just run
cuebreakpoints *.cue | shnsplit -o flac *.flac; cuetag *.cue split-*.flacevery time we get a single-file flac download with a cue? That should split the track and tag them up so lidarr knows whats what to import it.@ta264 commented on GitHub (Jun 17, 2020):
PRs welcome :)
@vKnmnn commented on GitHub (Jun 17, 2020):
What's the point of having a ranked list of feature requests when you can just deflect any issue by saying PR welcome?
I get it, nobody is paying you and you guys are developing this in your own free time.
@fapnip commented on GitHub (Feb 1, 2021):
Any way we could get "Priority: low" pulled from this?
A good number of downloaded FLAC albums are needing this.
@tyestor commented on GitHub (Nov 8, 2021):
actually they are being paid: https://opencollective.com/lidarr
@RobinDadswell commented on GitHub (Nov 8, 2021):
None of those donations come to any of the developers and is spent on the infrastructure that supports things like the metadata server and the update server etc..
@ChaosBlades commented on GitHub (Nov 28, 2021):
I just opened the flood gates to allow Lidarr to upgrade albums to FLAC... pulling over 300 of these single file albums. Looks like I'll be busy the next several hours.
We could use Flacon to split these. It supports WAV, FLAC, APE, WavPack, True Audio (TTA)
https://github.com/flacon/flacon/wiki/Command-line-usage
@GordonFreemanK commented on GitHub (Dec 22, 2021):
I would like to chip in if I may. In the world of trackers, the flac + cue format is pretty much the first choice, so splitting the album makes you have to maintain two copies (one for seeding one for the library).
To mitigate the issue with Plex and other incompatible software, you could use TrackFS. This project uses FUSE to create a virtual filesystem identical to your music library, but with all full files divided into tracks... This is a virtual (read-only) filesystem, so it doesn't take space or modify the files, instead it takes CPU at the moment you are reading those files. Obviously not meant for mass copy, but should work for streaming audio, the idea being that you use this read-only virtual FS as the library for Plex.
All this is missing is the capacity for Lidarr to handle this. Weirdly though what this thread seems to omit is that Lidarr does handle them pretty well at the moment: when importing your full album you can multi-select tracks (so you'd select all the tracks for this single file). The only issue for me is that when renaming the file, Lidarr actually includes every single track number and name. I think the only thing missing is a way to tell Lidarr that for renaming multi-track files, it should omit individual track names and fall back onto the album name. Does this make sense?
@GaroRobe commented on GitHub (Dec 22, 2021):
Um... No, it doesn't?
It's not a portable solution. And even on Linux is just a way to shift a problem from "file packing issue" to "administration issue". And second one is much, MUCH more difficult either to set up and to maintain. If I'd wanted to be "super-Linux-way" I'd just cron something to split media. I actually did that manually until got fed up with all that labor - it's easier to search split albums manually and that's what I do. Even though it kinda defeats all the purpose
Maybe my expectations are just beyond what's considered "normal", but I consider Lidarr "a product" - and if there is a very frequent case in product's scope, just saying "it's a non-issue" IMO is a bit wrong.
@GordonFreemanK commented on GitHub (Dec 22, 2021):
I don't know if you meant me but I really didn't say yours is a non-issue. To be fair, we're downloading files that are incompatible with our media player and asking Lidarr devs to fix it for us... The most sensible solution would definitely be to either restrict to files that are compatible with the player (which you're doing) or get our media player of choice to support them.
Splitting a file isn't trivial, it requires re-encoding (except for mp3s if you split with mp3split) which means that in order to distribute a fully fledge splitting feature Lidarr would have to embed the tools to split and transcode , for all supported audio formats and platorms, while minding distribution licenses (e.g. APE isn't open source so it's probably impossible to distribute).
Personnally I think your workflow for splitting would be best served by a generic feature to trigger custom scripts on import in Lidarr, and my workflow (forgetting about FUSE) would be best served by Lidarr having a different naming scheme for single file albums and some form of support for cue files to read track lengths. They aren't incompatible workflows, just different ones.
@cjmanca commented on GitHub (Jan 27, 2022):
I think most people would be fine with having to install transcoding tools themselves in order for the feature to work. No need to bundle them in lidarr. If you don't have the transcoding tools installed, then lidarr can just do nothing (which is what it already does anyway).
@fapnip commented on GitHub (Jan 27, 2022):
I assume most of us would have no problem pointing Lidarr to where FFMPEG is installed -- and FFMPEG probably will handle most of what's needed for this feature -- which is, if we're being honest, just FLAC.
@hughesjs commented on GitHub (Feb 3, 2022):
You literally just need
shntool... It's not exactly a big dependency considering we have mono as one... It's also GPL-2.0 so we could easily redistribute it if you didn't want to just have it as an external dependency@bakerboy448 commented on GitHub (Feb 3, 2022):
Mono is no longer supported with v1
I'm sure if it was that easy is would have been done so already.
If you believe it's that easy - well PRs welcome
@hughesjs commented on GitHub (Feb 3, 2022):
Is the project .net core now then? Admittedly, I've not looked at the source for a while...
Unfortunately, I barely have enough time for my job and PhD research so finding time to contribute to new projects is difficult... But if nobody gets round to it before me I'll take a look... Really shouldn't be difficult
@hughesjs commented on GitHub (Feb 3, 2022):
Oooh .NET 6... That's a nice surprise
@reijerh commented on GitHub (Mar 10, 2023):
Just gonna leave this oneliner here, it looks for all folders in a give path that contain only 1 file with the given file extension (recursively), and then calls
unflacon it with a given output path in which all split files will be placed (in a subtree).You can pass a date since when you want to search.
find /home/XXX/Downloads/ -newermt 2023-03-03 -name '*.flac' -printf '%h\n' | sort | uniq -c | while read -r n d ; do [ $n -lt 2 ] && go/bin/unflac -o ~/flacs "$d" 2>&1 ; doneYou can run this occasionally by hand or automatically. Something like this would be decent for Lidarr imo, or just the option to execute a script post-download/pre-import.
(
shnsplitis currently kind of broken on Debian, it can't handle certain high bitrate files, there's a patch waiting for this but the maintainer seems to have ignored it for years)@hughesjs commented on GitHub (Mar 10, 2023):
The QR for my PhD is due soon and the pressure will be off for a bit after that, so I might finally have some time to look at this
@zhangdoa commented on GitHub (Oct 12, 2023):
Hello, is there any progresses here? I have a working fork for single file album support for my own usage, and if it's doable, I would consider sending a PR for it after getting more required test code in.
@bakerboy448 commented on GitHub (Oct 12, 2023):
when there is an update to share there will be a PR or commit referenced / linked
The main development team is split across 5+ apps: Lidarr, Prowlarr, Radarr, Readarr, Whisparr, Sonarr upstream commits
There are only ~1-2 active developers who work on this, and of those 1-2 exactly zero work on this full-time. Exactly zero of any members involved (developers / support) get paid to do this. Everyone of them have full-time real jobs / kids and family / more than just this project.
As you can imagine between the projects (in addition to the various backends and other modules), the todo list is long and time short.
@zhangdoa commented on GitHub (Oct 13, 2023):
Thanks for the explanation, I understand the FOSS nature of these projects and if there is no one actively working on this issue, I could contribute my already working (not perfect of course) fix.
@chodeus commented on GitHub (Dec 23, 2024):
Hello, has any progress been made? Would love for this feature to be added.
@bakerboy448 commented on GitHub (Dec 23, 2024):
The primary development team is engaged in over five applications, including Lidarr, Prowlarr, Radarr, Readarr, Whisparr, and Sonarr. Currently, there is approximately one active developer contributing to these projects, with none of the contributors working on them full-time. Additionally, all members involved, whether in development or support roles, are volunteers and do not receive compensation for their contributions. Each team member balances their commitments alongside full-time jobs, family responsibilities, and other personal obligations.
As a result, the list of tasks to be completed across these projects, along with the various backends and modules, is extensive, while the available time for addressing these tasks is limited.
@chodeus commented on GitHub (Dec 23, 2024):
I understand how hard it can be to appease everyone. The arrs are fantastic, all the devs have done a great job. Just a bit of a shame there hasn’t been any traction on this in the 6 years.
I wish I had the skills to contribute.
Thankyou, Merrh Christmas.
@jochman commented on GitHub (May 16, 2025):
Maybe the right approach is to add a split ability to Unpackerr and not lidar
@JohnGalt1717 commented on GitHub (May 16, 2025):
https://github.com/Unpackerr/unpackerr/issues/141
Would be ideal there but it's stalled.
@carl0ski commented on GitHub (May 17, 2025):
adarr programs aren't for modifying content persei (transcoding remuxing, splitting),
they are for recognising the existence of an asset and to help find if not already found.
my advice would be (on the presumption prospective tracks are learned via file-system listing query)
$prospectiveTracks = getFilelist from folder where type like audio
$prospectivePlaylists = getFilelist from folder where type like CUE
@JohnGalt1717 commented on GitHub (Jun 30, 2025):
Anyone figure out a lidarr custom script that will do this?
@davidnewhall commented on GitHub (Feb 18, 2026):
Unpackerr does this now. It'll be in the next release. You can try it out now, using the directions here: https://unstable.golift.io/unpackerr
Would appreciate feedback on this feature. You can submit your feedback here (I'm watching this issue): https://github.com/Unpackerr/unpackerr/issues/141