mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-12-13 11:52:27 +00:00
Merged in jesseweinstein/mwiencek_userscripts/handle_json_lookup_format (pull request #6)
Handle the case where a single recording is returned
This commit is contained in:
commit
45dd35e4c1
1 changed files with 8 additions and 3 deletions
|
@ -721,8 +721,7 @@ function batch_recording_rels() {
|
|||
var recs = data.recordings;
|
||||
var cache = {};
|
||||
|
||||
for (var i = 0; i < recs.length; i++) {
|
||||
var node = recs[i];
|
||||
function extract_rec(node) {
|
||||
var row = cache[node.id];
|
||||
|
||||
if (row === undefined) {
|
||||
|
@ -743,7 +742,13 @@ function batch_recording_rels() {
|
|||
not_parsed -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (recs) {
|
||||
for (var i = 0; i < recs.length; i++) {
|
||||
extract_rec(recs[i]);
|
||||
}
|
||||
} else {
|
||||
extract_rec(data);
|
||||
}
|
||||
if (hide_performed_recs) {
|
||||
$recordings.filter(".performed").hide();
|
||||
restripeRows();
|
||||
|
|
Loading…
Reference in a new issue