bugfix: did not wait for search

This commit is contained in:
2025-07-23 22:15:11 +02:00
parent f3c58ca859
commit c2c85260bf
2 changed files with 2 additions and 1 deletions

View File

@@ -54,6 +54,7 @@ if [ "${1:-}" = "--internal-search" ]; then
# Save current pid
echo "$$" >"$PIDFILE"
touch "$LOCKFILE"
sleep 1
__api_mb_search_artists "$2" |
$JQ -r '.artists[] | [
.id,

View File

@@ -40,7 +40,7 @@ mb_artist_wikidata() {
map(select(.type=="wikidata")) |
.[0].url.resource' |
awk -F "/" '{print $NF}')
[ ! "$wikidataid" ] || [ "$wikidataid" != "null" ] || return
[ ! "$wikidataid" ] && return || [ "$wikidataid" = "null" ] && return
__api_wikidata_get_sitelinks "$wikidataid" | cache_put_artist_wikidata "$1"
cache_get_artist_wikidata "$1"
fi