[import_track] Fixed issue with find

This commit is contained in:
ayakael 2018-05-18 18:37:51 -07:00
parent 74ec738b95
commit 1cc832d55e
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -18,11 +18,11 @@
import_track() {
local GIT_DIR="${1}"
local TRACK="${2}"
local DIR_NAME="$(dirname \"${TRACK}\")"
local DIR_NAME="$(dirname "${TRACK}")"
local SOURCE="FLAC"
# Cover image finder
local coverList=($(find "${DIR_NAME}" -maxdepth 1 \( -name '*.jpg' -o -name '*.png' \) -printf '%p\t'))
local coverList=($(find "${DIR_NAME}"/ -maxdepth 1 \( -name '*.jpg' -o -name '*.png' \) -printf '%p\t'))
# Metadata parsing
local ARTIST=$(cut -d= -f2 <<< $(print_meta_flac ${TRACK} ARTIST))