From 433cee5164828617ee9fff16a463a032d6673aaf Mon Sep 17 00:00:00 2001
From: Luke Pulverenti Container: ' + (profile.Container || 'All') + ' ' + Globalize.translate('ValueContainer').replace('{0}', (profile.Container || allText)) + ' Video Codec: ' + (profile.VideoCodec || 'All') + ' Audio Codec: ' + (profile.AudioCodec || 'All') + ' ' + Globalize.translate('ValueVideoCodec').replace('{0}', (profile.VideoCodec || allText)) + ' ' + Globalize.translate('ValueAudioCodec').replace('{0}', (profile.AudioCodec || allText)) + ' Codec: ' + (profile.AudioCodec || 'All') + ' ' + Globalize.translate('ValueCodec').replace('{0}', (profile.AudioCodec || allText)) + ' Protocol: ' + (profile.Protocol || 'Http') + ' Container: ' + (profile.Container || 'All') + ' ' + Globalize.translate('ValueContainer').replace('{0}', (profile.Container || allText)) + ' Video Codec: ' + (profile.VideoCodec || 'All') + ' Audio Codec: ' + (profile.AudioCodec || 'All') + ' ' + Globalize.translate('ValueVideoCodec').replace('{0}', (profile.VideoCodec || allText)) + ' ' + Globalize.translate('ValueAudioCodec').replace('{0}', (profile.AudioCodec || allText)) + ' Codec: ' + (profile.AudioCodec || 'All') + ' ' + Globalize.translate('ValueCodec').replace('{0}', (profile.AudioCodec || allText)) + ' Container: ' + (profile.Container || 'All') + ' ' + Globalize.translate('ValueContainer').replace('{0}', (profile.Container || allText)) + ' Conditions: ';
- html += profile.Conditions.map(function (c) {
+ html += ' ';
+
+ html += Globalize.translate('ValueConditions').replace('{0}', profile.Conditions.map(function (c) {
return c.Property;
- }).join(', ');
+ }).join(', '));
+
html += ' Codec: ' + (profile.Codec || 'All') + ' ' + Globalize.translate('ValueCodec').replace('{0}', (profile.Codec || allText)) + ' Conditions: ';
- html += profile.Conditions.map(function (c) {
+ html += ' ';
+
+ html += Globalize.translate('ValueConditions').replace('{0}', profile.Conditions.map(function (c) {
return c.Property;
- }).join(', ');
+ }).join(', '));
+
html += ' Container: ' + (profile.Container || 'All') + ' ' + Globalize.translate('ValueContainer').replace('{0}', (profile.Container || allText)) + ' Video Codec: ' + (profile.VideoCodec || 'All') + ' Audio Codec: ' + (profile.AudioCodec || 'All') + ' ' + Globalize.translate('ValueVideoCodec').replace('{0}', (profile.VideoCodec || allText)) + ' ' + Globalize.translate('ValueAudioCodec').replace('{0}', (profile.AudioCodec || allText)) + ' Codec: ' + (profile.AudioCodec || 'All') + ' ' + Globalize.translate('ValueCodec').replace('{0}', (profile.AudioCodec || allText)) + ' Conditions: ';
- html += profile.Conditions.map(function (c) {
+ html += ' ';
+
+ html += Globalize.translate('ValueConditions').replace('{0}', profile.Conditions.map(function (c) {
return c.Property;
- }).join(', ');
+ }).join(', '));
+
html += '
' + (person.Role) + '
'; } html += ''; - html += 'Delete'; + html += '' + Globalize.translate('Delete') + ''; html += 'Slide a field to 'off' to lock it and prevent it's data from being changed.
"; + html += "" + Globalize.translate('HeaderFieldsHelp') + "
"; html += generateSliders(metadatafields, 'Fields'); container.html(html).trigger('create'); for (var fieldIndex = 0; fieldIndex < lockedFields.length; fieldIndex++) { @@ -873,7 +832,7 @@ ShortOverview: $('#txtShortOverview', form).val(), Status: $('#selectStatus', form).val(), AirDays: getSelectedAirDays(form), - AirTime: convertTo12HourFormat($('#txtAirTime', form).val()), + AirTime: $('#txtAirTime', form).val(), Genres: editableListViewValues($("#listGenres", form)), ProductionLocations: editableListViewValues($("#listCountries", form)), Tags: editableListViewValues($("#listTags", form)), @@ -928,7 +887,7 @@ ApiClient.updateItem(item).done(function () { - Dashboard.alert('Item saved.'); + Dashboard.alert(Globalize.translate('MessageItemSaved')); MetadataEditor.getItemPromise().done(function (i) { $(form).parents('.page').trigger('itemsaved', [i]); @@ -969,7 +928,7 @@ var page = $(this).parents('.page'); if ($('#fldChallengeValue', page).val() != $('#txtDeleteTest', page).val()) { - Dashboard.alert('The value entered is not correct. Please try again.'); + Dashboard.alert(Globalize.translate('MessageValueNotCorrect')); } else { performDelete(page); } @@ -1090,7 +1049,7 @@ }); if (!hasId && !lookupInfo.Name) { - Dashboard.alert('Please enter a name or an external Id.'); + Dashboard.alert(Globalize.translate('MessagePleaseEnterNameOrId')); return; } @@ -1296,9 +1255,9 @@ } else { - var msg = "Are you sure you wish to delete this item from your library?
"; + var msg = "" + Globalize.translate('ConfirmDeleteItem') + "
"; - Dashboard.confirm(msg, "Confirm Deletion", function (result) { + Dashboard.confirm(msg, Globalize.translate('HeaderDeleteItem'), function (result) { if (result) { diff --git a/dashboard-ui/scripts/editorsidebar.js b/dashboard-ui/scripts/editorsidebar.js index ae26ff4c5..79435f1eb 100644 --- a/dashboard-ui/scripts/editorsidebar.js +++ b/dashboard-ui/scripts/editorsidebar.js @@ -10,9 +10,9 @@ return { attr: { id: item.Id, rel: rel, itemtype: item.Type }, data: htmlName, state: state }; } - + function getNodeInnerHtml(item) { - + var name = item.Name; // Channel number @@ -38,22 +38,22 @@ htmlName += name; if (!item.LocalTrailerCount && item.Type == "Movie") { - htmlName += '
';
+ htmlName += '
';
}
if (!item.ImageTags || !item.ImageTags.Primary) {
- htmlName += '
';
+ htmlName += '
';
}
if (!item.BackdropImageTags || !item.BackdropImageTags.length) {
if (item.Type !== "Episode" && item.Type !== "Season" && item.MediaType !== "Audio" && item.Type !== "TvChannel" && item.Type !== "MusicAlbum") {
- htmlName += '
';
+ htmlName += '
';
}
}
if (!item.ImageTags || !item.ImageTags.Logo) {
if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "Series" || item.Type == "MusicArtist" || item.Type == "BoxSet") {
- htmlName += '
';
+ htmlName += '
';
}
}
@@ -61,7 +61,7 @@
try {
if (item.PremiereDate && (new Date().getTime() >= parseISO8601Date(item.PremiereDate, { toLocal: true }).getTime())) {
- htmlName += '
';
+ htmlName += '
';
}
} catch (err) {
@@ -76,7 +76,7 @@
function loadChildrenOfRootNode(page, callback, openItems, selectedId) {
- var promise2 = ApiClient.getLiveTvChannels({limit: 0});
+ var promise2 = ApiClient.getLiveTvChannels({ limit: 0 });
$.when(promise2).done(function (response2) {
@@ -84,10 +84,10 @@
var nodes = [];
- nodes.push({ attr: { id: 'MediaFolders', rel: 'folder', itemtype: 'mediafolders' }, data: 'Media Folders', state: 'open' });
+ nodes.push({ attr: { id: 'MediaFolders', rel: 'folder', itemtype: 'mediafolders' }, data: Globalize.translate('HeaderMediaFolders'), state: 'open' });
if (result.TotalRecordCount) {
- nodes.push({ attr: { id: 'livetv', rel: 'folder', itemtype: 'livetv' }, data: 'Live TV', state: 'closed' });
+ nodes.push({ attr: { id: 'livetv', rel: 'folder', itemtype: 'livetv' }, data: Globalize.translate('HeaderLiveTV'), state: 'closed' });
}
callback(nodes);
@@ -249,7 +249,7 @@
});
}
-
+
function updateEditorNode(page, item) {
var elem = $('#' + item.Id + '>a', page)[0];
@@ -261,7 +261,7 @@
$('.editorNode', elem).remove();
$(elem).append(getNodeInnerHtml(item));
-
+
if (item.IsFolder) {
var tree = jQuery.jstree._reference(".libraryTree");
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index 087a99b6f..fa88adb12 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -354,7 +354,7 @@
$('.playFlyout').popup("close").remove();
},
- getHref: function (item, context) {
+ getHref: function (item, context, topParentId) {
var href = LibraryBrowser.getHrefInternal(item);
@@ -363,6 +363,15 @@
href += context;
}
+ if (topParentId == null) {
+ topParentId = LibraryMenu.getTopParentId();
+ }
+
+ if (topParentId) {
+ href += href.indexOf('?') == -1 ? "?topParentId=" : "&topParentId=";
+ href += topParentId;
+ }
+
return href;
},
diff --git a/dashboard-ui/scripts/livetvchannel.js b/dashboard-ui/scripts/livetvchannel.js
index 4ce429f77..0d65c4e53 100644
--- a/dashboard-ui/scripts/livetvchannel.js
+++ b/dashboard-ui/scripts/livetvchannel.js
@@ -164,6 +164,28 @@
window.LiveTvHelpers = {
+ getDaysOfWeek: function () {
+
+ var days = [
+ 'Sunday',
+ 'Monday',
+ 'Tuesday',
+ 'Wednesday',
+ 'Thursday',
+ 'Friday',
+ 'Saturday'
+ ];
+
+ return days.map(function (d) {
+
+ return {
+ name: d,
+ value: d
+ };
+
+ });
+ },
+
getDisplayTime: function (date) {
if ((typeof date).toString().toLowerCase() === 'string') {
diff --git a/dashboard-ui/scripts/livetvnewrecording.js b/dashboard-ui/scripts/livetvnewrecording.js
index 20330a463..e9aa16111 100644
--- a/dashboard-ui/scripts/livetvnewrecording.js
+++ b/dashboard-ui/scripts/livetvnewrecording.js
@@ -72,19 +72,13 @@
}
}
-
+
function getDaysOfWeek() {
-
+
// Do not localize. These are used as values, not text.
- return [
- 'Sunday',
- 'Monday',
- 'Tuesday',
- 'Wednesday',
- 'Thursday',
- 'Friday',
- 'Saturday'
- ];
+ return LiveTvHelpers.getDaysOfWeek().map(function (d) {
+ return d.value;
+ });
}
function getDays(page) {
@@ -152,7 +146,7 @@
}
window.LiveTvNewRecordingPage = {
-
+
onSubmit: onSubmit
};
diff --git a/dashboard-ui/scripts/livetvseriestimer.js b/dashboard-ui/scripts/livetvseriestimer.js
index 6a4ece92b..33c3459db 100644
--- a/dashboard-ui/scripts/livetvseriestimer.js
+++ b/dashboard-ui/scripts/livetvseriestimer.js
@@ -37,27 +37,39 @@
$('#chkAnyTime', page).checked(item.RecordAnyTime).checkboxradio('refresh');
var channelHtml = '';
-
- if (item.RecurrenceType == 'NewProgramEventsAllChannels' || item.RecurrenceType == 'AllProgramEventsAllChannels') {
- channelHtml += 'All Channels';
+ if (item.RecordAnyChannel) {
+ channelHtml += Globalize.translate('LabelAllChannels');
}
else if (item.ChannelId) {
channelHtml += '' + item.ChannelName + '';
}
- $('.channel', page).html('Channel: ' + channelHtml).trigger('create');
+ $('.channel', page).html(channelHtml).trigger('create');
selectDays(page, item.Days);
-
- $('.time', page).html('Time: ' + LiveTvHelpers.getDisplayTime(item.StartDate));
+ if (item.RecordAnyTime) {
+ $('.time', page).html(Globalize.translate('LabelAnytime')).trigger('create');
+ }
+ else if (item.ChannelId) {
+ $('.time', page).html(LiveTvHelpers.getDisplayTime(item.StartDate)).trigger('create');
+ }
Dashboard.hideLoadingMsg();
}
+ function getDaysOfWeek() {
+
+ // Do not localize. These are used as values, not text.
+ return LiveTvHelpers.getDaysOfWeek().map(function (d) {
+ return d.value;
+ });
+
+ }
+
function selectDays(page, days) {
- var daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
+ var daysOfWeek = getDaysOfWeek();
for (var i = 0, length = daysOfWeek.length; i < length; i++) {
@@ -71,7 +83,7 @@
function getDays(page) {
- var daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
+ var daysOfWeek = getDaysOfWeek();
var days = [];
@@ -82,7 +94,6 @@
if ($('#chk' + day, page).checked()) {
days.push(day);
}
-
}
return days;
@@ -180,13 +191,13 @@
html += ''; if (program.IsLive) { - html += 'LIVE '; + html += '' + Globalize.translate('LabelLiveProgram') + ' '; } else if (program.IsPremiere) { - html += 'PREMIERE '; + html += '' + Globalize.translate('LabelPremiereProgram') + ' '; } else if (program.IsSeries && !program.IsRepeat) { - html += 'NEW '; + html += '' + Globalize.translate('LabelNewProgram') + ' '; } html += LiveTvHelpers.getDisplayTime(timer.StartDate); diff --git a/dashboard-ui/scripts/medialibrarypage.js b/dashboard-ui/scripts/medialibrarypage.js index f485deee4..51f00bd1e 100644 --- a/dashboard-ui/scripts/medialibrarypage.js +++ b/dashboard-ui/scripts/medialibrarypage.js @@ -17,7 +17,6 @@ }); $('#divMediaLibrary', page).show(); - Dashboard.setPageTitle("Media Library"); }, shouldRefreshLibraryAfterChanges: function () { @@ -55,8 +54,8 @@ changeCollectionType: function () { Dashboard.alert({ - message: "To change the folder type, please remove and rebuild the collection with the new type.", - title: "Change Folder Type" + message: Globalize.translate('HeaderChangeFolderTypeHelp'), + title: Globalize.translate('HeaderChangeFolderType') }); }, @@ -380,13 +379,13 @@ var WizardLibraryPage = { var lastResult = task.LastExecutionResult ? task.LastExecutionResult.Status : ''; if (lastResult == "Failed") { - $('.lastRefreshResult', page).html('(failed)'); + $('.lastRefreshResult', page).html('' + Globalize.translate('LabelFailed') + ''); } else if (lastResult == "Cancelled") { - $('.lastRefreshResult', page).html('(cancelled)'); + $('.lastRefreshResult', page).html('' + Globalize.translate('LabelCancelled') + ''); } else if (lastResult == "Aborted") { - $('.lastRefreshResult', page).html('(Aborted by server shutdown)'); + $('.lastRefreshResult', page).html('' + Globalize.translate('LabelAbortedByServerShutdown') + ''); } else { $('.lastRefreshResult', page).html(lastResult); } diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index 426ba09fb..d06952c1a 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -897,7 +897,7 @@ function bindEventsForPlayback() { var hideElementsOnIdle = !$.browser.mobile; - + if (hideElementsOnIdle) { $('.itemVideo').off('mousemove.videoplayer keydown.videoplayer scroll.videoplayer', idleHandler); $('.itemVideo').on('mousemove.videoplayer keydown.videoplayer scroll.videoplayer', idleHandler).trigger('mousemove'); @@ -1003,7 +1003,8 @@ self.startTimeTicksOffset = isStatic ? 0 : startPosition || 0; - var seekParam = startPosition ? '#t=' + (startPosition / 10000000) : ''; + var startPositionInSeekParam = startPosition ? (startPosition / 10000000) : 0; + var seekParam = startPositionInSeekParam ? '#t=' + startPositionInSeekParam : ''; var mp4VideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.mp4', $.extend({}, baseParams, { Static: isStatic, @@ -1158,7 +1159,14 @@ volumeSlider.val(initialVolume).slider('refresh'); updateVolumeButtons(initialVolume); - video.on("volumechange.mediaplayerevent", function (e) { + video.one("loadedmetadata.mediaplayerevent", function (e) { + + // Appending #t=xxx to the query string doesn't seem to work with HLS + if (startPositionInSeekParam && this.currentSrc && this.currentSrc.toLowerCase().indexOf('.m3u8') != -1) { + this.currentTime = startPositionInSeekParam; + } + + }).on("volumechange.mediaplayerevent", function (e) { var vol = this.volume; @@ -1234,7 +1242,7 @@ }).on("ended.playbackstopped", function () { - currentTimeElement.empty(); + currentTimeElement.html('--:--'); self.onPlaybackStopped.call(this); diff --git a/dashboard-ui/scripts/plugincatalogpage.js b/dashboard-ui/scripts/plugincatalogpage.js index 56db3126d..604ddbd9c 100644 --- a/dashboard-ui/scripts/plugincatalogpage.js +++ b/dashboard-ui/scripts/plugincatalogpage.js @@ -6,39 +6,11 @@ IsAdult: false }; - function getApps() { - - var apps = []; - - apps.push({ - type: "UserInstalled", - name: "MBKinect", - category: "Voice Control", - isApp: true, - tileColor: "#050810", - thumbImage: "https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/images/mbkinect/thumb.png", - externalUrl: "http://mediabrowser.tv/community/index.php?/topic/850-media-browser-kinect-sensor-plug-in-support/", - isPremium: false, - isExternal: true - }); - - return apps; - } - - function getAppsPromise() { - - var deferred = $.Deferred(); - - deferred.resolveWith(null, [[getApps()]]); - - return deferred.promise(); - } - function reloadList(page) { Dashboard.showLoadingMsg(); - var promise1 = query.TargetSystems == "Apps" ? getAppsPromise() : ApiClient.getAvailablePlugins(query); + var promise1 = ApiClient.getAvailablePlugins(query); var promise2 = ApiClient.getInstalledPlugins(); @@ -113,7 +85,7 @@ if (!plugin.isExternal) { html += "