discogarchive: fix new data from bandcamp
This commit is contained in:
parent
5d9fc46e4d
commit
dc521cfe66
|
@ -73,11 +73,11 @@ for type in album track; do
|
|||
curl -L -s -o - "$url" | pup 'script[type="application/ld+json"]' 'text{}' > "$json" || continue
|
||||
artist="$(jq -r '.byArtist.name' < "$json")"
|
||||
name="$(jq -r '.name' < "$json")"
|
||||
if [ "$(jq '.numTracks' < "$json")" = "0" ]; then
|
||||
if [ "$(jq '.numTracks' < "$json")" = "0.0" ]; then
|
||||
look_closer="<a href=\"$url\" rel=\"nofollow\">$artist - $name</a><br>$NL$look_closer"
|
||||
errecho "LOOK CLOSER: $url"
|
||||
tmplog="$tmplog$url LOOK_CLOSER$NL"
|
||||
elif [ "$(jq 'if (.inAlbum) then .inAlbum.albumRelease[0].offers.price else .albumRelease[0].offers.price end' < "$json")" = "0" ]; then
|
||||
elif [ "$(jq 'if (.inAlbum) then .inAlbum.albumRelease[0].offers.price else .albumRelease[0].offers.price end' < "$json")" = "0.0" ]; then
|
||||
eval 'contained_'"$type"'s="<a href=\"$url\" rel=\"nofollow\">$artist - $name</a><br>${NL}${contained_'"$type"'s}"'
|
||||
errecho "CONTAINED $type: $artist - $name"
|
||||
tmplog="$tmplog$url CONTAINED$NL"
|
||||
|
|
Loading…
Reference in New Issue