diff --git a/dashboard-ui/metadatatv.html b/dashboard-ui/metadatatv.html
new file mode 100644
index 000000000..2fdc32f45
--- /dev/null
+++ b/dashboard-ui/metadatatv.html
@@ -0,0 +1,55 @@
+
+
+
+
Metadata
+
+
+
+
+
diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js
index 4b184d1b9..6ddb8167e 100644
--- a/dashboard-ui/scripts/Itemdetailpage.js
+++ b/dashboard-ui/scripts/Itemdetailpage.js
@@ -30,7 +30,7 @@
$('#offlineIndicator', page).hide();
}
- if (MediaPlayer.canPlay(item) && item.LocationType !== "Offline") {
+ if (MediaPlayer.canPlay(item) && item.LocationType !== "Offline" && item.LocationType !== "Virtual") {
$('#playButtonContainer', page).show();
} else {
$('#playButtonContainer', page).hide();
diff --git a/dashboard-ui/scripts/episodes.js b/dashboard-ui/scripts/episodes.js
index cf0b87737..5687c5a19 100644
--- a/dashboard-ui/scripts/episodes.js
+++ b/dashboard-ui/scripts/episodes.js
@@ -12,8 +12,8 @@
Fields: "DateCreated,SeriesInfo",
StartIndex: 0
};
-
- LibraryBrowser.loadSavedQueryValues('episodes', query);
+
+ LibraryBrowser.loadSavedQueryValues('episodes', query);
function reloadItems(page) {
@@ -61,13 +61,25 @@
query.StartIndex = 0;
reloadItems(page);
});
-
- LibraryBrowser.saveQueryValues('episodes', query);
+
+ LibraryBrowser.saveQueryValues('episodes', query);
Dashboard.hideLoadingMsg();
});
}
+ function formatDigit(i) {
+ return i < 10 ? "0" + i : i;
+ }
+
+ function getDateFormat(date) {
+
+ // yyyyMMddHHmmss
+ var d = date;
+
+ return "" + d.getFullYear() + formatDigit(d.getMonth() + 1) + formatDigit(d.getDate()) + formatDigit(d.getHours()) + formatDigit(d.getMinutes()) + formatDigit(d.getSeconds());
+ }
+
$(document).on('pageinit', "#episodesPage", function () {
var page = this;
@@ -166,6 +178,24 @@
reloadItems(page);
});
+ $('#chkMissingEpisode', this).on('change', function () {
+
+ query.LocationTypes = this.checked ? "virtual" : null;
+ query.MaxPremiereDate = this.checked ? getDateFormat(new Date()) : null;
+ query.HasPremiereDate = this.checked ? true : null;
+
+ reloadItems(page);
+ });
+
+ $('#chkFutureEpisode', this).on('change', function () {
+
+ query.LocationTypes = this.checked ? "virtual" : null;
+ query.MinPremiereDate = this.checked ? getDateFormat(new Date()) : null;
+ query.HasPremiereDate = this.checked ? true : null;
+
+ reloadItems(page);
+ });
+
$('.alphabetPicker', this).on('alphaselect', function (e, character) {
query.NameStartsWithOrGreater = character;
@@ -229,10 +259,10 @@
$('#chkSubtitle', this).checked(query.HasSubtitles == true).checkboxradio('refresh');
$('#chkTrailer', this).checked(query.HasTrailer == true).checkboxradio('refresh');
- $('#chkSpecialFeature', this).checked(query.HasSpecialFeature == true).checkboxradio('refresh');
$('#chkThemeSong', this).checked(query.HasThemeSong == true).checkboxradio('refresh');
$('#chkThemeVideo', this).checked(query.HasThemeVideo == true).checkboxradio('refresh');
$('#chkSpecialFeature', this).checked(query.ParentIndexNumber == 0).checkboxradio('refresh');
+ $('#chkMissingEpisode', this).checked(query.LocationTypes == "virtual").checkboxradio('refresh');
$('.alphabetPicker', this).alphaValue(query.NameStartsWithOrGreater);
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index 97e9c61b9..dd8327f12 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -842,6 +842,10 @@
},
getNewIndicatorHtml: function (item) {
+ if (item.LocationType == 'Virtual') {
+ return '';
+ }
+
if (item.Type == "Season") {
if (item.RecursiveUnplayedItemCount) {
return '
' + item.RecursiveUnplayedItemCount + ' New
';
@@ -1785,7 +1789,7 @@
renderStudios: function (elem, item, context) {
- if (item.Studios && item.Studios.length) {
+ if (item.Studios && item.Studios.length && item.Type != "Series") {
var prefix = item.Studios.length > 1 ? "Studios" : "Studio";
var html = prefix + ': ';
diff --git a/dashboard-ui/scripts/metadataconfigurationpage.js b/dashboard-ui/scripts/metadataconfigurationpage.js
index d1b206e59..53d07fd7b 100644
--- a/dashboard-ui/scripts/metadataconfigurationpage.js
+++ b/dashboard-ui/scripts/metadataconfigurationpage.js
@@ -43,7 +43,6 @@
$('#selectLanguage', page).val(config.PreferredMetadataLanguage).selectmenu("refresh");
$('#selectCountry', page).val(config.MetadataCountryCode).selectmenu("refresh");
$('#chkEnableInternetProviders', page).checked(config.EnableInternetProviders).checkboxradio("refresh");
- $('#chkEnableTvdbUpdates', page).checked(config.EnableTvDbUpdates).checkboxradio("refresh");
$('#chkEnableTmdbPersonUpdates', page).checked(config.EnableTmdbUpdates).checkboxradio("refresh");
Dashboard.hideLoadingMsg();
@@ -89,7 +88,6 @@
ApiClient.getServerConfiguration().done(function (config) {
config.EnableTmdbUpdates = $('#chkEnableTmdbPersonUpdates', form).checked();
- config.EnableTvDbUpdates = $('#chkEnableTvdbUpdates', form).checked();
config.EnableInternetProviders = $('#chkEnableInternetProviders', form).checked();
config.SaveLocalMeta = $('#chkSaveLocal', form).checked();
config.MetadataRefreshDays = $('#txtRefreshDays', form).val();
diff --git a/dashboard-ui/scripts/metadatatv.js b/dashboard-ui/scripts/metadatatv.js
new file mode 100644
index 000000000..a56e962c9
--- /dev/null
+++ b/dashboard-ui/scripts/metadatatv.js
@@ -0,0 +1,52 @@
+var MetadataTVPage = {
+
+ onPageShow: function () {
+ Dashboard.showLoadingMsg();
+
+ var page = this;
+
+ ApiClient.getServerConfiguration().done(function (result) {
+
+ MetadataTVPage.load(page, result);
+ });
+ },
+
+ load: function (page, config) {
+
+ var chkEnableTvdbUpdates = $('#chkEnableTvdbUpdates', page).checked(config.EnableTvDbUpdates).checkboxradio("refresh");
+ var chkCreateMissingEpisodes = $('#chkCreateMissingEpisodes', page).checked(config.CreateVirtualMissingEpisodes).checkboxradio("refresh");
+ var chkCreateFutureEpisodes = $('#chkCreateFutureEpisodes', page).checked(config.CreateVirtualFutureEpisodes).checkboxradio("refresh");
+
+ if (config.EnableInternetProviders) {
+ chkEnableTvdbUpdates.checkboxradio("enable");
+ chkCreateMissingEpisodes.checkboxradio("enable");
+ chkCreateFutureEpisodes.checkboxradio("enable");
+ } else {
+ chkEnableTvdbUpdates.checkboxradio("disable");
+ chkCreateMissingEpisodes.checkboxradio("disable");
+ chkCreateFutureEpisodes.checkboxradio("disable");
+ }
+
+ Dashboard.hideLoadingMsg();
+ },
+
+ onSubmit: function () {
+ var form = this;
+
+ Dashboard.showLoadingMsg();
+
+ ApiClient.getServerConfiguration().done(function (config) {
+
+ config.EnableTvDbUpdates = $('#chkEnableTvdbUpdates', form).checked();
+ config.CreateVirtualMissingEpisodes = $('#chkCreateMissingEpisodes', form).checked();
+ config.CreateVirtualFutureEpisodes = $('#chkCreateFutureEpisodes', form).checked();
+
+ ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
+ });
+
+ // Disable default form submission
+ return false;
+ }
+};
+
+$(document).on('pageshow', "#metadataTvPage", MetadataTVPage.onPageShow);
\ No newline at end of file
diff --git a/dashboard-ui/scripts/remotecontrol.js b/dashboard-ui/scripts/remotecontrol.js
index 74f3d2eda..fdda2c6b1 100644
--- a/dashboard-ui/scripts/remotecontrol.js
+++ b/dashboard-ui/scripts/remotecontrol.js
@@ -288,7 +288,7 @@
browseButtonContainer.show();
- if (item.Type != 'Person' && item.Type != 'Genre' && item.Type != 'Studio' && item.Type != 'GameGenre' && item.Type != 'MusicGenre') {
+ if (item.Type != 'Person' && item.Type != 'Genre' && item.Type != 'Studio' && item.Type != 'GameGenre' && item.Type != 'MusicGenre' && item.LocationType != 'Virtual') {
playButtonContainer.show();
queueButtonContainer.show();
}
@@ -457,7 +457,11 @@
html += '
';
html += '