mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2025-03-04 22:37:16 +00:00
MA importer: fix up regexp, year detection
This commit is contained in:
parent
ea0d9d61ca
commit
4eb6d1bc59
1 changed files with 1 additions and 2 deletions
|
@ -23,8 +23,7 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
function setreleasedate(release, datestring) {
|
function setreleasedate(release, datestring) {
|
||||||
var patt = new RegExp('^d{4}$');
|
if (/^\d{4}$/.exec(datestring)) {
|
||||||
if (patt.exec(datestring)) {
|
|
||||||
release.year = datestring;
|
release.year = datestring;
|
||||||
} else if (datestring.indexOf(',') != -1) {
|
} else if (datestring.indexOf(',') != -1) {
|
||||||
var commaindex = datestring.indexOf(',');
|
var commaindex = datestring.indexOf(',');
|
||||||
|
|
Loading…
Add table
Reference in a new issue