load local data

This commit is contained in:
2025-08-04 16:59:51 +02:00
parent 7f94ab9646
commit bde3e5a48b
4 changed files with 116 additions and 0 deletions

View File

@@ -138,3 +138,24 @@ cache_delete_artist() {
# Get release groups
echo "NOT IMPLEMENTED" >/dev/stderr
}
# Check if main items are in cache
# argument $1: type
# argument $2: MusicBrainz ID
in_cache() {
case "$1" in
"$TYPE_ARTIST")
fn="$artist_filename"
;;
"$TYPE_RELEASEGROUP")
fn="$releasegroup_filename"
;;
"$TYPE_RELEASE")
fn="$release_filename"
;;
*)
return 1
;;
esac
[ "$(__get_json "$1" "$2" "$fn")" ] && return 0 || return 1
}