diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js
index 8022d5177a..39bad760d0 100644
--- a/dashboard-ui/scripts/itemdetailpage.js
+++ b/dashboard-ui/scripts/itemdetailpage.js
@@ -83,7 +83,7 @@
$('#playButtonContainer', page).hide();
$('#playExternalButtonContainer', page).hide();
}
-
+
if (item.LocalTrailerCount && item.LocationType !== "Offline") {
$('#trailerButtonContainer', page).show();
} else {
@@ -407,15 +407,13 @@
continue;
}
- var friendlyTypeName = item.Type == "Audio" ? "song" : item.Type.toLowerCase();
-
if (curr.IndexNumber < item.IndexNumber) {
- $('.lnkPreviousItem', page).removeClass('hide').attr('href', 'itemdetails.html?id=' + curr.Id).html('← Previous ' + friendlyTypeName);
+ $('.lnkPreviousItem', page).removeClass('hide').attr('href', 'itemdetails.html?id=' + curr.Id).html('← Previous');
}
else if (curr.IndexNumber > item.IndexNumber) {
- $('.lnkNextItem', page).removeClass('hide').attr('href', 'itemdetails.html?id=' + curr.Id).html('Next ' + friendlyTypeName + ' →');
+ $('.lnkNextItem', page).removeClass('hide').attr('href', 'itemdetails.html?id=' + curr.Id).html('Next' + ' →');
}
}
});
@@ -531,12 +529,12 @@
function renderChildren(page, item, user) {
var fields = "ItemCounts,DateCreated,AudioInfo,PrimaryImageAspectRatio";
-
+
var query = {
ParentId: item.Id,
Fields: fields
};
-
+
// Let the server pre-sort boxsets
if (item.Type !== "BoxSet") {
query.SortBy = "SortName";
@@ -1127,7 +1125,7 @@
});
$('#btnPlayTrailer', page).on('click', function () {
-
+
ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), currentItem.Id).done(function (trailers) {
MediaPlayer.play(trailers);
diff --git a/dashboard-ui/scripts/libraryfileorganizer.js b/dashboard-ui/scripts/libraryfileorganizer.js
new file mode 100644
index 0000000000..4148967bfe
--- /dev/null
+++ b/dashboard-ui/scripts/libraryfileorganizer.js
@@ -0,0 +1,128 @@
+(function ($, document, window) {
+
+ function updateSeasonPatternHelp(page, value) {
+
+ var replacementHtmlResult = 'Result: ' + value.replace('%s', '1').replace('%0s', '01').replace('%00s', '001');
+
+ $('.seasonFolderFieldDescription', page).html(replacementHtmlResult);
+ }
+
+ function updateEpisodePatternHelp(page, value) {
+
+ var seriesName = "Series Name";
+ var episodeTitle = "Episode Four";
+
+ value = value.replace('%sn', seriesName)
+ .replace('%s.n', seriesName.replace(' ', '.'))
+ .replace('%s_n', seriesName.replace(' ', '_'))
+ .replace('%s', '1')
+ .replace('%0s', '01')
+ .replace('%00s', '001')
+ .replace('%ext', 'mkv')
+ .replace('%en', episodeTitle)
+ .replace('%e.n', episodeTitle.replace(' ', '.'))
+ .replace('%e_n', episodeTitle.replace(' ', '_'))
+ .replace('%e', '4')
+ .replace('%0e', '04')
+ .replace('%00e', '004');
+
+ var replacementHtmlResult = 'Result: ' + value;
+
+ $('.episodePatternDescription', page).html(replacementHtmlResult);
+ }
+
+ function loadPage(page, config) {
+
+ var tvOptions = config.TvFileOrganizationOptions;
+
+ $('#chkEnableTvSorting', page).checked(tvOptions.IsEnabled).checkboxradio('refresh');
+ $('#chkOverwriteExistingEpisodes', page).checked(tvOptions.OverwriteExistingEpisodes).checkboxradio('refresh');
+ $('#chkDeleteEmptyFolders', page).checked(tvOptions.DeleteEmptyFolders).checkboxradio('refresh');
+ $('#chkEnableTrialMode', page).checked(tvOptions.EnableTrialMode).checkboxradio('refresh');
+
+ $('#txtMinFileSize', page).val(tvOptions.MinFileSizeMb);
+ $('#txtSeasonFolderPattern', page).val(tvOptions.SeasonFolderPattern).trigger('change');
+ $('#txtSeasonZeroName', page).val(tvOptions.SeasonZeroFolderName);
+ $('#txtWatchFolder', page).val(tvOptions.WatchLocations[0] || '');
+
+ $('#txtEpisodePattern', page).val(tvOptions.EpisodeNamePattern).trigger('change');
+ }
+
+ $(document).on('pageinit', "#libraryFileOrganizerPage", function () {
+
+ var page = this;
+
+ $('#txtSeasonFolderPattern', page).on('change keypress', function() {
+
+ updateSeasonPatternHelp(page, this.value);
+
+ });
+
+ $('#txtEpisodePattern', page).on('change keypress', function () {
+
+ updateEpisodePatternHelp(page, this.value);
+
+ });
+
+ $('#btnSelectWatchFolder', page).on("click.selectDirectory", function () {
+
+ var picker = new DirectoryBrowser(page);
+
+ picker.show({
+
+ callback: function (path) {
+
+ if (path) {
+ $('#txtWatchFolder', page).val(path);
+ }
+ picker.close();
+ },
+
+ header: "Select Watch Folder",
+
+ instruction: "Browse or enter the path to your watch folder. The folder must be writeable."
+ });
+ });
+
+ }).on('pageshow', "#libraryFileOrganizerPage", function () {
+
+ var page = this;
+
+ ApiClient.getServerConfiguration().done(function (config) {
+ loadPage(page, config);
+ });
+ });
+
+ window.LibraryFileOrganizerPage = {
+
+ onSubmit: function() {
+
+ var form = this;
+
+ ApiClient.getServerConfiguration().done(function (config) {
+
+ var tvOptions = config.TvFileOrganizationOptions;
+
+ tvOptions.IsEnabled = $('#chkEnableTvSorting', form).checked();
+ tvOptions.OverwriteExistingEpisodes = $('#chkOverwriteExistingEpisodes', form).checked();
+ tvOptions.DeleteEmptyFolders = $('#chkDeleteEmptyFolders', form).checked();
+ tvOptions.EnableTrialMode = $('#chkEnableTrialMode', form).checked();
+
+ tvOptions.MinFileSizeMb = $('#txtMinFileSize', form).val();
+ tvOptions.SeasonFolderPattern = $('#txtSeasonFolderPattern', form).val();
+ tvOptions.SeasonZeroFolderName = $('#txtSeasonZeroName', form).val();
+
+ tvOptions.EpisodeNamePattern = $('#txtEpisodePattern', form).val();
+
+ var watchLocation = $('#txtWatchFolder', form).val();
+ tvOptions.WatchLocations = watchLocation ? [watchLocation] : [];
+
+ ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
+ });
+
+ return false;
+ }
+
+ };
+
+})(jQuery, document, window);
diff --git a/dashboard-ui/scripts/livetvchannel.js b/dashboard-ui/scripts/livetvchannel.js
index fd03333d09..7e0177b4b6 100644
--- a/dashboard-ui/scripts/livetvchannel.js
+++ b/dashboard-ui/scripts/livetvchannel.js
@@ -57,9 +57,6 @@
var name = program.Name;
- if (program.IsRepeat) {
- name += " (R)";
- }
html += '
' + name + '
';
html += '
';
diff --git a/dashboard-ui/scripts/livetvchannels.js b/dashboard-ui/scripts/livetvchannels.js
index a77cd7871d..5932584565 100644
--- a/dashboard-ui/scripts/livetvchannels.js
+++ b/dashboard-ui/scripts/livetvchannels.js
@@ -10,7 +10,7 @@
return LibraryBrowser.getPosterViewHtml({
items: channels,
useAverageAspectRatio: true,
- shape: "backdrop",
+ shape: "smallBackdrop",
centerText: true
});
}
diff --git a/dashboard-ui/scripts/livetvguide.js b/dashboard-ui/scripts/livetvguide.js
index 591c78e547..cecbeb0ed8 100644
--- a/dashboard-ui/scripts/livetvguide.js
+++ b/dashboard-ui/scripts/livetvguide.js
@@ -257,9 +257,6 @@
html += '
';
html += program.Name;
- if (program.IsRepeat) {
- html += ' (R)';
- }
html += '
';
html += '
';
diff --git a/dashboard-ui/scripts/livetvprogram.js b/dashboard-ui/scripts/livetvprogram.js
index 9a7c25e211..230b3fb9b0 100644
--- a/dashboard-ui/scripts/livetvprogram.js
+++ b/dashboard-ui/scripts/livetvprogram.js
@@ -32,10 +32,6 @@
var name = item.Name;
- if (item.IsRepeat) {
- name += ' (R)';
- }
-
$('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item));
Dashboard.setPageTitle(name);
@@ -127,6 +123,15 @@
deleteTimer(page, currentItem.TimerId);
});
+ $('#btnRemote', page).on('click', function () {
+
+ RemoteControl.showMenuForItem({
+
+ item: currentItem,
+ context: 'livetv'
+ });
+ });
+
}).on('pageshow', "#liveTvProgramPage", function () {
var page = this;
diff --git a/dashboard-ui/scripts/livetvrecording.js b/dashboard-ui/scripts/livetvrecording.js
index cc1fc7b9bb..9eab912b83 100644
--- a/dashboard-ui/scripts/livetvrecording.js
+++ b/dashboard-ui/scripts/livetvrecording.js
@@ -107,6 +107,15 @@
$('#btnDelete', page).on('click', deleteRecording);
$('#btnPlay', page).on('click', play);
+ $('#btnRemote', page).on('click', function () {
+
+ RemoteControl.showMenuForItem({
+
+ item: currentItem,
+ context: 'livetv'
+ });
+ });
+
}).on('pagebeforeshow', "#liveTvRecordingPage", function () {
var page = this;
diff --git a/dashboard-ui/scripts/livetvseriestimer.js b/dashboard-ui/scripts/livetvseriestimer.js
index 13dd646efc..10c74ca7b9 100644
--- a/dashboard-ui/scripts/livetvseriestimer.js
+++ b/dashboard-ui/scripts/livetvseriestimer.js
@@ -172,12 +172,20 @@
html += '
';
html += program.EpisodeTitle || timer.Name;
- if (program.IsRepeat) {
- html += ' (R)';
- }
html += '
';
html += '
';
+
+ if (program.IsLive) {
+ html += 'LIVE ';
+ }
+ else if (program.IsPremiere) {
+ html += 'PREMIERE ';
+ }
+ else if (program.IsSeries && !program.IsRepeat) {
+ html += 'NEW ';
+ }
+
html += LiveTvHelpers.getDisplayTime(timer.StartDate);
html += ' - ' + LiveTvHelpers.getDisplayTime(timer.EndDate);
html += '
';
diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js
index 11203d4f57..c8464a957c 100644
--- a/dashboard-ui/scripts/mediaplayer.js
+++ b/dashboard-ui/scripts/mediaplayer.js
@@ -1720,7 +1720,7 @@
}
}
- html += '
' + (language || 'Unknown language') + '
';
+ html += '
' + (language || stream.Language || 'Unknown language') + '
';
var options = [];