-
+
-
+
Leave empty to inherit settings from a parent item, or the global default value.
-
+
Leave empty to inherit settings from a parent item, or the global default value.
diff --git a/dashboard-ui/scripts/edititemimages.js b/dashboard-ui/scripts/edititemimages.js
index 00272fbe3..cfaf490b6 100644
--- a/dashboard-ui/scripts/edititemimages.js
+++ b/dashboard-ui/scripts/edititemimages.js
@@ -6,6 +6,7 @@
var browsableImagePageSize = 10;
var browsableImageStartIndex = 0;
var browsableImageType = 'Primary';
+ var selectedProvider;
function updateTabs(page, item) {
@@ -56,7 +57,7 @@
options.startIndex = browsableImageStartIndex;
options.limit = browsableImagePageSize;
- var provider = $('#selectImageProvider', page).val();
+ var provider = selectedProvider || '';
if (provider) {
options.ProviderName = provider;
@@ -254,6 +255,10 @@
Dashboard.showLoadingMsg();
+ browsableImageStartIndex = 0;
+ browsableImageType = 'Primary';
+ selectedProvider = null;
+
MetadataEditor.getItemPromise().done(function (item) {
currentItem = item;
@@ -529,7 +534,6 @@
var page = this;
-
$('.libraryTree', page).on('itemclicked', function (event, data) {
if (data.id != currentItem.Id) {
@@ -542,15 +546,14 @@
//$.mobile.urlHistory.ignoreNextHashChange = true;
window.location.hash = 'editItemImagesPage?id=' + data.id;
- browsableImageStartIndex = 0;
- browsableImageType = 'Primary';
-
reload(page);
}
});
$('.lnkBrowseImages', page).on('click', function () {
+ selectedProvider = null;
+
reloadBrowsableImages(page);
});
@@ -558,6 +561,7 @@
browsableImageType = this.value;
browsableImageStartIndex = 0;
+ selectedProvider = null;
reloadBrowsableImages(page);
});
@@ -565,6 +569,7 @@
$('#selectImageProvider', page).on('change', function () {
browsableImageStartIndex = 0;
+ selectedProvider = this.value;
reloadBrowsableImages(page);
});
@@ -575,9 +580,6 @@
reload(page);
- browsableImageStartIndex = 0;
- browsableImageType = 'Primary';
-
$('#uploadImage', page).on("change", function () {
setFiles(page, this.files);
});
diff --git a/dashboard-ui/scripts/edititemmetadata.js b/dashboard-ui/scripts/edititemmetadata.js
index 58eecd8c7..5f15d95c1 100644
--- a/dashboard-ui/scripts/edititemmetadata.js
+++ b/dashboard-ui/scripts/edititemmetadata.js
@@ -67,25 +67,6 @@
return { attr: { id: item.Id, rel: rel, itemtype: item.Type }, data: htmlName, state: state };
}
- function getLiveTvServiceNode(item, folderState) {
-
- var state = folderState;
-
- var name = item.Name;
-
- var cssClass = "editorNode";
-
- var htmlName = "
";
-
- htmlName += name;
-
- htmlName += "
";
-
- var rel = item.IsFolder ? 'folder' : 'default';
-
- return { attr: { id: item.Name, rel: rel, itemtype: 'livetvservice' }, data: htmlName, state: state };
- }
-
function loadChildrenOfRootNode(callback) {
@@ -102,8 +83,21 @@
nodes.push(getNode(rootFolder, 'open'));
- if (liveTvInfo.Services.length) {
- nodes.push({ attr: { id: 'livetv', rel: 'folder', itemtype: 'livetv' }, data: 'Live TV', state: 'open' });
+ for (var i = 0, length = liveTvInfo.Services.length; i < length; i++) {
+
+ var service = liveTvInfo.Services[i];
+
+ var name = service.Name;
+
+ var cssClass = "editorNode";
+
+ var htmlName = "
";
+
+ htmlName += name;
+
+ htmlName += "
";
+
+ nodes.push({ attr: { id: name, rel: 'folder', itemtype: 'livetvservice' }, data: htmlName, state: 'closed' });
}
callback(nodes);
@@ -111,24 +105,6 @@
});
}
- function loadLiveTvServices(openItems, callback) {
-
- ApiClient.getLiveTvInfo().done(function (info) {
-
- var nodes = info.Services.map(function (i) {
-
- var state = openItems.indexOf(i.Id) == -1 ? 'closed' : 'open';
-
- return getLiveTvServiceNode(i, state);
-
- });
-
- callback(nodes);
-
- });
-
- }
-
function loadLiveTvChannels(service, openItems, callback) {
ApiClient.getLiveTvChannels({ ServiceName: service }).done(function (result) {
@@ -157,12 +133,6 @@
var id = node.attr("id");
- if (id == 'livetv') {
-
- loadLiveTvServices(openItems, callback);
- return;
- }
-
var itemtype = node.attr("itemtype");
if (itemtype == 'livetvservice') {
@@ -690,6 +660,18 @@
$('#fldMusicBrainzAlbumArtistId', page).hide();
}
+ if (item.Type == "MusicArtist" || item.Type == "MusicAlbum") {
+ $('#fldAudioDbArtistId', page).show();
+ } else {
+ $('#fldAudioDbArtistId', page).hide();
+ }
+
+ if (item.Type == "MusicAlbum") {
+ $('#fldAudioDbAlbumId', page).show();
+ } else {
+ $('#fldAudioDbAlbumId', page).hide();
+ }
+
if (item.Type == "MusicArtist" || item.Type == "Audio") {
$('#fldMusicBrainzArtistId', page).show();
} else {
@@ -989,6 +971,8 @@
$('#txtMusicBrainzArtistId', page).val(providerIds.MusicBrainzArtist || "");
$('#txtMusicBrainzAlbumId', page).val(providerIds.MusicBrainzAlbum || "");
$('#txtMusicBrainzAlbumArtistId', page).val(providerIds.MusicBrainzAlbumArtist || "");
+ $('#txtAudioDbArtist', page).val(providerIds.AudioDbArtist || "");
+ $('#txtAudioDbAlbum', page).val(providerIds.AudioDbAlbum || "");
$('#txtMusicBrainzReleaseGroupId', page).val(providerIds.MusicBrainzReleaseGroup || "");
$('#txtRottenTomatoes', page).val(providerIds.RottenTomatoes || "");
$('#txtZap2It', page).val(providerIds.Zap2It || "");
@@ -1231,27 +1215,30 @@
LockedFields: $('.selectLockedField', form).map(function () {
var value = $(this).val();
if (value != '') return value;
- }).get(),
-
- ProviderIds:
- {
- Gamesdb: $('#txtGamesDb', form).val(),
- Imdb: $('#txtImdb', form).val(),
- Tmdb: $('#txtTmdb', form).val(),
- TmdbCollection: $('#txtTmdbCollection', form).val(),
- Tvdb: $('#txtTvdb', form).val(),
- Tvcom: $('#txtTvCom', form).val(),
- MusicBrainzAlbum: $('#txtMusicBrainzAlbumId', form).val(),
- MusicBrainzAlbumArtist: $('#txtMusicBrainzAlbumArtistId', form).val(),
- MusicBrainzArtist: $('#txtMusicBrainzArtistId', form).val(),
- MusicBrainzReleaseGroup: $('#txtMusicBrainzReleaseGroupId', form).val(),
- RottenTomatoes: $('#txtRottenTomatoes', form).val(),
- Zap2It: $('#txtZap2It', form).val(),
- NesBox: $('#txtNesBoxName', form).val(),
- NesBoxRom: $('#txtNesBoxRom', form).val()
- }
+ }).get()
};
+ item.ProviderIds = $.extend(currentItem.ProviderIds, {
+
+ Gamesdb: $('#txtGamesDb', form).val(),
+ Imdb: $('#txtImdb', form).val(),
+ Tmdb: $('#txtTmdb', form).val(),
+ TmdbCollection: $('#txtTmdbCollection', form).val(),
+ Tvdb: $('#txtTvdb', form).val(),
+ Tvcom: $('#txtTvCom', form).val(),
+ AudioDbArtist: $('#txtAudioDbArtist', form).val(),
+ AudioDbAlbum: $('#txtAudioDbAlbum', form).val(),
+ MusicBrainzAlbum: $('#txtMusicBrainzAlbumId', form).val(),
+ MusicBrainzAlbumArtist: $('#txtMusicBrainzAlbumArtistId', form).val(),
+ MusicBrainzArtist: $('#txtMusicBrainzArtistId', form).val(),
+ MusicBrainzReleaseGroup: $('#txtMusicBrainzReleaseGroupId', form).val(),
+ RottenTomatoes: $('#txtRottenTomatoes', form).val(),
+ Zap2It: $('#txtZap2It', form).val(),
+ NesBox: $('#txtNesBoxName', form).val(),
+ NesBoxRom: $('#txtNesBoxRom', form).val()
+
+ });
+
item.PreferredMetadataLanguage = $('#selectLanguage', form).val();
item.PreferredMetadataCountryCode = $('#selectCountry', form).val();
@@ -1321,12 +1308,6 @@
}
};
- self.sortDaysOfTheWeek = function (list) {
- var days = new Array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday");
- list.sort(function (a, b) { return days.indexOf(a) > days.indexOf(b); });
- return list;
- };
-
self.removeElementFromListview = function (source) {
var list = $(source).parents('ul[data-role="listview"]');
$(source).parent().remove();
@@ -1399,6 +1380,34 @@
});
+ $('#txtAudioDbArtist', this).on('change', function () {
+
+ var val = this.value;
+
+ if (val) {
+
+ $('#btnOpenAudioDbArtist', page).attr('href', 'http://www.theaudiodb.com/artist/' + val);
+
+ } else {
+ $('#btnOpenAudioDbArtist', page).attr('href', '#');
+ }
+
+ });
+
+ $('#txtAudioDbAlbum', this).on('change', function () {
+
+ var val = this.value;
+
+ if (val) {
+
+ $('#btnOpenAudioDbAlbum', page).attr('href', 'http://www.theaudiodb.com/album/' + val);
+
+ } else {
+ $('#btnOpenAudioDbAlbum', page).attr('href', '#');
+ }
+
+ });
+
$('#txtMusicBrainzAlbumId', this).on('change', function () {
var val = this.value;
@@ -1546,7 +1555,7 @@
refreshPromise = ApiClient.refreshStudio(currentItem.Name, force);
}
else {
- refreshPromise = ApiClient.refreshItem(currentItem.Id, force, $('#chkRecursive', page).checked());
+ refreshPromise = ApiClient.refreshItem(currentItem.Id, force, true);
}
refreshPromise.done(function () {
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index 66b37ca2b..290a28e0a 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -1118,7 +1118,7 @@
var displayIndexNumber = item.IndexNumber;
var number = "E" + displayIndexNumber;
-
+
if (includeParentInfo !== false) {
number = "S" + item.ParentIndexNumber + ", " + number;
}
@@ -1352,7 +1352,7 @@
links.push('
TheMovieDB');
else if (item.Type == "Series")
links.push('
TheMovieDB');
- }
+ }
if (providerIds.Tvdb) {
if (item.Type == "Series") {
@@ -1377,7 +1377,9 @@
}
if (providerIds.MusicBrainzArtist) {
- links.push('
MusicBrainz Artist');
+ var text = item.Type == "MusicArtist" ? "MusicBrainz" : "MusicBrainz Artist";
+
+ links.push('
' + text + '');
}
if (providerIds.MusicBrainzReleaseGroup) {
@@ -1385,6 +1387,20 @@
links.push('
MusicBrainz Release Group');
}
+ if (providerIds.AudioDbArtist) {
+
+ if (item.Type == "MusicArtist")
+ links.push('
TheAudioDB');
+ else
+ links.push('
TheAudioDB Artist');
+ }
+ if (providerIds.AudioDbAlbum) {
+
+ if (item.Type == "MusicAlbum")
+ links.push('
TheAudioDB');
+ else
+ links.push('
TheAudioDB Album');
+ }
if (providerIds.Gamesdb) {
links.push('
GamesDB');
}