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

make Track Export replicate the directory structure// better sync of home/on-the-go library #14370

Open
ronso0 opened this issue Feb 18, 2025 · 9 comments

Comments

@ronso0
Copy link
Member

ronso0 commented Feb 18, 2025

Feature Description

Imagine you have a huge "home" library with track files on removable disk or a NAS, and due to limited local disk space you may only be able to pick parts of it for a gig (export playlist tracks, or ).
During the gig with the reduced track set, you want Mixxx to recognize the track files as the original ones from the full library.
Currently this is a tedious and error-prone process, maybe involving scripting.

Though, if the Track Export feature would replicate the entire track file path (not just the filename), this would be a no-brainer:
just export the track files, remove the NAS mount and put the export directory in the same place.
Might be tedious with multiple Mixxx music directories, but still a huge enhancement.

Looking at the Track Export worker, namely createCopylist QMap<filename, mixxx::FileInfo>, reproducing the dir structure would actually be much easier than producing the flat structure with potential filename conflicts.

Note this is not my use case, has been reported here https://mixxx.discourse.group/t/managing-a-library-on-slow-external-media/31304

@ronso0
Copy link
Member Author

ronso0 commented Feb 18, 2025

I might be wrong, but I imagine that is easy to implement. After all it would only one export option that requires a GUI part and a new export (call) path.

Maybe a good weekend / WoC / hackathon project?

@ronso0
Copy link
Member Author

ronso0 commented Feb 18, 2025

related: #12019 / #3572

@daschuer
Copy link
Member

Vinyl DJs use a Crates for this. A huge record collection at home and crates with the hot stuff for one night.
Maybe we can mentally stick to that model?

@ronso0
Copy link
Member Author

ronso0 commented Feb 18, 2025

Sure, that's what it's about: the preparation crate (in Mixxx) should work = tracks are where Mixxx expects them from the home library.

Just the file system changes (= all tracks except the prep tracks are absent).
A library rescan would mark huge parts missing, but back home all are 'back' (remove export directory with NAS, rescan).

@Eve00000
Copy link
Contributor

Eve00000 commented Feb 18, 2025

well @ronso0, you're describing how I handle my home-collection & dj-collection.
My home music collection is in iTunes NAS: F:\Music (with subdirs "#10 - VA" / "#20 - VA Classica" / ... / "#9999 - DJ")
All new music goes into iTunes where I have a "DJ" playlist.
With a script I can create a "copy" of all files in my "DJ" playlist to my "#9999 - DJ" folder, with respect for the original path.
(add or overwrite target) actually, I'm changing a part of the path.
So
"F:\Music#0025 - Classica\Menuhin, Yehudi •\Menuhin, Y - The Great EMI Recs\CD 06\606 Menuhin, Yehudi - Bach, JS_ Sonata per Violino #3 in Do-Maggiore, BWV.1005 - 1. Adagio.m4a"
gets copied to
"F:\Music#9999 - DJ#0025 - Classica\Menuhin, Yehudi •\Menuhin, Y - The Great EMI Recs\CD 06\606 Menuhin, Yehudi - Bach, JS_ Sonata per Violino #3 in Do-Maggiore, BWV.1005 - 1. Adagio.m4a"
I copy the whole "#9999 - DJ" dir to my ssd as "F:\Music#9999 - DJ" when I need an update.

no problems with paths ... only the tracks I need ..
I just need a bigger SSD once in a while :-)

to be complete, this is my vbs, added .txt ext for upload.
Eve - Copy File 4 DJ.vbs.txt

@Eve00000
Copy link
Contributor

If you're wondering why I still use iTunes... well I have a bout 200 scripts for fixing my library,
like creating tags from the folder name a structure, writing the filename properly structured, adding artwork, writing the composer as it should, writing classical works in the language of the composer with italian music tems and instrument names, no C D .. but do re , no major and minor but Maggiore e Minore..
I'm very complicated indeed but structured and consequent (on some things)

@SamWhited
Copy link

SamWhited commented Feb 18, 2025

My initial thoughts for another way this feature could work which may or may not make sense:

I broke these into bullets that I think represent distinct independent features that may or may not be implemented if any of them even make sense for what you were thinking.

  • Part 1: In the library option under "Music Directories" you could add a check box for "This directory is external media" or something along those lines. There would also be a "Default directory" radio option which would only be settable for the local directories. It would also keep a record that the two files are the same so they only show up in the library once.
  • Part 2: Somewhere in the file options when you right click is "Link these two files" (if two are selected and one is external and one is local), "Unlink files", "Sync locally" (which would automatically link the two files), "Sync back to remote", etc. similar for playlists and crates which could have a "Sync entire playlist locally" or similar.
  • Part 3: Possibly add "Local files" and "Remote files" views under the "Tracks" tree as siblings alongside "Missing Tracks" and "Hidden Tracks, this way users could still perform operations on specifically one file or the other.
  • Part 4: Add an "auto re-sync" option in the preferences. When the library re-syncs, if both files still exist any changes to the local files get synced to the external files (possibly unless the external file has changed, in which case you might prompt the user for what to do per file with an option for "do this for all changed files" in the dialog).

Mostly just thinking out loud, this probably represents a significant amount of work and may be more complicated than necessary. It may be that only some of these are worth doing, and others aren't, or that they're all not great.

EDIT: I also just realized from context and the title that there's apparently a way to export tracks that I don't see/haven't found, so maybe this doesn't make sense with how that already works.

@ronso0
Copy link
Member Author

ronso0 commented Feb 18, 2025

Part 1: In the library option under "Music Directories" you could add a check box for "This directory is external media" or something along those lines. There would also be a "Default directory" radio option which would only be settable for the local directories. It would also keep a record that the two files are the same so they only show up in the library once.

So allow to set an "alternative directory" for each music directory?
This could allow to check the original one first, and if it's absent, check the alternative.
The resulting path (orig / alt) could be passed to the scanner, essentially marking many "original" tracks missing and (temprarily) replacing many "original" with existing "alt" track refs.
(assuming the scanner is reliably detecting moved tracks)

Could work ™️

@SamWhited
Copy link

So allow to set an "alternative directory" for each music directory?

Oh that's interesting, that's not exactly what I was trying to describe, but might be more flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants