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:
Michael Wiencek 2014-12-29 00:54:01 -06:00
commit 45dd35e4c1

View file

@ -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();