diff --git a/dashboard-ui/plugincatalog.html b/dashboard-ui/plugincatalog.html index f9b1dd9ade..e62fba706f 100644 --- a/dashboard-ui/plugincatalog.html +++ b/dashboard-ui/plugincatalog.html @@ -22,8 +22,6 @@ - -
Container: ' + (profile.Container || 'All') + '
'; + html += '' + Globalize.translate('ValueContainer').replace('{0}', (profile.Container || allText)) + '
'; if (profile.Type == 'Video') { - html += 'Video Codec: ' + (profile.VideoCodec || 'All') + '
'; - html += 'Audio Codec: ' + (profile.AudioCodec || 'All') + '
'; + + html += '' + Globalize.translate('ValueVideoCodec').replace('{0}', (profile.VideoCodec || allText)) + '
'; + html += '' + Globalize.translate('ValueAudioCodec').replace('{0}', (profile.AudioCodec || allText)) + '
'; + } else if (profile.Type == 'Audio') { - html += 'Codec: ' + (profile.AudioCodec || 'All') + '
'; + html += '' + Globalize.translate('ValueCodec').replace('{0}', (profile.AudioCodec || allText)) + '
'; } html += ''; @@ -198,7 +202,7 @@ $('#txtDirectPlayContainer', popup).val(directPlayProfile.Container || ''); $('#txtDirectPlayAudioCodec', popup).val(directPlayProfile.AudioCodec || ''); $('#txtDirectPlayVideoCodec', popup).val(directPlayProfile.VideoCodec || ''); - + popup.popup('open'); } @@ -224,13 +228,13 @@ html += ''; html += 'Protocol: ' + (profile.Protocol || 'Http') + '
'; - html += 'Container: ' + (profile.Container || 'All') + '
'; + html += '' + Globalize.translate('ValueContainer').replace('{0}', (profile.Container || allText)) + '
'; if (profile.Type == 'Video') { - html += 'Video Codec: ' + (profile.VideoCodec || 'All') + '
'; - html += 'Audio Codec: ' + (profile.AudioCodec || 'All') + '
'; + html += '' + Globalize.translate('ValueVideoCodec').replace('{0}', (profile.VideoCodec || allText)) + '
'; + html += '' + Globalize.translate('ValueAudioCodec').replace('{0}', (profile.AudioCodec || allText)) + '
'; } else if (profile.Type == 'Audio') { - html += 'Codec: ' + (profile.AudioCodec || 'All') + '
'; + html += '' + Globalize.translate('ValueCodec').replace('{0}', (profile.AudioCodec || allText)) + '
'; } html += ''; @@ -277,7 +281,7 @@ $('#chkReportByteRangeRequests', popup).checked(transcodingProfile.TranscodeSeekInfo == 'Bytes').checkboxradio('refresh'); $('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change'); - + popup.popup('open'); } @@ -334,14 +338,16 @@ html += 'Container: ' + (profile.Container || 'All') + '
'; + html += '' + Globalize.translate('ValueContainer').replace('{0}', (profile.Container || allText)) + '
'; if (profile.Conditions && profile.Conditions.length) { - html += '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 += '
'; } @@ -377,7 +383,7 @@ renderContainerProfiles(page, currentProfile.ContainerProfiles); } - + function editContainerProfile(page, containerProfile) { isSubProfileNew = containerProfile == null; @@ -390,7 +396,7 @@ $('#txtContainerProfileContainer', popup).val(containerProfile.Container || ''); $('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change'); - + popup.popup('open'); } @@ -434,14 +440,16 @@ html += 'Codec: ' + (profile.Codec || 'All') + '
'; + html += '' + Globalize.translate('ValueCodec').replace('{0}', (profile.Codec || allText)) + '
'; if (profile.Conditions && profile.Conditions.length) { - html += '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 += '
'; } @@ -490,7 +498,7 @@ $('#txtCodecProfileCodec', popup).val(codecProfile.Codec || ''); $('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change'); - + popup.popup('open'); } @@ -532,21 +540,23 @@ html += 'Container: ' + (profile.Container || 'All') + '
'; + html += '' + Globalize.translate('ValueContainer').replace('{0}', (profile.Container || allText)) + '
'; if (profile.Type == 'Video') { - html += 'Video Codec: ' + (profile.VideoCodec || 'All') + '
'; - html += 'Audio Codec: ' + (profile.AudioCodec || 'All') + '
'; + html += '' + Globalize.translate('ValueVideoCodec').replace('{0}', (profile.VideoCodec || allText)) + '
'; + html += '' + Globalize.translate('ValueAudioCodec').replace('{0}', (profile.AudioCodec || allText)) + '
'; } else if (profile.Type == 'Audio') { - html += 'Codec: ' + (profile.AudioCodec || 'All') + '
'; + html += '' + Globalize.translate('ValueCodec').replace('{0}', (profile.AudioCodec || allText)) + '
'; } if (profile.Conditions && profile.Conditions.length) { - html += '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 += '
'; } @@ -570,7 +580,7 @@ $('.lnkEditSubProfile', elem).on('click', function () { var index = parseInt(this.getAttribute('data-profileindex')); - + editResponseProfile(page, currentProfile.ResponseProfiles[index]); }); } @@ -787,13 +797,13 @@ editTranscodingProfile(page); }); - + $('.btnAddContainerProfile', page).on('click', function () { editContainerProfile(page); }); - + $('.btnAddCodecProfile', page).on('click', function () { editCodecProfile(page); @@ -854,8 +864,8 @@ return false; }, - - onContainerProfileFormSubmit: function() { + + onContainerProfileFormSubmit: function () { var form = this; var page = $(form).parents('.page'); @@ -864,8 +874,8 @@ return false; }, - - onCodecProfileFormSubmit: function() { + + onCodecProfileFormSubmit: function () { var form = this; var page = $(form).parents('.page'); @@ -873,8 +883,8 @@ return false; }, - - onResponseProfileFormSubmit: function() { + + onResponseProfileFormSubmit: function () { var form = this; var page = $(form).parents('.page'); diff --git a/dashboard-ui/scripts/edititemimages.js b/dashboard-ui/scripts/edititemimages.js index cebc27a5b7..b05e6b0407 100644 --- a/dashboard-ui/scripts/edititemimages.js +++ b/dashboard-ui/scripts/edititemimages.js @@ -75,7 +75,7 @@ return ''; }); - $('#selectImageProvider', page).html('' + providersHtml).val(provider).selectmenu('refresh'); + $('#selectImageProvider', page).html('' + providersHtml).val(provider).selectmenu('refresh'); Dashboard.hideLoadingMsg(); }); @@ -215,7 +215,7 @@ 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 ae26ff4c59..79435f1eb3 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 += ''; 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 f485deee49..51f00bd1e5 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 426ba09fb2..d06952c1ae 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 56db3126da..604ddbd9c8 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 += "