diff --git a/dashboard-ui/edititemmetadata.html b/dashboard-ui/edititemmetadata.html
index 3e971118de..b09e779616 100644
--- a/dashboard-ui/edititemmetadata.html
+++ b/dashboard-ui/edititemmetadata.html
@@ -264,6 +264,20 @@
+
diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html
index 42f3f85ee2..580fba3891 100644
--- a/dashboard-ui/itemdetails.html
+++ b/dashboard-ui/itemdetails.html
@@ -137,6 +137,9 @@
+
+ Play
+
diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js
index dbe8d5da2e..b6d1bcad3d 100644
--- a/dashboard-ui/scripts/Itemdetailpage.js
+++ b/dashboard-ui/scripts/Itemdetailpage.js
@@ -64,9 +64,22 @@
}
if (MediaPlayer.canPlay(item) && item.LocationType !== "Offline" && item.LocationType !== "Virtual") {
- $('#playButtonContainer', page).show();
+
+ var url = MediaPlayer.getPlayUrl(item);
+
+ if (url) {
+ $('#playExternalButtonContainer', page).show();
+ $('#playButtonContainer', page).hide();
+ } else {
+ $('#playButtonContainer', page).show();
+ $('#playExternalButtonContainer', page).hide();
+ }
+
+ $('#btnPlayExternal', page).attr('href', url || '#');
+
} else {
$('#playButtonContainer', page).hide();
+ $('#playExternalButtonContainer', page).hide();
}
$(".autoNumeric").autoNumeric('init');
diff --git a/dashboard-ui/scripts/edititemmetadata.js b/dashboard-ui/scripts/edititemmetadata.js
index 0e2ed096df..343ae68b3f 100644
--- a/dashboard-ui/scripts/edititemmetadata.js
+++ b/dashboard-ui/scripts/edititemmetadata.js
@@ -425,6 +425,14 @@
$('#fldGamesDb', page).hide();
}
+ if (item.MediaType == "Game" && (item.GameSystem == "Nintendo" || item.GameSystem == "Super Nintendo")) {
+ $('#fldNesBoxName', page).show();
+ $('#fldNesBoxRom', page).show();
+ } else {
+ $('#fldNesBoxName', page).hide();
+ $('#fldNesBoxRom', page).hide();
+ }
+
if (item.MediaType == "Game") {
$('#fldPlayers', page).show();
} else {
@@ -714,6 +722,8 @@
$('#txtMusicBrainzReleaseGroupId', page).val(providerIds.MusicBrainzReleaseGroup || "");
$('#txtRottenTomatoes', page).val(providerIds.RottenTomatoes || "");
$('#txtZap2It', page).val(providerIds.Zap2It || "");
+ $('#txtNesBoxName', page).val(providerIds.NesBox || "");
+ $('#txtNesBoxRom', page).val(providerIds.NesBoxRom || "");
if (item.RunTimeTicks) {
@@ -951,7 +961,9 @@
Musicbrainz: $('#txtMusicBrainz', form).val(),
MusicBrainzReleaseGroup: $('#txtMusicBrainzReleaseGroupId', form).val(),
RottenTomatoes: $('#txtRottenTomatoes', form).val(),
- Zap2It: $('#txtZap2It', form).val()
+ Zap2It: $('#txtZap2It', form).val(),
+ NesBox: $('#txtNesBoxName', form).val(),
+ NesBoxRom: $('#txtNesBoxRom', form).val()
}
};
@@ -1053,6 +1065,35 @@
});
+ $('#txtNesBoxName', this).on('change', function () {
+
+ var val = this.value;
+ var urlPrefix = currentItem.GameSystem == "Nintendo" ? "http://nesbox.com/game/" : "http://snesbox.com/game/";
+
+ if (val) {
+
+ $('#btnOpenNesBox', page).attr('href', urlPrefix + val);
+ } else {
+ $('#btnOpenNesBox', page).attr('href', '#');
+ }
+
+ });
+
+ $('#txtNesBoxRom', this).on('change', function () {
+
+ var val = this.value;
+ var romName = $('#txtNesBoxName', page).val();
+ var urlPrefix = currentItem.GameSystem == "Nintendo" ? "http://nesbox.com/game/" : "http://snesbox.com/game/";
+
+ if (val && romName) {
+
+ $('#btnOpenNesBoxRom', page).attr('href', urlPrefix + romName + '/rom/' + val);
+ } else {
+ $('#btnOpenNesBoxRom', page).attr('href', '#');
+ }
+
+ });
+
$('#txtImdb', this).on('change', function () {
var val = this.value;
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index 883b45dcd1..37ded5ab7f 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -1278,9 +1278,19 @@
links.push('
MusicBrainz Release Group');
}
- if (providerIds.Gamesdb)
+ if (providerIds.Gamesdb) {
links.push('
GamesDB');
+ }
+ if (providerIds.NesBox) {
+
+ if (item.GameSystem == "Nintendo") {
+ links.push('
NESbox');
+ }
+ else if (item.GameSystem == "Super Nintendo") {
+ links.push('
SNESbox');
+ }
+ }
if (providerIds.Zap2It)
links.push('
Zap2It');
diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js
index 5d232b882f..3ed21acf45 100644
--- a/dashboard-ui/scripts/mediaplayer.js
+++ b/dashboard-ui/scripts/mediaplayer.js
@@ -750,9 +750,34 @@
if (item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "Artist" || item.Type == "MusicGenre") {
return true;
}
+
+ if (item.GameSystem == "Nintendo" && item.MediaType == "Game" && item.ProviderIds.NesBox && item.ProviderIds.NesBoxRom) {
+ return true;
+ }
+
+ if (item.GameSystem == "Super Nintendo" && item.MediaType == "Game" && item.ProviderIds.NesBox && item.ProviderIds.NesBoxRom) {
+ return true;
+ }
+
return self.canPlayMediaType(item.MediaType);
};
+ self.getPlayUrl = function(item) {
+
+
+ if (item.GameSystem == "Nintendo" && item.MediaType == "Game" && item.ProviderIds.NesBox && item.ProviderIds.NesBoxRom) {
+
+ return "http://nesbox.com/game/" + item.ProviderIds.NesBox + '/rom/' + item.ProviderIds.NesBoxRom;
+ }
+
+ if (item.GameSystem == "Super Nintendo" && item.MediaType == "Game" && item.ProviderIds.NesBox && item.ProviderIds.NesBoxRom) {
+
+ return "http://snesbox.com/game/" + item.ProviderIds.NesBox + '/rom/' + item.ProviderIds.NesBoxRom;
+ }
+
+ return null;
+ };
+
self.canPlayMediaType = function (mediaType) {
var media;
@@ -785,7 +810,7 @@
Dashboard.getCurrentUser().done(function (user) {
var item = items[0];
-
+
var videoType = (item.VideoType || "").toLowerCase();
var expirementalText = "This feature is experimental. It may not work at all with some titles. Do you wish to continue?";