MUSICDIR env not required anymore
This commit is contained in:
@@ -101,14 +101,16 @@ LOCALDATA_RELEASES="$LOCALDATADIR/releases"
|
||||
LOCALDATA_ARTISTS_VIEW="$LOCALDATADIR/artists_view"
|
||||
LOCALDATA_RELEASEGROUPS_VIEW="$LOCALDATADIR/releasegroups_view"
|
||||
LOCALDATA_RELEASES_VIEW="$LOCALDATADIR/releases_view"
|
||||
DECORATION_FILENAME=${DECORATION_FILENAME:-"mbid.json"}
|
||||
|
||||
# Load local music
|
||||
# argument $1: path to decorated music files
|
||||
load_local() {
|
||||
[ -d "$LOCALDATADIR" ] || mkdir -p "$LOCALDATADIR"
|
||||
tmpreleases=$(mktemp)
|
||||
[ -f "$tmpreleases" ] || exit 1
|
||||
info "Locating and parsing decoration files ($DECORATION_FILENAME)"
|
||||
find "$MUSICDIR" -type f -name "$DECORATION_FILENAME" -print0 |
|
||||
find "$1" -type f -name "$DECORATION_FILENAME" -print0 |
|
||||
xargs -0 -P 4 $JQ -r '.releaseid+"\t"+input_filename' |
|
||||
tee "$LOCALDATA_RELEASES" |
|
||||
cut -d "$(printf '\t')" -f 1 >"$tmpreleases"
|
||||
|
Reference in New Issue
Block a user