Fixes the « _.pluck is not a function » issue as underscore.js has changed or something.

This commit is contained in:
jesus2099 2018-02-07 16:24:12 +01:00
parent 316d2a5416
commit 6b237ee52b

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name MusicBrainz: Set recording comments for a release
// @description Batch set recording comments from a Release page.
// @version 2016.5.30
// @version 2018.2.17
// @author Michael Wiencek
// @license X11
// @namespace 790382e7-8714-47a7-bfbd-528d0caa2333
@ -81,7 +81,7 @@ function setRecordingComments() {
var release = location.pathname.match(MBID_REGEX)[0];
$.get("/ws/2/release/" + release + "?inc=recordings&fmt=json", function (data) {
var comments = _.pluck(_.pluck(_.flatten(_.pluck(data.media, "tracks")), "recording"), "disambiguation");
var comments = _.map(_.map(_.flatten(_.map(data.media, "tracks")), "recording"), "disambiguation");
for (var i = 0, len = comments.length; i < len; i++) {
var comment = comments[i];