Open xxxserxxx opened 2 years ago
I've been playing with share_dirs_external
and share_dirs
. share_dirs_external
is pretty close to what I am looking for, although it doesn't appear to work for me. I would expect these to be functionally identical:
file.conf.json
{
"download_directory": "$HOME/Downloads/dcnnt",
"shared_dirs": [
{
"deep": 3,
"name": "38 Special",
"path": "/mnt/audio/38_Special",
"glob": "*.mp3"
]
}
and
$HOME/playlist.txt
/mnt/audio/38_Special/05_-_Caught_Up_In_You.mp3
file.conf.json
{
"download_directory": "$HOME/Downloads/dcnnt",
"shared_dirs": [],
"shared_dirs_external": [
{
"deep": 3,
"glob": "*.mp3",
"path": "$HOME/playlist.txt"
}
]
}
The first works for me; the second does not.
Would you be able to update the documentation to explain the glob rules? I think it's basic bash glob, so *
, ?
, and []
work, but extglobs don't -- so you can't, for example, have a glob that says *.{mp3,ogg,opus}
to include some audio formats while excluding (e.g.) FLAC and WAV files. Or *.{jpg,jpeg}
to get jpegs while excluding PNGs and GIFs.
I think if I can figure out how to get shared_dirs_external
to work, then this ticket can be closed as unnecessary.
Users can do basic filtering with
glob
, and filter shared directories with shared_dirs. The ask is to add an external and simplified filter file.The use case is syncing part of a large music library. There are some hundreds of GB of music, and many duplicates (sources in FLAC, but converted to MP3 for the phone). There's a lot of music I don't want to sync: holiday music, etc. I do not want to have to re-arrange the entire library just for the dcnnt service, and I don't want to duplicate (copy) files into other directories for dccnt.
An ideal solution would be a file of paths, one per line; each line would be converted (internally) to a
shared_files
item. Example:with this config:
would be internally be converted to this:
The
shared_dirs
would be merged -- includes appended to whatever is in the config. The external file would be refreshed when it changes, or on sync, or whatever mechanism dccnt currently uses to track FS changes.This would add value in several ways:
Comments would be "nice to have"; Playlists allow comments, but they're also easily filtered out with
grep
so if the feature didn't include them it'd be OK.