mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-12-13 11:52:27 +00:00
discogs: minor simplification, use one replace() instead of 2
This commit is contained in:
parent
c183cc2c67
commit
8171491d14
1 changed files with 1 additions and 1 deletions
|
@ -557,7 +557,7 @@ function parseDiscogsRelease(data) {
|
|||
|
||||
// Release packaging
|
||||
if (discogsRelease.formats[i].text) {
|
||||
var freetext = discogsRelease.formats[i].text.toLowerCase().replace(/-/g, '').replace(/ /g, '');
|
||||
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";
|
||||
|
|
Loading…
Reference in a new issue