mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-12-13 03:42:27 +00:00
Fix a few "no-useless-concat" warnings
This commit is contained in:
parent
785b790887
commit
a7376b5336
3 changed files with 6 additions and 7 deletions
|
@ -533,7 +533,7 @@ function batch_recording_rels() {
|
||||||
get_filtered_page(0);
|
get_filtered_page(0);
|
||||||
} else {
|
} else {
|
||||||
queue_recordings_request(
|
queue_recordings_request(
|
||||||
`/ws/2/recording?artist=${ARTIST_MBID}&inc=work-rels` + `&limit=100` + `&offset=${(CURRENT_PAGE - 1) * 100}&fmt=json`
|
`/ws/2/recording?artist=${ARTIST_MBID}&inc=work-rels&limit=100&offset=${(CURRENT_PAGE - 1) * 100}&fmt=json`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -600,10 +600,9 @@ function batch_recording_rels() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_filtered_page(page) {
|
function get_filtered_page(page) {
|
||||||
let url =
|
let url = `/ws/2/recording?query=${NAME_FILTER ? `${encodeURIComponent(NAME_FILTER)}%20AND%20` : ''}${
|
||||||
`/ws/2/recording?query=${NAME_FILTER ? `${encodeURIComponent(NAME_FILTER)}%20AND%20` : ''}${
|
|
||||||
ARTIST_FILTER ? `creditname:${encodeURIComponent(ARTIST_FILTER)}%20AND%20` : ''
|
ARTIST_FILTER ? `creditname:${encodeURIComponent(ARTIST_FILTER)}%20AND%20` : ''
|
||||||
} arid:${ARTIST_MBID}&limit=100` + `&offset=${page * 100}&fmt=json`;
|
} arid:${ARTIST_MBID}&limit=100&offset=${page * 100}&fmt=json`;
|
||||||
|
|
||||||
ws_requests.push_get(url, function(data) {
|
ws_requests.push_get(url, function(data) {
|
||||||
_.each(data.recordings, function(r) {
|
_.each(data.recordings, function(r) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ var labels = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var editNote = `Imported from ${document.URL}\n —\n` + `GM script: "${meta.name}" (${meta.version})\n\n`;
|
var editNote = `Imported from ${document.URL}\n —\nGM script: "${meta.name}" (${meta.version})\n\n`;
|
||||||
|
|
||||||
function _clean(s) {
|
function _clean(s) {
|
||||||
return s
|
return s
|
||||||
|
|
|
@ -190,7 +190,7 @@ function gazellePageHandler() {
|
||||||
// Common functions
|
// Common functions
|
||||||
|
|
||||||
function computeAttachURL(mb_toc_numbers, artistName, releaseName) {
|
function computeAttachURL(mb_toc_numbers, artistName, releaseName) {
|
||||||
let url = `${'http://musicbrainz.org/cdtoc/attach' + '?toc='}${mb_toc_numbers.join('%20')}&artist-name=${encodeURIComponent(
|
let url = `${'http://musicbrainz.org/cdtoc/attach?toc='}${mb_toc_numbers.join('%20')}&artist-name=${encodeURIComponent(
|
||||||
artistName
|
artistName
|
||||||
)}&release-name=${encodeURIComponent(releaseName)}`;
|
)}&release-name=${encodeURIComponent(releaseName)}`;
|
||||||
return url;
|
return url;
|
||||||
|
|
Loading…
Reference in a new issue