diff --git a/classes/class_torrent_form.php b/classes/class_torrent_form.php
index c03968bf..c96e7591 100644
--- a/classes/class_torrent_form.php
+++ b/classes/class_torrent_form.php
@@ -253,6 +253,53 @@ function music_form($GenreTags) {
Do not include the words remaster, re-issue, MSFL Gold, limited edition, bonus tracks, bonus disc or country specific information in this field. That belongs in the edition information fields below, see this for further information. Also remember to use the correct capitalization for your upload. See the Capitalization Guidelines for more information.
+
+ MusicBrainz
+
+
+
+
+
+
+
+
>Year
@@ -709,12 +756,6 @@ function audiobook_form() {
Contains information like the track listing, and maybe a review.
-
- Library Contest Image Location
-
- Multi-disc Upload
-
-
}?>
Release Description (optional)
diff --git a/sections/collages/collage.php b/sections/collages/collage.php
index 0e7a0141..0c0b51e9 100644
--- a/sections/collages/collage.php
+++ b/sections/collages/collage.php
@@ -583,14 +583,14 @@ function compare($X, $Y){
?>
diff --git a/sections/forums/newthread.php b/sections/forums/newthread.php
index 911b1d4d..2267be11 100644
--- a/sections/forums/newthread.php
+++ b/sections/forums/newthread.php
@@ -71,7 +71,7 @@
-
+
@@ -142,7 +142,7 @@ function RemoveAnswerField() {
-
+
diff --git a/sections/forums/thread.php b/sections/forums/thread.php
index 4e33ba3d..b8d8d5a4 100644
--- a/sections/forums/thread.php
+++ b/sections/forums/thread.php
@@ -473,7 +473,7 @@
-
+
@@ -493,7 +493,7 @@
Merge
} ?>
-
+
diff --git a/sections/requests/request.php b/sections/requests/request.php
index 226ebf42..594d8ba9 100644
--- a/sections/requests/request.php
+++ b/sections/requests/request.php
@@ -544,7 +544,7 @@
-
+
@@ -552,7 +552,7 @@
-
+
} ?>
diff --git a/sections/torrents/details.php b/sections/torrents/details.php
index 76a2918c..d01bdc6a 100644
--- a/sections/torrents/details.php
+++ b/sections/torrents/details.php
@@ -850,7 +850,7 @@ function filelist($Str) {
-
+
@@ -858,7 +858,7 @@ function filelist($Str) {
-
+
} ?>
diff --git a/sections/upload/upload.php b/sections/upload/upload.php
index f4993fe9..eeaa4e9c 100644
--- a/sections/upload/upload.php
+++ b/sections/upload/upload.php
@@ -10,7 +10,7 @@
//*********************************************************************//
ini_set('max_file_uploads','100');
-show_header('Upload','upload');
+show_header('Upload','upload,jquery,valid_tags,musicbrainz');
if(empty($Properties) && !empty($_GET['groupid']) && is_number($_GET['groupid'])) {
$DB->query("SELECT
diff --git a/static/functions/musicbrainz.js b/static/functions/musicbrainz.js
new file mode 100644
index 00000000..78f58661
--- /dev/null
+++ b/static/functions/musicbrainz.js
@@ -0,0 +1,428 @@
+/**
+ * Allows the user to populate upload form using musicbrainz.
+ * Popup display code based on example found here http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-popup-using-jquery/
+ *
+ * @author Gwindow
+ *
+ * TODO Center dynamically based on scroll position
+ */
+
+
+(function($) {
+//global variables
+var $year_release_group;
+var $release_type;
+var $release_group_id;
+var $tags;
+var $year_release;
+var $catalog_number;
+var $record_label;
+var $searched = false;
+// controls popup state
+var $popup_state = 0;
+var $musicbrainz_state = 0;
+
+$(document).ready(function() {
+ loadCSS();
+ enableMusicBrainzButton();
+ controlPopup();
+
+ $("#musicbrainz_button").click(function() {
+ var $album = $("#title").val();
+ var $artist = $("#artist").val();
+ if($artist.length > 0 || $album.length > 0) {
+ jQuery('#results1').empty();
+ jQuery('#results2').empty();
+ jQuery('#results1').show();
+ jQuery('#results2').show();
+ $searched = true;
+ var $artist_encoded = encodeURI($artist);
+ var $album_encoded = encodeURI($album);
+ $.ajax({
+ type: "GET",
+ url : "http://www.musicbrainz.org/ws/2/release-group/?query=artist:%22" + $artist_encoded + "%22%20AND%20releasegroup:%22" + $album_encoded + "%22",
+ dataType: "xml",
+ success: showReleaseGroups
+ });
+
+ }
+ else { alert("Please fill out artist and/or album fields.");}
+ });
+
+ $("#results1").click(function(event) {
+ var $id = event.target.id;
+ if($id != "results1") {
+ jQuery('#results1').hide();
+ jQuery('#results2').empty();
+ jQuery('#results2').show();
+ jQuery('#popup_back').empty();
+ $.ajax({
+ type: "GET",
+ url: "http://musicbrainz.org/ws/2/release-group/" + $id + "?inc=artist-credits%2Breleases+tags+media",
+ dataType: "xml",
+ success: showReleases
+ });
+}
+});
+ $("#results2").click(function(event) {
+ var $id = event.target.id;
+ if($id != "mb" && $id != "results2") {
+ jQuery('#results2').empty();
+ jQuery('#results2').show();
+
+ $.ajax({
+ type: "GET",
+ url: "http://musicbrainz.org/ws/2/release/" + $id + "?inc=artist-credits%2Blabels%2Bdiscids%2Brecordings+tags+media+label-rels",
+ dataType: "xml",
+ success: populateForm
+ });
+ }
+});
+
+ $("#popup_back").click(function(event) {
+ var $id = event.target.id;
+ if($id == "back" ) {
+ jQuery('#results2').hide();
+ jQuery('#results1').show();
+ jQuery('#popup_back').empty();
+ jQuery('#popup_title').text("Choose Release Group");
+ }
+ });
+
+ $("#remaster").click(function(event) {
+ if($("#remaster").attr("checked") && $searched == true) {
+ populateEditionsForm();
+ }
+ else if($searched == true) {
+ depopulateEditionsForm();
+ }
+
+ });
+
+ });
+/**
+ * Shows the release groups
+ * @param xml
+ */
+function showReleaseGroups(xml)
+{
+ var $count = $(xml).find("release-group-list").attr("count");
+ if($count == 0 ) {
+ alert("Could not find on MusicBrainz");
+ }
+ else {
+ jQuery('#popup_title').text("Choose Release Group");
+ openPopup();
+ }
+
+ $(xml).find("release-group").each(function()
+ {
+ var $title = $(this).find("title:first").text();
+ var $artist = $(this).find("name:first").text();
+ var $type = $(this).attr("type");
+ var $score = $(this).attr("ext:score");
+ var $releaseId = $(this).attr("id");
+ var $result = $artist + " - " + $title + " [Type: " + $type + ", Score: " + $score + "]"
+ $("" + $result + "
").attr("id", $releaseId).appendTo("#results1");
+ });
+}
+
+/**
+ * Shows releases inside a release group
+ * @param xml
+ */
+function showReleases(xml) {
+ var $date_release_group = $(xml).find("first-release-date").text();
+ $year_original = $date_release_group.substring(0,4);
+ $release_type = $(xml).find("release-group").attr("type");
+ $release_group_id = $(xml).find("release-group").attr("id");
+ jQuery('#popup_title').html("Choose Release " + " (View on MusicBrainz) ");
+ jQuery('#popup_back').html("[Go Back] ");
+
+ $(xml).find("release").each(function()
+ {
+ var $release_id = $(this).attr("id");
+ var $title = $(this).find("title").text();
+ var $status = $(this).find("status").text();
+ var $date = $(this).find("date").text();
+ var $year = $date.substring(0,4);
+ var $country = $(this).find("country").text();
+ var $format; var $tracks;
+ $(this).find("medium-list").each(function() {
+ $(this).find("medium").each(function() {
+ $format = $(this).find("format").text();
+ $(this).find("track-list").each(function() {
+ $tracks = $(this).attr("count");
+ }); }); });
+ var $result = $title + " [Year: " + $year + ", Format: " + $format + ", Tracks: " + $tracks + ", Country: " + $country + "]";
+ $("" + $result + " ").attr("id", $release_id).appendTo("#results2");
+
+ $(" (View on MB) " + "
").attr("id", "mb").appendTo("#results2");
+ });
+
+ parseTags(xml);
+}
+ /**
+ * Parses the tags to the gazelle conventions
+ * @param xml
+ */
+ function parseTags(xml) {
+ $tags = "";
+ $(xml).find("tag").each(function() {
+ $tag = cleanTag($(this).find("name").text());
+ if(isValidTag($tag)) {
+ $tags += "," + $tag;
+ }
+ });
+ if($tags.charAt(0) == ',') {
+ $tags = $tags.substring(1);
+ }
+ }
+
+ function cleanTag($t) {
+ $t = $t.replace(/ +(?= )/g,',');
+ $t = $t.replace('-','.');
+ $t = $t.replace(' ','.');
+ return $t;
+ }
+ /**
+ * Populates the upload form
+ * @param xml
+ */
+ function populateForm(xml) {
+ closePopup();
+
+ var $release_id = $(xml).find("release").attr("id");
+ var $release_title = $(xml).find("release").find("title:first").text();
+ var $artist = $(xml).find("artist-credit:first").find("name:first").text();
+ var $date = $(xml).find("release").find("date").text();
+ $year_release = $date.substring(0,4);
+ var $country = $(xml).find("country").text();
+ var $asin = $(xml).find("asin").text();
+ var $barcode = $(xml).find("barcode").text();
+ $catalog_number = $(xml).find("catalog-number").text();
+ $record_label = $(xml).find("label").find("sort-name").text();
+ var $track_count = $(xml).find("track-list").attr("count");
+ var $track_titles = new Array();
+ $(xml).find("track-list").find("title").each(function() {
+ var $title = $(this).text();
+ $track_titles.push($title);
+ });
+
+ clear();
+ $("#artist").val($artist);
+ $("#title").val($release_title);
+ $("#year").val($year_original);
+ $("#record_label").val($record_label);
+ $("#catalogue_number").val($catalog_number);
+ $("#tags").val($tags);
+ $("#releasetype").val(getReleaseType());
+ var $amazon_link = "";
+ if($asin.length > 0) {
+ $amazin_link = "[url=http://amazon.com/exec/obidos/ASIN/" + $asin + "]Amazon[/url]" + "\n";
+ }
+ var $country_text = "";
+ if($country.length > 0) {
+ $country_text = "Country: " + $country + "\n";
+ }
+ var $barcode_text = "";
+ if($barcode.length > 0) {
+ $barcode_text = "Barcode: " + $barcode + "\n";
+ }
+ var $description = $amazon_link +
+ "[url=http://musicbrainz.org/release-group/" + $release_group_id + "]MusicBrainz[/url]" + "\n" + "\n" +
+ $country_text +
+ $barcode_text +
+ "Tracks: " + $track_count + "\n" + "\n" +
+ "Track List:" + "\n";
+ for (var i=0; i < $track_titles.length; i++) {
+ $description = $description + "[#]" + $track_titles[i] + "\n";
+ };
+ $("#album_desc").val($description);
+ }
+
+ function populateEditionsForm() {
+ $('#remaster_true').show();
+ $("#record_label").val("");
+ $("#catalogue_number").val("");
+ $("#remaster_year").val($year_release);
+ $("#remaster_record_label").val($record_label);
+ $("#remaster_catalogue_number").val($catalog_number);
+}
+
+ function depopulateEditionsForm() {
+ $("#record_label").val($record_label);
+ $("#catalogue_number").val($catalog_number);
+ $("#remaster_year").val("");
+ $("#remaster_record_label").val("");
+ $("#remaster_catalogue_number").val("");
+ }
+
+ function closeEditionsForm() {
+ if($("#remaster").attr("checked")) {
+ $('#remaster_true').hide();
+ }
+
+ $("#remaster").attr("checked", false);
+ $("#remaster_year").val("");
+ $("#remaster_record_label").val("");
+ $("#remaster_catalogue_number").val("");
+
+
+ }
+ /**
+ * Gets the release type
+ * @returns value of type
+ */
+ function getReleaseType() {
+ var $value;
+ switch($release_type) {
+ case "Album":
+ $value = 1;
+ break;
+ case "Soundtrack":
+ $value = 3;
+ break;
+ case "EP":
+ $value = 5;
+ break;
+ case "Compilation":
+ $value = 7;
+ break;
+ case "Single":
+ $value = 9;
+ break;
+ case "Live":
+ $value = 11;
+ break;
+ case "Remix":
+ $value = 13;
+ break;
+ case "Interview":
+ $value = 15;
+ break;
+ default:
+ $value = "---";
+ break;
+ }
+ return $value;
+ }
+ /**
+ * Enables the musicbrainz button only when the "Music" type is selected and a format isn't being uploaded
+ */
+ function enableMusicBrainzButton() {
+ if ($('#categories').is(':disabled') == false) {
+ $("#categories").click(function() {
+ if($("#categories").val() != 0 ) {
+ $("#musicbrainz_button").attr("disabled", "disabled");
+ }
+ else {
+ $("#musicbrainz_button").removeAttr("disabled");
+ }
+ });
+ }
+ else {
+ $("#musicbrainz_button").attr("disabled", "disabled");
+ }
+ }
+ /**
+ *Clears fields in the upload form
+ */
+ function clear() {
+ closeEditionsForm();
+ $("#artist").val("");
+ $("#title").val("");
+ $("#year").val("");
+ $("#record_label").val("");
+ $("#catalogue_number").val("");
+ $("#tags").val("");
+ $("#releasetype").val("");
+ $("#album_desc").val("");
+ $("#remaster_year").val("");
+ $("#remaster_record_label").val("");
+ $("#remaster_catalogue_number").val("");
+}
+
+ /**
+ * Loads the popup
+ * @returns
+ */
+ function openPopup(){
+ centerPopup();
+ if($popup_state==0){
+ $("#popup_background").css({
+ "opacity": "0.7"
+ });
+ $("#popup_background").fadeIn("fast");
+ $("#musicbrainz_popup").fadeIn("fast");
+ $popup_state = 1;
+ }
+ }
+
+ /**
+ * Closes the popup
+ * @returns
+ */
+ function closePopup(){
+ if($popup_state==1){
+ $("#popup_background").fadeOut("fast");
+ $("#musicbrainz_popup").fadeOut("fast");
+ jQuery('#popup_back').html("");
+ $popup_state = 0;
+ }
+ }
+
+ /**
+ * Centers the popup on the screen
+ * @returns
+ */
+ function centerPopup(){
+ //TODO Center dynamically based on scroll position
+
+ var windowWidth = document.documentElement.clientWidth;
+ var windowHeight = document.documentElement.clientHeight;
+ var popupHeight = $("#musicbrainz_popup").height();
+ var scrollPosition = window.pageYOffset;
+ var percentage = (scrollPosition/windowHeight) * 100;
+ var popupWidth = $("#musicbrainz_popup").width();
+ $("#musicbrainz_popup").css({
+ "position": "absolute ! important",
+ //"top": windowHeight/2-popupHeight/2,
+ "left": windowWidth/2-popupWidth/2 + "! important"
+ });
+
+ $("#popup_background").css({
+ "height": windowHeight
+ });
+ }
+
+ /**
+ * Controls the popup state based on user input
+ * @returns
+ */
+ function controlPopup() {
+ $("#popup_close").click(function(){
+ closePopup();
+ });
+
+ $(document).keypress(function(e){
+ if(e.keyCode==27 && $popup_state==1){
+ closePopup();
+ }
+ });
+ }
+
+ function loadCSS() {
+ var $link = document.createElement('link')
+ $link.href = 'static/styles/musicbrainz.css';
+ $link.rel = 'stylesheet';
+ $link.type = 'text/css';
+ document.body.appendChild($link);
+ $link = null;
+ }
+
+} ) ( jQuery );
+
+
+
diff --git a/static/functions/valid_tags.js b/static/functions/valid_tags.js
new file mode 100644
index 00000000..73baa9d1
--- /dev/null
+++ b/static/functions/valid_tags.js
@@ -0,0 +1,766 @@
+/**
+ * List of tags to compare musicbrainz results with.
+ *
+ * @author Gwindow
+ *
+ */
+var tags = new Object();
+
+
+function isValidTag(value) {
+var toReturn = false;
+ if(tags[value] == true) {
+ toReturn = true;
+ }
+return toReturn;
+}
+
+
+tags["rock"] = true;
+tags["electronic"] = true;
+tags["indie"] = true;
+tags["pop"] = true;
+tags["alternative"] = true;
+tags["hip.hop"] = true;
+tags["experimental"] = true;
+tags["house"] = true;
+tags["jazz"] = true;
+tags["folk"] = true;
+tags["metal"] = true;
+tags["ambient"] = true;
+tags["techno"] = true;
+tags["punk"] = true;
+tags["dance"] = true;
+tags["classical"] = true;
+tags["1990s"] = true;
+tags["psychedelic"] = true;
+tags["trance"] = true;
+tags["world.music"] = true;
+tags["funk"] = true;
+tags["hardcore"] = true;
+tags["soul"] = true;
+tags["1980s"] = true;
+tags["1970s"] = true;
+tags["drum.and.bass"] = true;
+tags["country"] = true;
+tags["blues"] = true;
+tags["progressive.rock"] = true;
+tags["reggae"] = true;
+tags["dubstep"] = true;
+tags["tech.house"] = true;
+tags["rhythm.and.blues"] = true;
+tags["industrial"] = true;
+tags["ebooks.non.fiction"] = true;
+tags["idm"] = true;
+tags["downtempo"] = true;
+tags["1960s"] = true;
+tags["comics"] = true;
+tags["minimal"] = true;
+tags["post.rock"] = true;
+tags["apps.windows"] = true;
+tags["disco"] = true;
+tags["deep.house"] = true;
+tags["breaks"] = true;
+tags["soundtrack"] = true;
+tags["black.metal"] = true;
+tags["lo.fi"] = true;
+tags["electro"] = true;
+tags["instrumental"] = true;
+tags["live"] = true;
+tags["noise"] = true;
+tags["apps.mac"] = true;
+tags["avant.garde"] = true;
+tags["psytrance"] = true;
+tags["death.metal"] = true;
+tags["french"] = true;
+tags["synth.pop"] = true;
+tags["audio.books"] = true;
+tags["dub"] = true;
+tags["trip.hop"] = true;
+tags["new.age"] = true;
+tags["acoustic"] = true;
+tags["jpop"] = true;
+tags["drone"] = true;
+tags["garage"] = true;
+tags["delete.this.tag"] = true;
+tags["kpop"] = true;
+tags["progressive.house"] = true;
+tags["australia"] = true;
+tags["ebooks.fiction"] = true;
+tags["latin"] = true;
+tags["emo"] = true;
+tags["bluegrass"] = true;
+tags["comedy"] = true;
+tags["ska"] = true;
+tags["indie.rock"] = true;
+tags["apps.sound"] = true;
+tags["japanese"] = true;
+tags["hard.rock"] = true;
+tags["shoegaze"] = true;
+tags["piano"] = true;
+tags["new.wave"] = true;
+tags["german"] = true;
+tags["abstract"] = true;
+tags["free.jazz"] = true;
+tags["freely.available"] = true;
+tags["punk.rock"] = true;
+tags["2000s"] = true;
+tags["post.punk"] = true;
+tags["fiction"] = true;
+tags["breakbeat"] = true;
+tags["jam.band"] = true;
+tags["bass"] = true;
+tags["singer.songwriter"] = true;
+tags["electro.house"] = true;
+tags["christian"] = true;
+tags["canada"] = true;
+tags["acid"] = true;
+tags["indie.pop"] = true;
+tags["swedish"] = true;
+tags["marvel"] = true;
+tags["glitch"] = true;
+tags["pop.punk"] = true;
+tags["progressive.trance"] = true;
+tags["heavy.metal"] = true;
+tags["uk.garage"] = true;
+tags["thrash.metal"] = true;
+tags["score"] = true;
+tags["folk.rock"] = true;
+tags["americana"] = true;
+tags["post.hardcore"] = true;
+tags["2010s"] = true;
+tags["lounge"] = true;
+tags["fusion"] = true;
+tags["euro.house"] = true;
+tags["grunge"] = true;
+tags["metalcore"] = true;
+tags["power.pop"] = true;
+tags["alternative.rock"] = true;
+tags["christmas"] = true;
+tags["progressive"] = true;
+tags["united.states"] = true;
+tags["guitar"] = true;
+tags["doom.metal"] = true;
+tags["progressive.metal"] = true;
+tags["electronica"] = true;
+tags["chillout"] = true;
+tags["dutch"] = true;
+tags["hardcore.dance"] = true;
+tags["science.fiction"] = true;
+tags["video.game"] = true;
+tags["power.metal"] = true;
+tags["vocal"] = true;
+tags["dark.ambient"] = true;
+tags["dream.pop"] = true;
+tags["alternative.country"] = true;
+tags["swing"] = true;
+tags["epub"] = true;
+tags["brazil"] = true;
+tags["ebm"] = true;
+tags["russian"] = true;
+tags["magazine"] = true;
+tags["sheet.music"] = true;
+tags["grime"] = true;
+tags["celtic"] = true;
+tags["non.fiction"] = true;
+tags["pop.rock"] = true;
+tags["nu.disco"] = true;
+tags["pdf"] = true;
+tags["1950s"] = true;
+tags["jungle"] = true;
+tags["grindcore"] = true;
+tags["opera"] = true;
+tags["classic.rock"] = true;
+tags["quebec"] = true;
+tags["gothic"] = true;
+tags["modern.classical"] = true;
+tags["dc.comics"] = true;
+tags["eurodance"] = true;
+tags["beats"] = true;
+tags["italian"] = true;
+tags["japan"] = true;
+tags["psychedelic.rock"] = true;
+tags["stoner.rock"] = true;
+tags["breakcore"] = true;
+tags["chanson"] = true;
+tags["dub.techno"] = true;
+tags["norwegian"] = true;
+tags["dancehall"] = true;
+tags["screamo"] = true;
+tags["deutsche.grammophon"] = true;
+tags["elearning.videos"] = true;
+tags["darkwave"] = true;
+tags["chiptune"] = true;
+tags["noise.rock"] = true;
+tags["free.improvisation"] = true;
+tags["france"] = true;
+tags["sweden"] = true;
+tags["fantasy"] = true;
+tags["melodic.death.metal"] = true;
+tags["krautrock"] = true;
+tags["gospel"] = true;
+tags["sludge"] = true;
+tags["chillwave"] = true;
+tags["hard.trance"] = true;
+tags["math.rock"] = true;
+tags["future.jazz"] = true;
+tags["rave"] = true;
+tags["roots"] = true;
+tags["mobi"] = true;
+tags["easy.listening"] = true;
+tags["goa.trance"] = true;
+tags["nonfiction"] = true;
+tags["rockabilly"] = true;
+tags["new.zealand"] = true;
+tags["dc"] = true;
+tags["vanity.house"] = true;
+tags["israeli"] = true;
+tags["club"] = true;
+tags["brazilian"] = true;
+tags["baroque"] = true;
+tags["hebrew"] = true;
+tags["acid.jazz"] = true;
+tags["britpop"] = true;
+tags["contemporary"] = true;
+tags["underground"] = true;
+tags["korean"] = true;
+tags["spanish"] = true;
+tags["germany"] = true;
+tags["samples"] = true;
+tags["world"] = true;
+tags["jam"] = true;
+tags["doom"] = true;
+tags["big.band"] = true;
+tags["leftfield"] = true;
+tags["stoner"] = true;
+tags["female.vocalist"] = true;
+tags["rock.and.roll"] = true;
+tags["anime"] = true;
+tags["irish"] = true;
+tags["surf"] = true;
+tags["norway"] = true;
+tags["canadian"] = true;
+tags["jrock"] = true;
+tags["nu.metal"] = true;
+tags["ebooks"] = true;
+tags["8bit"] = true;
+tags["space.rock"] = true;
+tags["blues.rock"] = true;
+tags["italo.disco"] = true;
+tags["post.bop"] = true;
+tags["finnish"] = true;
+tags["tribal"] = true;
+tags["gothic.metal"] = true;
+tags["holiday"] = true;
+tags["neofolk"] = true;
+tags["covers"] = true;
+tags["hardstyle"] = true;
+tags["uk"] = true;
+tags["remix"] = true;
+tags["portugal"] = true;
+tags["game"] = true;
+tags["science"] = true;
+tags["united.kingdom"] = true;
+tags["clubhouse"] = true;
+tags["mpb"] = true;
+tags["finland"] = true;
+tags["mashup"] = true;
+tags["southern.rock"] = true;
+tags["rock"] = true;
+tags["electronic"] = true;
+tags["indie"] = true;
+tags["pop"] = true;
+tags["alternative"] = true;
+tags["hip.hop"] = true;
+tags["experimental"] = true;
+tags["house"] = true;
+tags["jazz"] = true;
+tags["folk"] = true;
+tags["metal"] = true;
+tags["ambient"] = true;
+tags["techno"] = true;
+tags["punk"] = true;
+tags["dance"] = true;
+tags["classical"] = true;
+tags["1990s"] = true;
+tags["psychedelic"] = true;
+tags["trance"] = true;
+tags["world.music"] = true;
+tags["funk"] = true;
+tags["hardcore"] = true;
+tags["soul"] = true;
+tags["1980s"] = true;
+tags["1970s"] = true;
+tags["drum.and.bass"] = true;
+tags["country"] = true;
+tags["blues"] = true;
+tags["progressive.rock"] = true;
+tags["reggae"] = true;
+tags["dubstep"] = true;
+tags["tech.house"] = true;
+tags["rhythm.and.blues"] = true;
+tags["industrial"] = true;
+tags["ebooks.non.fiction"] = true;
+tags["idm"] = true;
+tags["downtempo"] = true;
+tags["1960s"] = true;
+tags["comics"] = true;
+tags["minimal"] = true;
+tags["post.rock"] = true;
+tags["apps.windows"] = true;
+tags["disco"] = true;
+tags["deep.house"] = true;
+tags["breaks"] = true;
+tags["soundtrack"] = true;
+tags["black.metal"] = true;
+tags["lo.fi"] = true;
+tags["electro"] = true;
+tags["instrumental"] = true;
+tags["live"] = true;
+tags["noise"] = true;
+tags["apps.mac"] = true;
+tags["avant.garde"] = true;
+tags["psytrance"] = true;
+tags["death.metal"] = true;
+tags["french"] = true;
+tags["synth.pop"] = true;
+tags["audio.books"] = true;
+tags["dub"] = true;
+tags["trip.hop"] = true;
+tags["new.age"] = true;
+tags["acoustic"] = true;
+tags["jpop"] = true;
+tags["drone"] = true;
+tags["garage"] = true;
+tags["delete.this.tag"] = true;
+tags["kpop"] = true;
+tags["progressive.house"] = true;
+tags["australia"] = true;
+tags["ebooks.fiction"] = true;
+tags["latin"] = true;
+tags["emo"] = true;
+tags["bluegrass"] = true;
+tags["comedy"] = true;
+tags["ska"] = true;
+tags["indie.rock"] = true;
+tags["apps.sound"] = true;
+tags["japanese"] = true;
+tags["hard.rock"] = true;
+tags["shoegaze"] = true;
+tags["piano"] = true;
+tags["new.wave"] = true;
+tags["german"] = true;
+tags["abstract"] = true;
+tags["free.jazz"] = true;
+tags["freely.available"] = true;
+tags["punk.rock"] = true;
+tags["2000s"] = true;
+tags["post.punk"] = true;
+tags["fiction"] = true;
+tags["breakbeat"] = true;
+tags["jam.band"] = true;
+tags["bass"] = true;
+tags["singer.songwriter"] = true;
+tags["electro.house"] = true;
+tags["christian"] = true;
+tags["canada"] = true;
+tags["acid"] = true;
+tags["indie.pop"] = true;
+tags["swedish"] = true;
+tags["marvel"] = true;
+tags["glitch"] = true;
+tags["pop.punk"] = true;
+tags["progressive.trance"] = true;
+tags["heavy.metal"] = true;
+tags["uk.garage"] = true;
+tags["thrash.metal"] = true;
+tags["score"] = true;
+tags["folk.rock"] = true;
+tags["americana"] = true;
+tags["post.hardcore"] = true;
+tags["2010s"] = true;
+tags["lounge"] = true;
+tags["fusion"] = true;
+tags["euro.house"] = true;
+tags["grunge"] = true;
+tags["metalcore"] = true;
+tags["power.pop"] = true;
+tags["alternative.rock"] = true;
+tags["christmas"] = true;
+tags["progressive"] = true;
+tags["united.states"] = true;
+tags["guitar"] = true;
+tags["doom.metal"] = true;
+tags["progressive.metal"] = true;
+tags["electronica"] = true;
+tags["chillout"] = true;
+tags["dutch"] = true;
+tags["hardcore.dance"] = true;
+tags["science.fiction"] = true;
+tags["video.game"] = true;
+tags["power.metal"] = true;
+tags["vocal"] = true;
+tags["dark.ambient"] = true;
+tags["dream.pop"] = true;
+tags["alternative.country"] = true;
+tags["swing"] = true;
+tags["epub"] = true;
+tags["brazil"] = true;
+tags["ebm"] = true;
+tags["russian"] = true;
+tags["magazine"] = true;
+tags["sheet.music"] = true;
+tags["grime"] = true;
+tags["celtic"] = true;
+tags["non.fiction"] = true;
+tags["pop.rock"] = true;
+tags["nu.disco"] = true;
+tags["pdf"] = true;
+tags["1950s"] = true;
+tags["jungle"] = true;
+tags["grindcore"] = true;
+tags["opera"] = true;
+tags["classic.rock"] = true;
+tags["quebec"] = true;
+tags["gothic"] = true;
+tags["modern.classical"] = true;
+tags["dc.comics"] = true;
+tags["eurodance"] = true;
+tags["beats"] = true;
+tags["italian"] = true;
+tags["japan"] = true;
+tags["psychedelic.rock"] = true;
+tags["stoner.rock"] = true;
+tags["breakcore"] = true;
+tags["chanson"] = true;
+tags["dub.techno"] = true;
+tags["norwegian"] = true;
+tags["dancehall"] = true;
+tags["screamo"] = true;
+tags["deutsche.grammophon"] = true;
+tags["elearning.videos"] = true;
+tags["darkwave"] = true;
+tags["chiptune"] = true;
+tags["noise.rock"] = true;
+tags["free.improvisation"] = true;
+tags["france"] = true;
+tags["sweden"] = true;
+tags["fantasy"] = true;
+tags["melodic.death.metal"] = true;
+tags["krautrock"] = true;
+tags["gospel"] = true;
+tags["sludge"] = true;
+tags["chillwave"] = true;
+tags["hard.trance"] = true;
+tags["math.rock"] = true;
+tags["future.jazz"] = true;
+tags["rave"] = true;
+tags["roots"] = true;
+tags["mobi"] = true;
+tags["easy.listening"] = true;
+tags["goa.trance"] = true;
+tags["nonfiction"] = true;
+tags["rockabilly"] = true;
+tags["new.zealand"] = true;
+tags["dc"] = true;
+tags["vanity.house"] = true;
+tags["israeli"] = true;
+tags["club"] = true;
+tags["brazilian"] = true;
+tags["baroque"] = true;
+tags["hebrew"] = true;
+tags["acid.jazz"] = true;
+tags["britpop"] = true;
+tags["contemporary"] = true;
+tags["underground"] = true;
+tags["korean"] = true;
+tags["spanish"] = true;
+tags["germany"] = true;
+tags["samples"] = true;
+tags["world"] = true;
+tags["jam"] = true;
+tags["doom"] = true;
+tags["big.band"] = true;
+tags["leftfield"] = true;
+tags["stoner"] = true;
+tags["female.vocalist"] = true;
+tags["rock.and.roll"] = true;
+tags["anime"] = true;
+tags["irish"] = true;
+tags["surf"] = true;
+tags["norway"] = true;
+tags["canadian"] = true;
+tags["jrock"] = true;
+tags["nu.metal"] = true;
+tags["ebooks"] = true;
+tags["8bit"] = true;
+tags["space.rock"] = true;
+tags["blues.rock"] = true;
+tags["italo.disco"] = true;
+tags["post.bop"] = true;
+tags["finnish"] = true;
+tags["tribal"] = true;
+tags["gothic.metal"] = true;
+tags["holiday"] = true;
+tags["neofolk"] = true;
+tags["covers"] = true;
+tags["hardstyle"] = true;
+tags["uk"] = true;
+tags["remix"] = true;
+tags["portugal"] = true;
+tags["game"] = true;
+tags["science"] = true;
+tags["united.kingdom"] = true;
+tags["clubhouse"] = true;
+tags["mpb"] = true;
+tags["finland"] = true;
+tags["mashup"] = true;
+tags["southern.rock"] = true;
+tags["rock"] = true;
+tags["electronic"] = true;
+tags["indie"] = true;
+tags["pop"] = true;
+tags["alternative"] = true;
+tags["hip.hop"] = true;
+tags["experimental"] = true;
+tags["house"] = true;
+tags["jazz"] = true;
+tags["folk"] = true;
+tags["metal"] = true;
+tags["ambient"] = true;
+tags["techno"] = true;
+tags["punk"] = true;
+tags["dance"] = true;
+tags["classical"] = true;
+tags["1990s"] = true;
+tags["psychedelic"] = true;
+tags["trance"] = true;
+tags["world.music"] = true;
+tags["funk"] = true;
+tags["hardcore"] = true;
+tags["soul"] = true;
+tags["1980s"] = true;
+tags["1970s"] = true;
+tags["drum.and.bass"] = true;
+tags["country"] = true;
+tags["blues"] = true;
+tags["progressive.rock"] = true;
+tags["reggae"] = true;
+tags["dubstep"] = true;
+tags["tech.house"] = true;
+tags["rhythm.and.blues"] = true;
+tags["industrial"] = true;
+tags["ebooks.non.fiction"] = true;
+tags["idm"] = true;
+tags["downtempo"] = true;
+tags["1960s"] = true;
+tags["comics"] = true;
+tags["minimal"] = true;
+tags["post.rock"] = true;
+tags["apps.windows"] = true;
+tags["disco"] = true;
+tags["deep.house"] = true;
+tags["breaks"] = true;
+tags["soundtrack"] = true;
+tags["black.metal"] = true;
+tags["lo.fi"] = true;
+tags["electro"] = true;
+tags["instrumental"] = true;
+tags["live"] = true;
+tags["noise"] = true;
+tags["apps.mac"] = true;
+tags["avant.garde"] = true;
+tags["psytrance"] = true;
+tags["death.metal"] = true;
+tags["french"] = true;
+tags["synth.pop"] = true;
+tags["audio.books"] = true;
+tags["dub"] = true;
+tags["trip.hop"] = true;
+tags["new.age"] = true;
+tags["acoustic"] = true;
+tags["jpop"] = true;
+tags["drone"] = true;
+tags["garage"] = true;
+tags["delete.this.tag"] = true;
+tags["kpop"] = true;
+tags["progressive.house"] = true;
+tags["australia"] = true;
+tags["ebooks.fiction"] = true;
+tags["latin"] = true;
+tags["emo"] = true;
+tags["bluegrass"] = true;
+tags["comedy"] = true;
+tags["ska"] = true;
+tags["indie.rock"] = true;
+tags["apps.sound"] = true;
+tags["japanese"] = true;
+tags["hard.rock"] = true;
+tags["shoegaze"] = true;
+tags["piano"] = true;
+tags["new.wave"] = true;
+tags["german"] = true;
+tags["abstract"] = true;
+tags["free.jazz"] = true;
+tags["freely.available"] = true;
+tags["punk.rock"] = true;
+tags["2000s"] = true;
+tags["post.punk"] = true;
+tags["fiction"] = true;
+tags["breakbeat"] = true;
+tags["jam.band"] = true;
+tags["bass"] = true;
+tags["singer.songwriter"] = true;
+tags["electro.house"] = true;
+tags["christian"] = true;
+tags["canada"] = true;
+tags["acid"] = true;
+tags["indie.pop"] = true;
+tags["swedish"] = true;
+tags["marvel"] = true;
+tags["glitch"] = true;
+tags["pop.punk"] = true;
+tags["progressive.trance"] = true;
+tags["heavy.metal"] = true;
+tags["uk.garage"] = true;
+tags["thrash.metal"] = true;
+tags["score"] = true;
+tags["folk.rock"] = true;
+tags["americana"] = true;
+tags["post.hardcore"] = true;
+tags["2010s"] = true;
+tags["lounge"] = true;
+tags["fusion"] = true;
+tags["euro.house"] = true;
+tags["grunge"] = true;
+tags["metalcore"] = true;
+tags["power.pop"] = true;
+tags["alternative.rock"] = true;
+tags["christmas"] = true;
+tags["progressive"] = true;
+tags["united.states"] = true;
+tags["guitar"] = true;
+tags["doom.metal"] = true;
+tags["progressive.metal"] = true;
+tags["electronica"] = true;
+tags["chillout"] = true;
+tags["dutch"] = true;
+tags["hardcore.dance"] = true;
+tags["science.fiction"] = true;
+tags["video.game"] = true;
+tags["power.metal"] = true;
+tags["vocal"] = true;
+tags["dark.ambient"] = true;
+tags["dream.pop"] = true;
+tags["alternative.country"] = true;
+tags["swing"] = true;
+tags["epub"] = true;
+tags["brazil"] = true;
+tags["ebm"] = true;
+tags["russian"] = true;
+tags["magazine"] = true;
+tags["sheet.music"] = true;
+tags["grime"] = true;
+tags["celtic"] = true;
+tags["non.fiction"] = true;
+tags["pop.rock"] = true;
+tags["jungle"] = true;
+tags["grindcore"] = true;
+tags["opera"] = true;
+tags["classic.rock"] = true;
+tags["quebec"] = true;
+tags["gothic"] = true;
+tags["modern.classical"] = true;
+tags["dc.comics"] = true;
+tags["eurodance"] = true;
+tags["beats"] = true;
+tags["italian"] = true;
+tags["japan"] = true;
+tags["psychedelic.rock"] = true;
+tags["stoner.rock"] = true;
+tags["breakcore"] = true;
+tags["chanson"] = true;
+tags["dub.techno"] = true;
+tags["norwegian"] = true;
+tags["dancehall"] = true;
+tags["screamo"] = true;
+tags["deutsche.grammophon"] = true;
+tags["elearning.videos"] = true;
+tags["darkwave"] = true;
+tags["chiptune"] = true;
+tags["noise.rock"] = true;
+tags["free.improvisation"] = true;
+tags["france"] = true;
+tags["sweden"] = true;
+tags["fantasy"] = true;
+tags["melodic.death.metal"] = true;
+tags["krautrock"] = true;
+tags["gospel"] = true;
+tags["sludge"] = true;
+tags["chillwave"] = true;
+tags["hard.trance"] = true;
+tags["math.rock"] = true;
+tags["future.jazz"] = true;
+tags["rave"] = true;
+tags["roots"] = true;
+tags["mobi"] = true;
+tags["easy.listening"] = true;
+tags["goa.trance"] = true;
+tags["nonfiction"] = true;
+tags["rockabilly"] = true;
+tags["new.zealand"] = true;
+tags["dc"] = true;
+tags["vanity.house"] = true;
+tags["israeli"] = true;
+tags["club"] = true;
+tags["brazilian"] = true;
+tags["baroque"] = true;
+tags["hebrew"] = true;
+tags["acid.jazz"] = true;
+tags["britpop"] = true;
+tags["contemporary"] = true;
+tags["underground"] = true;
+tags["korean"] = true;
+tags["spanish"] = true;
+tags["germany"] = true;
+tags["samples"] = true;
+tags["world"] = true;
+tags["jam"] = true;
+tags["doom"] = true;
+tags["big.band"] = true;
+tags["leftfield"] = true;
+tags["stoner"] = true;
+tags["female.vocalist"] = true;
+tags["rock.and.roll"] = true;
+tags["anime"] = true;
+tags["irish"] = true;
+tags["surf"] = true;
+tags["norway"] = true;
+tags["canadian"] = true;
+tags["jrock"] = true;
+tags["nu.metal"] = true;
+tags["ebooks"] = true;
+tags["8bit"] = true;
+tags["space.rock"] = true;
+tags["blues.rock"] = true;
+tags["italo.disco"] = true;
+tags["post.bop"] = true;
+tags["finnish"] = true;
+tags["tribal"] = true;
+tags["gothic.metal"] = true;
+tags["holiday"] = true;
+tags["neofolk"] = true;
+tags["covers"] = true;
+tags["hardstyle"] = true;
+tags["uk"] = true;
+tags["remix"] = true;
+tags["portugal"] = true;
+tags["game"] = true;
+tags["science"] = true;
+tags["united.kingdom"] = true;
+tags["clubhouse"] = true;
+tags["mpb"] = true;
+tags["finland"] = true;
+tags["mashup"] = true;
+tags["southern.rock"] = true;
+
diff --git a/static/styles/musicbrainz.css b/static/styles/musicbrainz.css
new file mode 100644
index 00000000..ba49b6fe
--- /dev/null
+++ b/static/styles/musicbrainz.css
@@ -0,0 +1,49 @@
+#popup_background {
+ display: none;
+ position: fixed;
+ height: 100%;
+ width: 100%;
+ top: 0;
+ left: 0;
+ z-index: 1;
+}
+#musicbrainz_popup {
+ display: none;
+ position: absolute;
+ overflow: auto;
+ left: 25%;
+ right: 25%;
+ background: #FFFFFF;
+ border: 2px solid #cecece;
+ z-index: 2;
+ padding: 12px;
+ font-size: 13px;
+}
+#musicbrainz_popup h1 {
+ text-align: left;
+ color: #6FA5FD;
+ font-size: 22px;
+ font-weight: 700;
+ padding-bottom: 2px;
+ margin-bottom: 0px;
+}
+#musicbrainz_popup h2 {
+ text-align: left;
+ color: #6FA5FD;
+ font-size: 17px;
+ font-weight: 700;
+ border-bottom: 1px dotted #D3D3D3;
+ margin-bottom: 20px;
+}
+
+#popup_close {
+ font-size: 20px;
+ line-height: 14px;
+ right: 6px;
+ top: 4px;
+ position: absolute;
+ color: #6fa5fd;
+ font-weight: 700;
+ display: block;
+}
+