mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-12-13 11:52:27 +00:00
discogs: since we want only one packaging, skip other matches using else if
This commit is contained in:
parent
8171491d14
commit
4790f70a0d
1 changed files with 3 additions and 3 deletions
|
@ -559,9 +559,9 @@ function parseDiscogsRelease(data) {
|
|||
if (discogsRelease.formats[i].text) {
|
||||
var freetext = discogsRelease.formats[i].text.toLowerCase().replace(/[\s-]/g, '');
|
||||
if (freetext.match(/cardboard|paper/)) release.packaging = "cardboard/paper sleeve";
|
||||
if (freetext.match(/digipak/)) release.packaging = "digipak";
|
||||
if (freetext.match(/keepcase/)) release.packaging = "keep case";
|
||||
if (freetext.match(/jewel/)) {
|
||||
else if (freetext.match(/digipak/)) release.packaging = "digipak";
|
||||
else if (freetext.match(/keepcase/)) release.packaging = "keep case";
|
||||
else if (freetext.match(/jewel/)) {
|
||||
release.packaging = freetext.match(/slim/) ? "slim jewel case" : "jewel case";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue