Skip to content

Commit 3a10b0d

Browse files
committed
Merge branch 'beta'
2 parents 6ec4c5c + af8208f commit 3a10b0d

File tree

3 files changed

+62
-20
lines changed

3 files changed

+62
-20
lines changed

index.html

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
// Object, with properties:
4949
// (same as in `isrcs`)
5050
var pregapISRCs = null;
51+
// Edit note to include with ISRC submission edit
52+
var editNote = "";
5153
// True if any ISRCs are valid, and the edit preview should be shown
5254
var anyISRCsValid = false;
5355
// State from the most recently popped history
@@ -493,8 +495,13 @@
493495
});
494496
}
495497

498+
function checkEditNote(params) {
499+
editNote = params.get("edit-note") || "";
500+
}
501+
496502
function handleRelease(params) {
497503
renderReleaseProgress();
504+
checkEditNote(params);
498505
fetchRelease(mbid)
499506
.then(release => {
500507
checkISRCs(release, params);
@@ -687,6 +694,12 @@
687694
}
688695
}
689696

697+
if (editNote) {
698+
const editNoteEl = doc.createElementNS(xmlns, "edit-note");
699+
editNoteEl.textContent = editNote;
700+
metadata.appendChild(editNoteEl);
701+
}
702+
690703
return doc;
691704
}
692705

@@ -952,16 +965,12 @@ <h2 class="h4">
952965
<p class="text-secondary">(no tracks)</p>
953966
<% } %>
954967
<% } %>
955-
<div class="row">
956-
<div class="col-11 col-sm-5 col-md-4 col-lg-3 offset-sm-1">
957-
<button id="check-isrcs-submit" type="submit" class="btn btn-primary">Check ISRCs &amp; update edit preview</button>
958-
</div>
959-
</div>
968+
<button id="check-isrcs-submit" type="submit" class="btn btn-primary">Check ISRCs &amp; update edit preview</button>
960969
<% if (anyISRCsValid) { %>
961970
<h1 class="mt-3 h3">Edit Preview</h1>
962971
<div class="row">
963-
<div class="col-12 col-sm-2 offset-lg-1">
964-
<strong>Additions:</strong>
972+
<div class="col-12 col-sm-2 offset-lg-1 form-label fw-bold">
973+
Additions
965974
</div>
966975
<div class="col-12 col-sm-10 col-lg-9">
967976
<ul class="list-unstyled">
@@ -976,15 +985,15 @@ <h1 class="mt-3 h3">Edit Preview</h1>
976985
</ul>
977986
</div>
978987
</div>
979-
<div class="row">
980-
<div class="col-12 col-sm-10 col-lg-9 offset-sm-2 offset-lg-3">
981-
<% if (login.userInfo) { %>
982-
<button id="edit-submit" class="btn btn-primary" type="button" onclick="doSubmitISRCs(); return false;">Enter edit</button>
983-
<% } else { %>
984-
<button class="btn btn-primary" type="button" onclick="doLogin(); return false;">Login to MusicBrainz</button>
985-
<% } %>
986-
</div>
987-
</div>
988+
<% } %>
989+
<h2 class="h4 mt-3"><label for="edit-note">Edit note</label></h2>
990+
<p>Entering an <a href="https://musicbrainz.org/doc/Edit_Note">edit note</a> that describes where you got your information is highly recommended. Not only does it make your sources clear (both now and to users who see the edit years later), but it can also encourage other users to vote on the edit — thus making it get applied faster.</p>
991+
<p>Even just providing a URL or two is helpful! For more suggestions, see <a href="https://musicbrainz.org/doc/How_to_Write_Edit_Notes">the MusicBrainz guide for writing good edit notes</a>.</p>
992+
<textarea class="form-control mb-3" rows="5" name="edit-note"><%= escapeHtml(editNote) %></textarea>
993+
<% if (!login.userInfo) { %>
994+
<button class="btn btn-primary" type="button" onclick="doLogin(); return false;">Login to MusicBrainz</button>
995+
<% } else if (anyISRCsValid) { %>
996+
<button id="edit-submit" class="btn btn-primary" type="button" onclick="doSubmitISRCs(); return false;">Enter edit</button>
988997
<% } %>
989998
</form>
990999
</script>
@@ -1062,6 +1071,9 @@ <h1 class="h3">An error occured</h1>
10621071
<span class="navbar-brand">kepstin’s MagicISRC</span>
10631072
<div class="show navbar-collapse me-auto">
10641073
<ul class="navbar-nav">
1074+
<li class="nav-item">
1075+
<a class="nav-link" href="https://github.com/kepstin/magicisrc/releases">Release Notes</a>
1076+
</li>
10651077
<li class="nav-item">
10661078
<a class="nav-link" href="seeding.html">Seeding and Importing</a>
10671079
</li>

privacy.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,22 @@
88
<link rel="stylesheet" href="fonts.css">
99
</head>
1010
<body>
11-
<nav class="navbar navbar-dark bg-secondary mb-3">
11+
<nav class="navbar navbar-dark navbar-expand-sm bg-secondary mb-3">
1212
<div class="container" id="navbar">
1313
<a href="/" class="navbar-brand mr-auto">kepstin’s MagicISRC</a>
14+
<div class="show navbar-collapse me-auto">
15+
<ul class="navbar-nav">
16+
<li class="nav-item">
17+
<a class="nav-link" href="https://github.com/kepstin/magicisrc/releases">Release Notes</a>
18+
</li>
19+
<li class="nav-item">
20+
<a class="nav-link" href="seeding.html">Seeding and Importing</a>
21+
</li>
22+
<li class="nav-item">
23+
<a class="nav-link" href="privacy.html">Privacy Policy</a>
24+
</li>
25+
</ul>
26+
</div>
1427
</div>
1528
</nav>
1629
<div class="container">
@@ -30,7 +43,7 @@ <h2>Data sent to MusicBrainz</h2>
3043
<li><b>MusicBrainz access token.</b> (when submitting ISRCs)</li>
3144
<li><b>Code verifier.</b> (when logging in)</li>
3245
<li><b>Release MBID.</b> (when loading a release)</li>
33-
<li><b>Recording MBIDs and ISRCs.</b> (when submitting ISRCs)</li>
46+
<li><b>Recording MBIDs, ISRCs, and Edit Note.</b> (when submitting ISRCs)</li>
3447
</ul>
3548
<h2>Web access logs</h2>
3649
<p>Like many other web services, I keep logs of all web requests made to this service. These logs are used for diagnostic and traffic management purposes, and no information from them is sent to any third party or made available publicly. The logs are deleted after 14 days, although anonymized aggregate traffic data may be preserved indefinitely. The following personal data is logged:</p>

seeding.html

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<!DOCTYPE html>
32
<html>
43
<head>
@@ -9,9 +8,22 @@
98
<link rel="stylesheet" href="fonts.css">
109
</head>
1110
<body>
12-
<nav class="navbar navbar-dark bg-secondary mb-3">
11+
<nav data-bs-theme="dark" class="navbar navbar-expand-sm bg-secondary mb-3">
1312
<div class="container" id="navbar">
1413
<a href="/" class="navbar-brand mr-auto">kepstin’s MagicISRC</a>
14+
<div class="show navbar-collapse me-auto">
15+
<ul class="navbar-nav">
16+
<li class="nav-item">
17+
<a class="nav-link" href="https://github.com/kepstin/magicisrc/releases">Release Notes</a>
18+
</li>
19+
<li class="nav-item">
20+
<a class="nav-link" href="seeding.html">Seeding and Importing</a>
21+
</li>
22+
<li class="nav-item">
23+
<a class="nav-link" href="privacy.html">Privacy Policy</a>
24+
</li>
25+
</ul>
26+
</div>
1527
</div>
1628
</nav>
1729
<div class="container">
@@ -62,6 +74,11 @@ <h2 id="documentation">Documentation</h2>
6274
<p>An ISRC, specified by sequential position.</p>
6375
<p>If you just have a list of ISRCs but you do not know how they are split between media, use this format. This parameter format is primarily supported for backwards compatibility with older ISRC submission tools – please use the Medium &amp; Track format instead if possible. Within the name of the parameter, <code><u>N</u></code> is replaced with the position (counting from 1). CD pregap tracks are not supported; they will be skipped in the numbering sequence.</p>
6476
</dd>
77+
<dt class="col-12"><code>edit-note</code></dt>
78+
<dd class="col offset-1">
79+
<p>An edit note to include with the ISRC addition edit.</p>
80+
<p>See the <a href="https://musicbrainz.org/doc/Edit_Note">MusicBrainz Edit Note documentation</a> for detail on the use and formatting of an edit note, and <a href="https://musicbrainz.org/doc/How_to_Write_Edit_Notes">How to Write Edit Notes</a> for more information on what a good edit note should include.</p>
81+
</dd>
6582
</dl>
6683
</div>
6784
<footer class="text-muted my-3">

0 commit comments

Comments
 (0)