diff --git a/src/components/emby-button/emby-button.css b/src/components/emby-button/emby-button.css
index a37a28ebe4..f6da6b040f 100644
--- a/src/components/emby-button/emby-button.css
+++ b/src/components/emby-button/emby-button.css
@@ -3,7 +3,7 @@
display: inline-flex;
align-items: center;
box-sizing: border-box;
- margin: 0 .29em;
+ margin: 0 0.3em;
text-align: center;
font-size: inherit;
font-family: inherit;
@@ -15,11 +15,11 @@
user-select: none;
cursor: pointer;
z-index: 0;
- padding: .86em 1em;
+ padding: 0.9em 1em;
vertical-align: middle;
border: 0;
vertical-align: middle;
- border-radius: .2em;
+ border-radius: 0.2em;
/* These are getting an outline in opera tv browsers, which run chrome 30 */
outline: none !important;
position: relative;
@@ -29,6 +29,13 @@
text-decoration: none;
/* Not crazy about this but it normalizes heights between anchors and buttons */
line-height: 1.35;
+ transform-origin: center;
+ transition: 0.2s;
+}
+
+.emby-button.show-focus:focus {
+ transform: scale(1.4);
+ z-index: 1;
}
.emby-button::-moz-focus-inner {
@@ -54,17 +61,6 @@
text-decoration: underline;
}
-.emby-button-focusscale {
- transition: transform 180ms ease-out !important;
- -webkit-transform-origin: center center;
- transform-origin: center center;
-}
-
-.emby-button-focusscale:focus {
- transform: scale(1.16);
- z-index: 1;
-}
-
.emby-button > i {
/* For non-fab buttons that have icons */
font-size: 1.36em;
@@ -77,7 +73,7 @@
.fab {
display: inline-flex;
border-radius: 50%;
- padding: .6em;
+ padding: 0.6em;
box-sizing: border-box;
align-items: center;
justify-content: center;
@@ -125,14 +121,22 @@
/* Disable webkit tap highlighting */
-webkit-tap-highlight-color: rgba(0,0,0,0);
justify-content: center;
+ transform-origin: center;
+ transition: 0.2s;
+}
+
+.paper-icon-button-light.show-focus:focus {
+ transform: scale(1.6);
+ z-index: 1;
}
.paper-icon-button-light::-moz-focus-inner {
border: 0;
}
- .paper-icon-button-light[disabled] {
- opacity: .3;
+ .paper-icon-button-light:disabled {
+ opacity: 0.3;
+ cursor: default;
}
.paper-icon-button-light > i {
@@ -159,17 +163,6 @@
z-index: 1;
}
-.icon-button-focusscale {
- transition: transform 180ms ease-out !important;
- -webkit-transform-origin: center center;
- transform-origin: center center;
-}
-
-.icon-button-focusscale:focus {
- transform: scale(1.3);
- z-index: 1;
-}
-
.btnFilterWithBubble {
position: relative;
}
@@ -180,7 +173,6 @@
background: #444;
top: 0;
right: 0;
- /* padding: .5em; */
width: 1.6em;
height: 1.6em;
z-index: 100000000;
diff --git a/src/components/emby-button/emby-button.js b/src/components/emby-button/emby-button.js
index 6df7aebb5c..be52b1d512 100644
--- a/src/components/emby-button/emby-button.js
+++ b/src/components/emby-button/emby-button.js
@@ -21,30 +21,23 @@ define(['browser', 'dom', 'layoutManager', 'shell', 'appRouter', 'apphost', 'css
}
EmbyButtonPrototype.createdCallback = function () {
-
if (this.classList.contains('emby-button')) {
return;
}
this.classList.add('emby-button');
-
+ // TODO replace all instances of element-showfocus with this method
if (layoutManager.tv) {
- if (this.getAttribute('data-focusscale') !== 'false') {
- this.classList.add('emby-button-focusscale');
- }
- this.classList.add('emby-button-tv');
+ // handles all special css for tv layout
+ // this method utilizes class chaining
+ this.classList.add('show-focus');
}
};
EmbyButtonPrototype.attachedCallback = function () {
-
if (this.tagName === 'A') {
-
- dom.removeEventListener(this, 'click', onAnchorClick, {
- });
-
- dom.addEventListener(this, 'click', onAnchorClick, {
- });
+ dom.removeEventListener(this, 'click', onAnchorClick, {});
+ dom.addEventListener(this, 'click', onAnchorClick, {});
if (this.getAttribute('data-autohide') === 'true') {
if (appHost.supports('externallinks')) {
@@ -57,9 +50,7 @@ define(['browser', 'dom', 'layoutManager', 'shell', 'appRouter', 'apphost', 'css
};
EmbyButtonPrototype.detachedCallback = function () {
-
- dom.removeEventListener(this, 'click', onAnchorClick, {
- });
+ dom.removeEventListener(this, 'click', onAnchorClick, {});
};
EmbyLinkButtonPrototype.createdCallback = EmbyButtonPrototype.createdCallback;
@@ -75,6 +66,5 @@ define(['browser', 'dom', 'layoutManager', 'shell', 'appRouter', 'apphost', 'css
extends: 'a'
});
- // For extension purposes
return EmbyButtonPrototype;
});
diff --git a/src/components/emby-button/paper-icon-button-light.js b/src/components/emby-button/paper-icon-button-light.js
index 70304ffc24..7eda76baec 100644
--- a/src/components/emby-button/paper-icon-button-light.js
+++ b/src/components/emby-button/paper-icon-button-light.js
@@ -4,11 +4,10 @@ define(['layoutManager', 'css!./emby-button', 'registerElement'], function (layo
var EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
EmbyButtonPrototype.createdCallback = function () {
-
this.classList.add('paper-icon-button-light');
if (layoutManager.tv) {
- this.classList.add('icon-button-focusscale');
+ this.classList.add('show-focus');
}
};
@@ -16,4 +15,4 @@ define(['layoutManager', 'css!./emby-button', 'registerElement'], function (layo
prototype: EmbyButtonPrototype,
extends: 'button'
});
-});
\ No newline at end of file
+});
diff --git a/src/components/emby-checkbox/emby-checkbox.css b/src/components/emby-checkbox/emby-checkbox.css
index ed70747db2..5641893f63 100644
--- a/src/components/emby-checkbox/emby-checkbox.css
+++ b/src/components/emby-checkbox/emby-checkbox.css
@@ -73,13 +73,12 @@
}
.emby-checkbox:checked + span + .checkboxOutline > .checkboxIcon-checked {
- /* background-color set by theme */
- /*background-color: #52B54B;*/
+ /* background color set by theme */
display: flex !important;
}
.emby-checkbox:checked + span + .checkboxOutline > .checkboxIcon-unchecked {
- /* background-color set by theme */
+ /* background color set by theme */
display: none !important;
}
@@ -94,7 +93,7 @@
.checkboxList > .emby-checkbox-label {
display: flex;
- margin: .5em 0;
+ margin: 0.5em 0;
}
.checkboxList-verticalwrap {
diff --git a/src/components/emby-checkbox/emby-checkbox.js b/src/components/emby-checkbox/emby-checkbox.js
index 6144f6892b..1721bf3ca7 100644
--- a/src/components/emby-checkbox/emby-checkbox.js
+++ b/src/components/emby-checkbox/emby-checkbox.js
@@ -4,7 +4,6 @@ define(['browser', 'dom', 'css!./emby-checkbox', 'registerElement'], function (b
var EmbyCheckboxPrototype = Object.create(HTMLInputElement.prototype);
function onKeyDown(e) {
-
// Don't submit form on enter
if (e.keyCode === 13) {
e.preventDefault();
@@ -22,7 +21,6 @@ define(['browser', 'dom', 'css!./emby-checkbox', 'registerElement'], function (b
var enableRefreshHack = browser.tizen || browser.orsay || browser.operaTv || browser.web0s ? true : false;
function forceRefresh(loading) {
-
var elem = this.parentNode;
elem.style.webkitAnimationName = 'repaintChrome';
@@ -36,7 +34,6 @@ define(['browser', 'dom', 'css!./emby-checkbox', 'registerElement'], function (b
}
EmbyCheckboxPrototype.attachedCallback = function () {
-
if (this.getAttribute('data-embycheckbox') === 'true') {
return;
}
@@ -68,7 +65,6 @@ define(['browser', 'dom', 'css!./emby-checkbox', 'registerElement'], function (b
this.addEventListener('keydown', onKeyDown);
if (enableRefreshHack) {
-
forceRefresh.call(this, true);
dom.addEventListener(this, 'click', forceRefresh, {
passive: true
@@ -86,7 +82,6 @@ define(['browser', 'dom', 'css!./emby-checkbox', 'registerElement'], function (b
};
EmbyCheckboxPrototype.detachedCallback = function () {
-
this.removeEventListener('keydown', onKeyDown);
dom.removeEventListener(this, 'click', forceRefresh, {
diff --git a/src/components/emby-slider/emby-slider.css b/src/components/emby-slider/emby-slider.css
index b27190e487..bd258d3bc5 100644
--- a/src/components/emby-slider/emby-slider.css
+++ b/src/components/emby-slider/emby-slider.css
@@ -70,8 +70,8 @@ _:-ms-input-placeholder {
.mdl-slider::-webkit-slider-thumb {
-webkit-appearance: none;
- width: 1.8em;
- height: 1.8em;
+ width: 1.2em;
+ height: 1.2em;
box-sizing: border-box;
border-radius: 50%;
background: #00a4dc;
@@ -80,11 +80,11 @@ _:-ms-input-placeholder {
}
.mdl-slider-hoverthumb::-webkit-slider-thumb {
- transform: scale(.7, .7);
+ transform: none;
}
.mdl-slider:hover::-webkit-slider-thumb {
- transform: none;
+ transform: scale(1.6);
}
.slider-no-webkit-thumb::-webkit-slider-thumb {
diff --git a/src/components/emby-tabs/emby-tabs.css b/src/components/emby-tabs/emby-tabs.css
index 3a542ee7e6..00abd7efae 100644
--- a/src/components/emby-tabs/emby-tabs.css
+++ b/src/components/emby-tabs/emby-tabs.css
@@ -2,7 +2,7 @@
background: transparent;
box-shadow: none;
cursor: pointer;
- outline: none !important;
+ outline: none;
width: auto;
font-family: inherit;
font-size: inherit;
@@ -10,36 +10,25 @@
vertical-align: middle;
flex-shrink: 0;
margin: 0;
- padding: 1em .9em;
+ padding: 1em 0.9em;
position: relative;
height: auto;
min-width: initial;
line-height: initial;
- border-radius: 0 !important;
+ border-radius: 0;
overflow: hidden;
font-weight: 600;
}
- /*.emby-tab-button-active {
- color: #52B54B;
+.emby-tab-button.show-focus:focus {
+ /* these buttons are small so scale larger than usual */
+ transform: scale(1.6) !important;
+ background: 0 !important;
}
- .emby-tab-button-active.emby-button-tv {
- color: #fff;
- }*/
-
- .emby-tab-button.emby-button-tv:focus {
- /*color: #52B54B;*/
- transform: scale(1.32);
- transform-origin: center center;
- }
-
.emby-tabs-slider {
position: relative;
-}
-
-.emby-tab-button-ripple-effect {
- background: rgba(0,0,0,.7) !important;
+ overflow: hidden;
}
.tabContent:not(.is-active) {
diff --git a/src/components/guide/guide.css b/src/components/guide/guide.css
index fcac17f272..7dd0594149 100644
--- a/src/components/guide/guide.css
+++ b/src/components/guide/guide.css
@@ -424,7 +424,7 @@
border-color: transparent !important;
}
- .guide-date-tab-button.emby-button-tv:focus {
+ .guide-date-tab-button.show-focus:focus {
border-radius: .15em !important;
transform: none !important;
}
diff --git a/src/components/homescreensettings/homescreensettings.template.html b/src/components/homescreensettings/homescreensettings.template.html
index 2cb1dcbe14..56be1bc5a8 100644
--- a/src/components/homescreensettings/homescreensettings.template.html
+++ b/src/components/homescreensettings/homescreensettings.template.html
@@ -7,7 +7,7 @@
${Horizontal}
${Vertical}
-
Changes take effect after signing out or restarting the app.
+
${LabelPleaseRestart}
diff --git a/src/components/homescreensettings/homescreensettingsdialog.js b/src/components/homescreensettings/homescreensettingsdialog.js
deleted file mode 100644
index 9813e0163e..0000000000
--- a/src/components/homescreensettings/homescreensettingsdialog.js
+++ /dev/null
@@ -1,88 +0,0 @@
-define(['dialogHelper', 'layoutManager', 'globalize', 'require', 'events', 'homescreenSettings', 'paper-icon-button-light', 'css!./../formdialog'], function (dialogHelper, layoutManager, globalize, require, events, HomescreenSettings) {
- 'use strict';
-
- function centerFocus(elem, horiz, on) {
- require(['scrollHelper'], function (scrollHelper) {
- var fn = on ? 'on' : 'off';
- scrollHelper.centerFocus[fn](elem, horiz);
- });
- }
-
- function show(options) {
- return new Promise(function (resolve, reject) {
-
- require(['text!./homescreensettingsdialog.template.html'], function (template) {
-
- var dialogOptions = {
- removeOnClose: true,
- scrollY: false
- };
-
- if (layoutManager.tv) {
- dialogOptions.size = 'fullscreen';
- } else {
- dialogOptions.size = 'medium-tall';
- }
-
- var dlg = dialogHelper.createDialog(dialogOptions);
-
- dlg.classList.add('formDialog');
-
- var html = '';
- var submitted = false;
-
- html += globalize.translateDocument(template, 'core');
-
- dlg.innerHTML = html;
-
- if (layoutManager.tv) {
- centerFocus(dlg.querySelector('.formDialogContent'), false, true);
- }
-
- var homescreenSettingsInstance = new HomescreenSettings({
- serverId: options.serverId,
- userId: options.userId,
- element: dlg.querySelector('.settingsContent'),
- userSettings: options.userSettings,
- enableSaveButton: false,
- enableSaveConfirmation: false
- });
-
- dialogHelper.open(dlg);
-
- dlg.addEventListener('close', function () {
-
- if (layoutManager.tv) {
- centerFocus(dlg.querySelector('.formDialogContent'), false, false);
- }
-
- if (submitted) {
- resolve();
- } else {
- reject();
- }
- });
-
- dlg.querySelector('.btnCancel').addEventListener('click', function (e) {
-
- dialogHelper.close(dlg);
- });
-
- dlg.querySelector('.btnSave').addEventListener('click', function (e) {
-
- submitted = true;
- homescreenSettingsInstance.submit();
- });
-
- events.on(homescreenSettingsInstance, 'saved', function () {
- submitted = true;
- dialogHelper.close(dlg);
- });
- });
- });
- }
-
- return {
- show: show
- };
-});
\ No newline at end of file
diff --git a/src/components/homescreensettings/homescreensettingsdialog.template.html b/src/components/homescreensettings/homescreensettingsdialog.template.html
deleted file mode 100644
index d707fcdfb4..0000000000
--- a/src/components/homescreensettings/homescreensettingsdialog.template.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/components/homesections/homesections.js b/src/components/homesections/homesections.js
index 9e809fc3f7..d2106c93bd 100644
--- a/src/components/homesections/homesections.js
+++ b/src/components/homesections/homesections.js
@@ -328,7 +328,7 @@ define(['connectionManager', 'cardBuilder', 'appSettings', 'dom', 'apphost', 'la
html += cardBuilder.getCardsHtml({
items: userViews,
- shape: enableScrollX() ? 'overflowSmallBackdrop' : shape,
+ shape: getThumbShape(),
showTitle: true,
centerText: true,
overlayText: false,
diff --git a/src/components/imageeditor/imageeditor.js b/src/components/imageeditor/imageeditor.js
index a0dfcd8499..15c58ad8d9 100644
--- a/src/components/imageeditor/imageeditor.js
+++ b/src/components/imageeditor/imageeditor.js
@@ -203,7 +203,7 @@ define(['dialogHelper', 'connectionManager', 'loading', 'dom', 'layoutManager',
text: globalize.translate('ConfirmDeleteImage'),
confirmText: globalize.translate('Delete'),
- primary: 'cancel'
+ primary: 'delete'
}).then(afterConfirm);
});
@@ -471,7 +471,7 @@ define(['dialogHelper', 'connectionManager', 'loading', 'dom', 'layoutManager',
initEditor(dlg, options);
- // Has to be assigned a z-index after the call to .open()
+ // Has to be assigned a z-index after the call to .open()
dlg.addEventListener('close', function () {
if (layoutManager.tv) {
@@ -510,4 +510,4 @@ define(['dialogHelper', 'connectionManager', 'loading', 'dom', 'layoutManager',
});
}
};
-});
\ No newline at end of file
+});
diff --git a/src/components/indicators/indicators.js b/src/components/indicators/indicators.js
index d9c7af1ab0..2e8d28523e 100644
--- a/src/components/indicators/indicators.js
+++ b/src/components/indicators/indicators.js
@@ -221,6 +221,7 @@ define(['datetime', 'itemHelper', 'css!./indicators.css', 'material-icons'], fun
});
return {
+ getProgressHtml: getProgressHtml,
getProgressBarHtml: getProgressBarHtml,
getPlayedIndicatorHtml: getPlayedIndicator,
getChildCountIndicatorHtml: getChildCountIndicatorHtml,
diff --git a/src/components/itemMediaInfo/itemMediaInfo.js b/src/components/itemMediaInfo/itemMediaInfo.js
index 90a13d9cc8..da3708714d 100644
--- a/src/components/itemMediaInfo/itemMediaInfo.js
+++ b/src/components/itemMediaInfo/itemMediaInfo.js
@@ -26,7 +26,7 @@ define(["dialogHelper", "require", "layoutManager", "globalize", "userSettings",
if (version.Path && user && user.Policy.IsAdministrator) {
html += createAttribute(globalize.translate("MediaInfoPath"), version.Path) + "
";
}
- if (version.Size && user && user.Policy.IsAdministrator) {
+ if (version.Size) {
var size = (version.Size / (1024 * 1024)).toFixed(0) + " MB";
html += createAttribute(globalize.translate("MediaInfoSize"), size) + "
";
}
diff --git a/src/components/itemcontextmenu.js b/src/components/itemcontextmenu.js
index 5f649a2b02..77bc88a25b 100644
--- a/src/components/itemcontextmenu.js
+++ b/src/components/itemcontextmenu.js
@@ -134,6 +134,11 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
name: globalize.translate('Download'),
id: 'download'
});
+
+ commands.push({
+ name: globalize.translate('CopyStreamURL'),
+ id: 'copy-stream'
+ });
}
var canEdit = itemHelper.canEdit(user, item);
@@ -305,6 +310,26 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
getResolveFunction(getResolveFunction(resolve, id), id)();
});
break;
+ case 'copy-stream':
+ var downloadHref = apiClient.getItemDownloadUrl(itemId);
+ var textArea = document.createElement("textarea");
+ textArea.value = downloadHref;
+ document.body.appendChild(textArea);
+ textArea.focus();
+ textArea.select();
+ try {
+ document.execCommand('copy');
+
+ require(['toast'], function (toast) {
+ toast(globalize.translate('CopyStreamURLSuccess'));
+ });
+ } catch (err) {
+ console.error("Failed to copy to clipboard");
+ }
+
+ document.body.removeChild(textArea);
+ getResolveFunction(resolve, id)();
+ break;
case 'editsubtitles':
require(['subtitleEditor'], function (subtitleEditor) {
subtitleEditor.show(itemId, serverId).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
diff --git a/src/components/listview/listview.css b/src/components/listview/listview.css
index 312bf14a16..d91a5377ba 100644
--- a/src/components/listview/listview.css
+++ b/src/components/listview/listview.css
@@ -39,8 +39,16 @@
}
.listItem-border {
- border-bottom-width: .1em;
- border-bottom-style: solid;
+ display: block;
+ margin: 0;
+ padding: 0;
+ border-width: 0 0 0.1em 0;
+ border-style: solid;
+ border-radius: 0;
+}
+
+.listItem-border.show-focus:focus {
+ transform: scale(1.0) !important;
}
.listItemImage, .listItemIcon, .listItemAside {
@@ -126,21 +134,20 @@
}
.listItemImageButton:hover {
- transform: scale(1.2, 1.2);
+ transform: scale(1.2, 1.2);
}
.listItemImageButton-icon {
background: rgba(0,0,0,.4);
- border: .08em solid currentColor;
+ border: 0.1em solid currentColor;
border-radius: 100em;
display: flex;
justify-content: center;
align-items: center;
- padding: .21em;
+ padding: 0.2em;
}
@media all and (max-width: 64em) {
-
.listItemImage-large {
width: 33.75vw;
height: 22.5vw;
@@ -148,7 +155,7 @@
}
.listItemImageButton {
- font-size: 1.02em !important;
+ font-size: 1em !important;
}
.listItemBody {
@@ -157,7 +164,6 @@
}
@media all and (max-width: 50em) {
-
.listItemBody {
padding-right: .5em;
}
@@ -245,14 +251,12 @@
}
@media all and (max-width: 50em) {
-
.listItem .endsAt, .listItem .criticRating, .listItem-overview {
display: none !important;
}
}
@media all and (min-width: 50em) {
-
.listItem-bottomoverview {
display: none !important;
}
diff --git a/src/components/medialibraryeditor/medialibraryeditor.js b/src/components/medialibraryeditor/medialibraryeditor.js
index ef3a3d5b19..77a5f8f459 100644
--- a/src/components/medialibraryeditor/medialibraryeditor.js
+++ b/src/components/medialibraryeditor/medialibraryeditor.js
@@ -59,7 +59,7 @@ define(["loading", "dialogHelper", "dom", "components/libraryoptionseditor/libra
title: Globalize.translate("HeaderRemoveMediaLocation"),
text: Globalize.translate("MessageConfirmRemoveMediaLocation"),
confirmText: Globalize.translate("ButtonDelete"),
- primary: "cancel"
+ primary: "delete"
}).then(function() {
var refreshAfterChange = currentOptions.refresh;
ApiClient.removeMediaPath(virtualFolder.Name, location, refreshAfterChange).then(function() {
@@ -212,4 +212,4 @@ define(["loading", "dialogHelper", "dom", "components/libraryoptionseditor/libra
var isCreating = false;
return editor;
-});
\ No newline at end of file
+});
diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js
index a82078c956..ada0c019fc 100644
--- a/src/components/playback/playbackmanager.js
+++ b/src/components/playback/playbackmanager.js
@@ -1643,7 +1643,9 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
self.disableShowingSubtitleOffset = function(player) {
player = player || self._currentPlayer;
- player.disableShowingSubtitleOffset();
+ if (player.disableShowingSubtitleOffset) {
+ player.disableShowingSubtitleOffset();
+ }
}
self.isShowingSubtitleOffsetEnabled = function(player) {
@@ -1658,12 +1660,16 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
self.setSubtitleOffset = function (value, player) {
player = player || self._currentPlayer;
- player.setSubtitleOffset(value);
+ if (player.setSubtitleOffset) {
+ player.setSubtitleOffset(value);
+ }
};
self.getPlayerSubtitleOffset = function(player) {
player = player || self._currentPlayer;
- return player.getSubtitleOffset();
+ if (player.getPlayerSubtitleOffset) {
+ return player.getSubtitleOffset();
+ }
}
self.canHandleOffsetOnCurrentSubtitle = function(player) {
diff --git a/src/components/playerstats/playerstats.js b/src/components/playerstats/playerstats.js
index d395d609c4..5e097f2fe2 100644
--- a/src/components/playerstats/playerstats.js
+++ b/src/components/playerstats/playerstats.js
@@ -132,7 +132,7 @@ define(['events', 'globalize', 'playbackManager', 'connectionManager', 'playMeth
if (videoCodec) {
sessionStats.push({
- label: 'Video codec:',
+ label: globalize.translate("LabelVideoCodec"),
value: session.TranscodingInfo.IsVideoDirect ? (videoCodec.toUpperCase() + ' (direct)') : videoCodec.toUpperCase()
});
}
@@ -140,7 +140,7 @@ define(['events', 'globalize', 'playbackManager', 'connectionManager', 'playMeth
if (audioCodec) {
sessionStats.push({
- label: 'Audio codec:',
+ label: globalize.translate("LabelAudioCodec"),
value: session.TranscodingInfo.IsAudioDirect ? (audioCodec.toUpperCase() + ' (direct)') : audioCodec.toUpperCase()
});
}
@@ -157,28 +157,28 @@ define(['events', 'globalize', 'playbackManager', 'connectionManager', 'playMeth
if (totalBitrate) {
sessionStats.push({
- label: 'Bitrate:',
+ label: globalize.translate("LabelBitrate"),
value: getDisplayBitrate(totalBitrate)
});
}
if (session.TranscodingInfo.CompletionPercentage) {
sessionStats.push({
- label: 'Transcoding progress:',
+ label: globalize.translate("LabelTranscodingProgress"),
value: session.TranscodingInfo.CompletionPercentage.toFixed(1) + '%'
});
}
if (session.TranscodingInfo.Framerate) {
sessionStats.push({
- label: 'Transcoding framerate:',
+ label: globalize.translate("LabelTranscodingFramerate"),
value: session.TranscodingInfo.Framerate + ' fps'
});
}
if (session.TranscodingInfo.TranscodeReasons && session.TranscodingInfo.TranscodeReasons.length) {
sessionStats.push({
- label: 'Reason for transcoding:',
+ label: globalize.translate("LabelReasonForTranscoding"),
value: session.TranscodingInfo.TranscodeReasons.map(translateReason).join('
')
});
}
@@ -196,24 +196,42 @@ define(['events', 'globalize', 'playbackManager', 'connectionManager', 'playMeth
}
}
+ function getReadableSize(size) {
+ if (size >= 1073741824) {
+ return parseFloat((size / 1073741824).toFixed(1)) + ' GiB';
+ } else if (size >= 1048576) {
+ return parseFloat((size / 1048576).toFixed(1)) + ' MiB';
+ } else {
+ return Math.floor(size / 1024) + ' KiB';
+ }
+ }
+
function getMediaSourceStats(session, player, displayPlayMethod) {
var sessionStats = [];
var mediaSource = playbackManager.currentMediaSource(player) || {};
var totalBitrate = mediaSource.Bitrate;
+ var mediaFileSize = mediaSource.Size;
if (mediaSource.Container) {
sessionStats.push({
- label: 'Container:',
+ label: globalize.translate("LabelProfileContainer"),
value: mediaSource.Container
});
}
+ if (mediaFileSize) {
+ sessionStats.push({
+ label: globalize.translate("LabelSize"),
+ value: getReadableSize(mediaFileSize)
+ });
+ }
+
if (totalBitrate) {
sessionStats.push({
- label: 'Bitrate:',
+ label: globalize.translate("LabelBitrate"),
value: getDisplayBitrate(totalBitrate)
});
}
@@ -249,14 +267,14 @@ define(['events', 'globalize', 'playbackManager', 'connectionManager', 'playMeth
if (videoInfos.length) {
sessionStats.push({
- label: 'Video codec:',
+ label: globalize.translate("LabelVideoCodec"),
value: videoInfos.join(' ')
});
}
if (videoStream.BitRate) {
sessionStats.push({
- label: 'Video bitrate:',
+ label: globalize.translate("LabelVideoBitrate"),
value: getDisplayBitrate(videoStream.BitRate)
});
}
@@ -273,35 +291,35 @@ define(['events', 'globalize', 'playbackManager', 'connectionManager', 'playMeth
if (audioInfos.length) {
sessionStats.push({
- label: 'Audio codec:',
+ label: globalize.translate("LabelAudioCodec"),
value: audioInfos.join(' ')
});
}
if (audioStream.BitRate) {
sessionStats.push({
- label: 'Audio bitrate:',
+ label: globalize.translate("LabelAudioBitrate"),
value: getDisplayBitrate(audioStream.BitRate)
});
}
if (audioChannels) {
sessionStats.push({
- label: 'Audio channels:',
+ label: globalize.translate("LabelAudioChannels"),
value: audioChannels
});
}
if (audioStream.SampleRate) {
sessionStats.push({
- label: 'Audio sample rate:',
+ label: globalize.translate("LabelAudioSampleRate"),
value: audioStream.SampleRate + ' Hz'
});
}
if (audioStream.BitDepth) {
sessionStats.push({
- label: 'Audio bit depth:',
+ label: globalize.translate("LabelAudioBitDepth"),
value: audioStream.BitDepth
});
}
@@ -328,12 +346,12 @@ define(['events', 'globalize', 'playbackManager', 'connectionManager', 'playMeth
};
baseCategory.stats.unshift({
- label: 'Play method:',
+ label: globalize.translate("LabelPlayMethod"),
value: displayPlayMethod
});
baseCategory.stats.unshift({
- label: 'Player:',
+ label: globalize.translate("LabelPlayer"),
value: player.name
});
@@ -463,4 +481,4 @@ define(['events', 'globalize', 'playbackManager', 'connectionManager', 'playMeth
};
return PlayerStats;
-});
\ No newline at end of file
+});
diff --git a/src/components/recordingcreator/recordinghelper.js b/src/components/recordingcreator/recordinghelper.js
index a8359b4d4f..8c56b578c9 100644
--- a/src/components/recordingcreator/recordinghelper.js
+++ b/src/components/recordingcreator/recordinghelper.js
@@ -37,7 +37,7 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
confirm({
text: globalize.translate('MessageConfirmRecordingCancellation'),
- primary: 'cancel',
+ primary: 'delete',
confirmText: globalize.translate('HeaderCancelRecording'),
cancelText: globalize.translate('HeaderKeepRecording')
@@ -62,7 +62,7 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
confirm({
text: globalize.translate('MessageConfirmRecordingCancellation'),
- primary: 'cancel',
+ primary: 'delete',
confirmText: globalize.translate('HeaderCancelSeries'),
cancelText: globalize.translate('HeaderKeepSeries')
diff --git a/src/components/subtitleeditor/subtitleeditor.js b/src/components/subtitleeditor/subtitleeditor.js
index e4742a8948..27055f5976 100644
--- a/src/components/subtitleeditor/subtitleeditor.js
+++ b/src/components/subtitleeditor/subtitleeditor.js
@@ -74,7 +74,7 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
title: globalize.translate('ConfirmDeletion'),
text: msg,
confirmText: globalize.translate('Delete'),
- primary: 'cancel'
+ primary: 'delete'
}).then(function () {
@@ -523,4 +523,4 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
return {
show: showEditor
};
-});
\ No newline at end of file
+});
diff --git a/src/components/themes/appletv/theme.css b/src/components/themes/appletv/theme.css
index 43f1034ade..35b388d1c2 100644
--- a/src/components/themes/appletv/theme.css
+++ b/src/components/themes/appletv/theme.css
@@ -71,13 +71,12 @@ html {
background: #f0f0f0
}
-.paper-icon-button-light:hover {
+.paper-icon-button-light:hover:not(:disabled) {
color: #00a4dc;
background-color: rgba(0,164,220, .2);
- transition: 0.2s;
}
-.paper-icon-button-light:focus {
+.paper-icon-button-light.show-focus:focus {
color: #00a4dc;
}
@@ -102,6 +101,11 @@ html {
background: #0cb0e8
}
+.button-delete {
+ background: rgb(247, 0, 0);
+ color: rgba(255, 255, 255, .87)
+}
+
.checkboxLabel {
color: inherit
}
@@ -341,24 +345,25 @@ html {
color: #fff
}
-.emby-button-focusscale:focus {
+.emby-button.show-focus:focus {
background: #00a4dc;
color: #fff
}
.emby-tab-button {
color: #999;
- color: rgba(0, 0, 0, .5)
}
-.emby-tab-button-active,
-.emby-tab-button-active.emby-button-tv {
- color: #fff
-}
-
-.emby-tab-button.emby-button-tv:focus {
+.emby-tab-button-active {
+ color: #fff;
+}
+
+.emby-tab-button.show-focus:focus {
+ color: #fff;
+}
+
+.emby-tab-button:hover {
color: #fff;
- background: 0 0
}
.channelPrograms,
@@ -413,7 +418,7 @@ html {
color: #00a4dc
}
-.guide-date-tab-button.emby-button-tv:focus {
+.guide-date-tab-button.show-focus:focus {
background-color: #00a4dc;
color: #fff
}
@@ -453,3 +458,7 @@ html {
.card:focus .card-focuscontent {
border-color: #00a4dc
}
+
+.metadataSidebarIcon {
+ color: #00a4dc
+}
diff --git a/src/components/themes/blueradiance/theme.css b/src/components/themes/blueradiance/theme.css
index 840c0e23e0..4740fc5ee7 100644
--- a/src/components/themes/blueradiance/theme.css
+++ b/src/components/themes/blueradiance/theme.css
@@ -58,13 +58,12 @@ html {
}
}
-.paper-icon-button-light:hover {
+.paper-icon-button-light:hover:not(:disabled) {
color: #00a4dc;
background-color: rgba(0,164,220, .2);
- transition: 0.2s;
}
-.paper-icon-button-light:focus {
+.paper-icon-button-light.show-focus:focus {
color: #00a4dc;
}
@@ -89,6 +88,11 @@ html {
color: #fff
}
+.button-delete {
+ background: rgb(247, 0, 0);
+ color: rgba(255, 255, 255, .87)
+}
+
.checkboxLabel {
color: inherit
}
@@ -327,27 +331,25 @@ html {
color: #fff
}
-.emby-button-focusscale:focus {
+.emby-button.show-focus:focus {
background: #00a4dc;
color: #fff
}
.emby-tab-button {
color: #999;
- color: rgba(255, 255, 255, .4)
}
.emby-tab-button-active {
color: #00a4dc
}
-.emby-tab-button-active.emby-button-tv {
- color: #fff
+.emby-tab-button.show-focus:focus {
+ color: #00a4dc;
}
-.emby-tab-button.emby-button-tv:focus {
+.emby-tab-button:hover {
color: #00a4dc;
- background: 0 0
}
.channelPrograms,
@@ -401,7 +403,7 @@ html {
color: #00a4dc
}
-.guide-date-tab-button.emby-button-tv:focus {
+.guide-date-tab-button.show-focus:focus {
background-color: #00a4dc;
color: #fff
}
@@ -464,3 +466,7 @@ html {
.timeslotHeaders-desktop::-webkit-scrollbar {
height: .7em
}
+
+.metadataSidebarIcon {
+ color: #00a4dc
+}
diff --git a/src/components/themes/dark/theme.css b/src/components/themes/dark/theme.css
index da4c056023..161c8d6df3 100644
--- a/src/components/themes/dark/theme.css
+++ b/src/components/themes/dark/theme.css
@@ -39,13 +39,12 @@ html {
background-color: rgba(0, 0, 0, .86)
}
-.paper-icon-button-light:hover {
+.paper-icon-button-light:hover:not(:disabled) {
color: #00a4dc;
background-color: rgba(0,164,220, .2);
- transition: 0.2s;
}
-.paper-icon-button-light:focus {
+.paper-icon-button-light.show-focus:focus {
color: #00a4dc;
}
@@ -70,6 +69,11 @@ html {
color: #fff
}
+.button-delete {
+ background: rgb(247, 0, 0);
+ color: rgba(255, 255, 255, .87)
+}
+
.checkboxLabel {
color: inherit
}
@@ -304,28 +308,25 @@ html {
color: #fff
}
-.emby-button-focusscale:focus {
+.emby-button.show-focus:focus {
background: #00a4dc;
color: #fff
}
.emby-tab-button {
color: #999;
- color: rgba(255, 255, 255, .4)
}
.emby-tab-button-active {
- color: #fff
-}
-
-.emby-tab-button-active.emby-button-tv {
- color: #999;
- color: rgba(255, 255, 255, .4)
-}
-
-.emby-tab-button.emby-button-tv:focus {
color: #fff;
- background: 0 0
+}
+
+.emby-tab-button.show-focus:focus {
+ color: #00a4dc;
+}
+
+.emby-tab-button:hover {
+ color: #00a4dc;
}
.channelPrograms,
@@ -379,7 +380,7 @@ html {
color: #00a4dc
}
-.guide-date-tab-button.emby-button-tv:focus {
+.guide-date-tab-button.show-focus:focus {
background-color: #00a4dc;
color: #fff
}
@@ -442,3 +443,7 @@ html {
.timeslotHeaders-desktop::-webkit-scrollbar {
height: .7em
}
+
+.metadataSidebarIcon {
+ color: #00a4dc
+}
diff --git a/src/components/themes/emby/theme.css b/src/components/themes/emby/theme.css
index d948c3ae6f..d018ec715a 100644
--- a/src/components/themes/emby/theme.css
+++ b/src/components/themes/emby/theme.css
@@ -39,13 +39,12 @@ html {
background-color: rgba(0, 0, 0, .86)
}
-.paper-icon-button-light:hover {
+.paper-icon-button-light:hover:not(:disabled) {
color: #52b54b;
background-color: rgba(82, 181, 75, .2);
- transition: 0.2s;
}
-.paper-icon-button-light:focus {
+.paper-icon-button-light.show-focus:focus {
color: #52b54b;
}
@@ -70,6 +69,11 @@ html {
color: #fff
}
+.button-delete {
+ background: rgb(247, 0, 0);
+ color: rgba(255, 255, 255, .87)
+}
+
.checkboxLabel {
color: inherit
}
@@ -304,27 +308,25 @@ html {
color: #fff
}
-.emby-button-focusscale:focus {
+.emby-button.show-focus:focus {
background: #52b54b;
color: #fff
}
.emby-tab-button {
color: #999;
- color: rgba(255, 255, 255, .4)
}
.emby-tab-button-active {
- color: #52b54b
-}
-
-.emby-tab-button-active.emby-button-tv {
- color: #fff
-}
-
-.emby-tab-button.emby-button-tv:focus {
color: #52b54b;
- background: 0 0
+}
+
+.emby-tab-button.show-focus:focus {
+ color: #52b54b;
+}
+
+.emby-tab-button:hover {
+ color: #52b54b;
}
.channelPrograms,
@@ -378,7 +380,7 @@ html {
color: #52b54b
}
-.guide-date-tab-button.emby-button-tv:focus {
+.guide-date-tab-button.show-focus:focus {
background-color: #52b54b;
color: #fff
}
@@ -441,3 +443,7 @@ html {
.timeslotHeaders-desktop::-webkit-scrollbar {
height: .7em
}
+
+.metadataSidebarIcon {
+ color: #00a4dc
+}
diff --git a/src/components/themes/light/theme.css b/src/components/themes/light/theme.css
index 65ceefb52c..f7cc4da9f3 100644
--- a/src/components/themes/light/theme.css
+++ b/src/components/themes/light/theme.css
@@ -55,13 +55,12 @@ html {
background-color: #f0f0f0
}
-.paper-icon-button-light:hover {
+.paper-icon-button-light:hover:not(:disabled) {
color: #00a4dc;
background-color: rgba(0,164,220, .2);
- transition: 0.2s;
}
-.paper-icon-button-light:focus {
+.paper-icon-button-light.show-focus:focus {
color: #00a4dc;
}
@@ -85,6 +84,11 @@ html {
background: #0cb0e8
}
+.button-delete {
+ background: rgb(247, 0, 0);
+ color: rgba(255, 255, 255, .87)
+}
+
.checkboxLabel {
color: inherit
}
@@ -323,27 +327,25 @@ html {
color: #fff
}
-.emby-button-focusscale:focus {
+.emby-button.show-focus:focus {
background: #00a4dc;
color: #fff
}
.emby-tab-button {
color: #999;
- color: rgba(255, 255, 255, .5)
}
.emby-tab-button-active {
- color: #00a4dc
-}
-
-.emby-tab-button-active.emby-button-tv {
- color: #fff
-}
-
-.emby-tab-button.emby-button-tv:focus {
color: #00a4dc;
- background: 0 0
+}
+
+.emby-tab-button.show-focus:focus {
+ color: #00a4dc;
+}
+
+.emby-tab-button:hover {
+ color: #00a4dc;
}
.channelPrograms,
@@ -397,7 +399,7 @@ html {
color: #00a4dc
}
-.guide-date-tab-button.emby-button-tv:focus {
+.guide-date-tab-button.show-focus:focus {
background-color: #00a4dc;
color: #fff
}
@@ -437,3 +439,7 @@ html {
.card:focus .card-focuscontent {
border-color: #00a4dc
}
+
+.metadataSidebarIcon {
+ color: #00a4dc
+}
diff --git a/src/components/themes/purple-haze/theme.css b/src/components/themes/purple-haze/theme.css
index 843b573059..684ac96f1f 100644
--- a/src/components/themes/purple-haze/theme.css
+++ b/src/components/themes/purple-haze/theme.css
@@ -58,13 +58,12 @@ html {
}
}
-.paper-icon-button-light:hover {
+.paper-icon-button-light:hover:not(:disabled) {
color: rgb(12, 232, 214);
background-color: rgba(0,164,220, .2);
- transition: 0.2s;
}
-.paper-icon-button-light:focus {
+.paper-icon-button-light.show-focus:focus {
color: #ff77f1;
}
@@ -144,6 +143,11 @@ a[data-role=button] {
background: #ff77f1
}
+.button-delete {
+ background: rgb(247, 0, 0);
+ color: rgba(255, 255, 255, .87)
+}
+
#btnResetPassword,
.btnForgotPassword,
.btnCancel,
@@ -420,27 +424,25 @@ a[data-role=button] {
color: #f8f8fe
}
-.emby-button-focusscale:focus {
+.emby-button.show-focus:focus {
background: #8ae9c1;
color: #f8f8fe
}
.emby-tab-button {
color: #999;
- color: rgba(255, 255, 255, .4)
}
.emby-tab-button-active {
- color: #f8f8fe
+ color: #f8f8fe;
}
-.emby-tab-button-active.emby-button-tv {
- color: #f8f8fe
-}
-
-.emby-tab-button.emby-button-tv:focus {
+.emby-tab-button.show-focus:focus {
+ color: #ff77f1;
+}
+
+.emby-tab-button:hover {
color: #ff77f1;
- background: 0 0
}
.channelPrograms,
@@ -494,7 +496,7 @@ a[data-role=button] {
color: #ff77f1
}
-.guide-date-tab-button.emby-button-tv:focus {
+.guide-date-tab-button.show-focus:focus {
background-color: #48C3C8;
color: #fff
}
@@ -569,3 +571,7 @@ a[data-role=button] {
background-color: #dbe6ff;
color: #0e0f2d;
}
+
+.metadataSidebarIcon {
+ color: #dbe6ff
+}
diff --git a/src/components/themes/wmc/theme.css b/src/components/themes/wmc/theme.css
index 081345c77c..239e920a3d 100644
--- a/src/components/themes/wmc/theme.css
+++ b/src/components/themes/wmc/theme.css
@@ -64,13 +64,12 @@ html {
background: rgba(17, 98, 164, .9)
}
-.paper-icon-button-light:hover {
+.paper-icon-button-light:hover:not(:disabled) {
color: #00a4dc;
background-color: rgba(0,164,220, .2);
- transition: 0.2s;
}
-.paper-icon-button-light:focus {
+.paper-icon-button-light.show-focus:focus {
color: #00a4dc;
}
@@ -95,6 +94,11 @@ html {
color: #fff
}
+.button-delete {
+ background: rgb(247, 0, 0);
+ color: rgba(255, 255, 255, .87)
+}
+
.checkboxLabel {
color: inherit
}
@@ -325,24 +329,25 @@ html {
color: #fff
}
-.emby-button-focusscale:focus {
+.emby-button.show-focus:focus {
background: #00a4dc;
color: #fff
}
.emby-tab-button {
color: #999;
- color: rgba(255, 255, 255, .5)
}
-.emby-tab-button-active,
-.emby-tab-button-active.emby-button-tv {
+.emby-tab-button-active {
color: #fff
}
-.emby-tab-button.emby-button-tv:focus {
+.emby-tab-button.show-focus:focus {
+ color: #fff;
+}
+
+.emby-tab-button:hover {
color: #fff;
- background: 0 0
}
.channelPrograms,
@@ -397,7 +402,7 @@ html {
color: #00a4dc
}
-.guide-date-tab-button.emby-button-tv:focus {
+.guide-date-tab-button.show-focus:focus {
background-color: #00a4dc;
color: #fff
}
@@ -456,3 +461,7 @@ html {
-webkit-border-radius: 2px;
background: center no-repeat rgba(255, 255, 255, .7)
}
+
+.metadataSidebarIcon {
+ color: #00a4dc
+}
diff --git a/src/controllers/dashboardgeneral.js b/src/controllers/dashboardgeneral.js
index 09aa1ec08e..c37e5e9a46 100644
--- a/src/controllers/dashboardgeneral.js
+++ b/src/controllers/dashboardgeneral.js
@@ -3,10 +3,11 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb
function loadPage(page, config, languageOptions, systemInfo) {
page.querySelector("#txtServerName").value = systemInfo.ServerName;
+ $("#chkAutoRunWebApp", page).checked(config.AutoRunWebApp);
if (systemInfo.CanLaunchWebBrowser) {
- page.querySelector("#fldRunWebAppAtStartup").classList.remove("hide");
+ page.querySelector("#fldAutoRunWebApp").classList.remove("hide");
} else {
- page.querySelector("#fldRunWebAppAtStartup").classList.add("hide");
+ page.querySelector("#fldAutoRunWebApp").classList.add("hide");
}
page.querySelector("#txtCachePath").value = systemInfo.CachePath || "";
$("#txtMetadataPath", page).val(systemInfo.InternalMetadataPath || "");
@@ -46,6 +47,7 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb
config.MetadataPath = $("#txtMetadataPath", form).val();
config.MetadataNetworkPath = $("#txtMetadataNetworkPath", form).val();
var requiresReload = (config.UICulture !== currentLanguage);
+ config.AutoRunWebApp = $("#chkAutoRunWebApp", form).checked();
config.EnableAutomaticRestart = $("#chkEnableAutomaticRestart", form).checked();
config.EnableAutoUpdate = $("#chkEnableAutomaticServerUpdates", form).checked();
ApiClient.updateServerConfiguration(config).then(function() {
diff --git a/src/controllers/dashboardpage.js b/src/controllers/dashboardpage.js
index 7c443e3087..339145ca4f 100644
--- a/src/controllers/dashboardpage.js
+++ b/src/controllers/dashboardpage.js
@@ -1,4 +1,4 @@
-define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globalize", "loading", "connectionManager", "playMethodHelper", "cardBuilder", "imageLoader", "components/activitylog", "scripts/imagehelper", "humanedate", "listViewStyle", "emby-button", "flexStyles", "emby-button", "emby-itemscontainer"], function (datetime, events, itemHelper, serverNotifications, dom, globalize, loading, connectionManager, playMethodHelper, cardBuilder, imageLoader, ActivityLog, imageHelper) {
+define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globalize", "loading", "connectionManager", "playMethodHelper", "cardBuilder", "imageLoader", "components/activitylog", "scripts/imagehelper", "indicators", "humanedate", "listViewStyle", "emby-button", "flexStyles", "emby-button", "emby-itemscontainer"], function (datetime, events, itemHelper, serverNotifications, dom, globalize, loading, connectionManager, playMethodHelper, cardBuilder, imageLoader, ActivityLog, imageHelper, indicators) {
"use strict";
function buttonEnabled(elem, enabled) {
@@ -12,27 +12,23 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
function showPlaybackInfo(btn, session) {
require(["alert"], function (alert) {
- var showTranscodeReasons;
var title;
var text = [];
- var displayPlayMethod = playMethodHelper.getDisplayPlayMethod(session);
- var isDirectStream = "DirectStream" === displayPlayMethod;
- var isTranscode = "Transcode" === displayPlayMethod;
- if (isDirectStream) {
+ var displayPlayMethod = playMethodHelper.getDisplayPlayMethod(session);
+ if (displayPlayMethod === "DirectStream") {
title = globalize.translate("DirectStreaming");
text.push(globalize.translate("DirectStreamHelp1"));
text.push("
");
text.push(globalize.translate("DirectStreamHelp2"));
- } else if (isTranscode) {
+ } else if (displayPlayMethod === "Transcode") {
title = globalize.translate("Transcoding");
text.push(globalize.translate("MediaIsBeingConverted"));
-
if (session.TranscodingInfo && session.TranscodingInfo.TranscodeReasons && session.TranscodingInfo.TranscodeReasons.length) {
text.push("
");
text.push(globalize.translate("LabelReasonForTranscoding"));
session.TranscodingInfo.TranscodeReasons.forEach(function (transcodeReason) {
- text.push(globalize.translate("" + transcodeReason));
+ text.push(globalize.translate(transcodeReason));
});
}
}
@@ -240,29 +236,24 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
var nowPlayingItem = session.NowPlayingItem;
var className = "scalableCard card activeSession backdropCard backdropCard-scalable";
- if (session.TranscodingInfo && session.TranscodingInfo.CompletionPercentage) {
- className += " transcodingSession";
- }
-
html += '
';
html += '
';
html += '
';
html += '
';
html += '
';
- var imgUrl = DashboardPage.getNowPlayingImageUrl(nowPlayingItem);
+ var imgUrl = DashboardPage.getNowPlayingImageUrl(nowPlayingItem);
if (imgUrl) {
html += '
";
} else {
- html += '
';
}
- html += ">
";
html += '
';
html += '
';
- var clientImage = DashboardPage.getClientImage(session);
+ var clientImage = DashboardPage.getClientImage(session);
if (clientImage) {
html += clientImage;
}
@@ -272,7 +263,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
html += '
' + DashboardPage.getAppSecondaryText(session) + "
";
html += "
";
html += "
";
- html += '
' + DashboardPage.getSessionNowPlayingTime(session) + "
";
if (session.TranscodingInfo && session.TranscodingInfo.Framerate) {
html += '
' + session.TranscodingInfo.Framerate + " fps
";
@@ -280,20 +270,28 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
html += '
';
}
+ html += '
'
var nowPlayingName = DashboardPage.getNowPlayingName(session);
html += '
';
html += nowPlayingName.html;
html += "
";
+ html += '
' + DashboardPage.getSessionNowPlayingTime(session) + "
";
+ html += '
'
+
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
- html += '
';
+ var percent = 100 * (session.PlayState.PositionTicks || 0) / nowPlayingItem.RunTimeTicks;
+ html += indicators.getProgressHtml(percent, { containerClass: "playbackProgress" });
} else {
- html += '
';
+ // need to leave the element in just in case the device starts playback
+ html += indicators.getProgressHtml(0, { containerClass: "playbackProgress hide" });
}
if (session.TranscodingInfo && session.TranscodingInfo.CompletionPercentage) {
- html += '
';
+ var percent = session.TranscodingInfo.CompletionPercentage.toFixed(1);
+ html += indicators.getProgressHtml(percent, { containerClass: "transcodingProgress" });
} else {
- html += '
';
+ // same issue as playbackProgress element above
+ html += indicators.getProgressHtml(0, { containerClass: "transcodingProgress hide" });
}
html += "
";
@@ -316,8 +314,8 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
html += '
';
var userImage = DashboardPage.getUserImage(session);
html += userImage ? '
' : '
';
- html += '
';
- html += DashboardPage.getUsersHtml(session) || " ";
+ html += '
';
+ html += DashboardPage.getUsersHtml(session);
html += "
";
html += "
";
html += "
";
@@ -328,7 +326,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
parentElement.insertAdjacentHTML("beforeend", html);
var deadSessionElem = parentElement.querySelector(".deadSession");
-
if (deadSessionElem) {
deadSessionElem.parentNode.removeChild(deadSessionElem);
}
@@ -398,13 +395,12 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
}
if (showTranscodingInfo) {
var line = [];
-
if (session.TranscodingInfo) {
if (session.TranscodingInfo.Bitrate) {
if (session.TranscodingInfo.Bitrate > 1e6) {
line.push((session.TranscodingInfo.Bitrate / 1e6).toFixed(1) + " Mbps");
} else {
- line.push(Math.floor(session.TranscodingInfo.Bitrate / 1e3) + " kbps");
+ line.push(Math.floor(session.TranscodingInfo.Bitrate / 1e3) + " Kbps");
}
}
@@ -426,7 +422,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
}
}
- return html || " ";
+ return html;
},
getSessionNowPlayingTime: function (session) {
var nowPlayingItem = session.NowPlayingItem;
@@ -436,7 +432,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
if (session.PlayState.PositionTicks) {
html += datetime.getDisplayRunningTime(session.PlayState.PositionTicks);
} else {
- html += "--:--:--";
+ html += "0:00";
}
html += " / ";
@@ -444,10 +440,8 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
html += datetime.getDisplayRunningTime(nowPlayingItem.RunTimeTicks);
} else {
- html += "--:--:--";
+ html += "0:00";
}
-
- return html;
}
return html;
@@ -488,15 +482,13 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
maxWidth: 130,
type: "Logo"
});
- } else {
- if (nowPlayingItem.ParentLogoImageTag) {
- imgUrl = ApiClient.getScaledImageUrl(nowPlayingItem.ParentLogoItemId, {
- tag: nowPlayingItem.ParentLogoImageTag,
- maxHeight: 24,
- maxWidth: 130,
- type: "Logo"
- });
- }
+ } else if (nowPlayingItem.ParentLogoImageTag) {
+ imgUrl = ApiClient.getScaledImageUrl(nowPlayingItem.ParentLogoItemId, {
+ tag: nowPlayingItem.ParentLogoImageTag,
+ maxHeight: 24,
+ maxWidth: 130,
+ type: "Logo"
+ });
}
if (imgUrl) {
@@ -510,7 +502,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
},
getUsersHtml: function (session) {
var html = [];
-
if (session.UserId) {
html.push(session.UserName);
}
@@ -534,8 +525,8 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
},
updateSession: function (row, session) {
row.classList.remove("deadSession");
- var nowPlayingItem = session.NowPlayingItem;
+ var nowPlayingItem = session.NowPlayingItem;
if (nowPlayingItem) {
row.classList.add("playingSession");
} else {
@@ -555,7 +546,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
}
var btnSessionPlayPause = row.querySelector(".btnSessionPlayPause");
-
if (session.ServerId && nowPlayingItem && session.SupportsRemoteControl && session.DeviceId !== connectionManager.deviceId()) {
btnSessionPlayPause.classList.remove("hide");
row.querySelector(".btnSessionStop").classList.remove("hide");
@@ -572,7 +562,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
row.querySelector(".sessionNowPlayingStreamInfo").innerHTML = DashboardPage.getSessionNowPlayingStreamInfo(session);
row.querySelector(".sessionNowPlayingTime").innerHTML = DashboardPage.getSessionNowPlayingTime(session);
- row.querySelector(".sessionUserName").innerHTML = DashboardPage.getUsersHtml(session) || " ";
+ row.querySelector(".sessionUserName").innerHTML = DashboardPage.getUsersHtml(session);
row.querySelector(".sessionAppSecondaryText").innerHTML = DashboardPage.getAppSecondaryText(session);
row.querySelector(".sessionTranscodingFramerate").innerHTML = session.TranscodingInfo && session.TranscodingInfo.Framerate ? session.TranscodingInfo.Framerate + " fps" : "";
var nowPlayingName = DashboardPage.getNowPlayingName(session);
@@ -584,27 +574,19 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
}
var playbackProgressElem = row.querySelector(".playbackProgress");
-
- if (playbackProgressElem) {
- if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
- var position = session.PlayState.PositionTicks || 0;
- var value = 100 * position / nowPlayingItem.RunTimeTicks;
- playbackProgressElem.classList.remove("hide");
- playbackProgressElem.value = value;
- } else {
- playbackProgressElem.classList.add("hide");
- }
+ if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
+ var percent = 100 * (session.PlayState.PositionTicks || 0) / nowPlayingItem.RunTimeTicks;
+ html += indicators.getProgressHtml(percent, { containerClass: "playbackProgress" });
+ } else {
+ html += indicators.getProgressHtml(0, { containerClass: "playbackProgress hide" });
}
var transcodingProgress = row.querySelector(".transcodingProgress");
-
if (session.TranscodingInfo && session.TranscodingInfo.CompletionPercentage) {
- row.classList.add("transcodingSession");
- transcodingProgress.value = session.TranscodingInfo.CompletionPercentage;
- transcodingProgress.classList.remove("hide");
+ var percent = session.TranscodingInfo.CompletionPercentage.toFixed(1);
+ html += indicators.getProgressHtml(percent, { containerClass: "transcodingProgress" });
} else {
- transcodingProgress.classList.add("hide");
- row.classList.remove("transcodingSession");
+ html += indicators.getProgressHtml(0, { containerClass: "transcodingProgress hide" });
}
var imgUrl = DashboardPage.getNowPlayingImageUrl(nowPlayingItem) || "";
@@ -692,6 +674,14 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
});
}
+ if (item && item.AlbumPrimaryImageTag) {
+ return ApiClient.getScaledImageUrl(item.AlbumId, {
+ type: "Primary",
+ width: 275,
+ tag: item.AlbumPrimaryImageTag
+ });
+ }
+
return null;
},
systemUpdateTaskKey: "SystemUpdateTask",
@@ -707,7 +697,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
title: globalize.translate("HeaderRestart"),
text: globalize.translate("MessageConfirmRestart"),
confirmText: globalize.translate("ButtonRestart"),
- primary: "cancel"
+ primary: "delete"
}).then(function () {
var page = dom.parentWithClass(btn, "page");
buttonEnabled(page.querySelector("#btnRestartServer"), false);
@@ -722,7 +712,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
title: globalize.translate("HeaderShutdown"),
text: globalize.translate("MessageConfirmShutdown"),
confirmText: globalize.translate("ButtonShutdown"),
- primary: "cancel"
+ primary: "delete"
}).then(function () {
var page = dom.parentWithClass(btn, "page");
buttonEnabled(page.querySelector("#btnRestartServer"), false);
@@ -787,7 +777,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
loading.show();
pollForInfo(page, apiClient);
DashboardPage.startInterval(apiClient);
- // TODO we currently don't support packages and thus these events are useless
events.on(serverNotifications, "RestartRequired", onRestartRequired);
events.on(serverNotifications, "ServerShuttingDown", onServerShuttingDown);
events.on(serverNotifications, "ServerRestarting", onServerRestarting);
diff --git a/src/controllers/devices.js b/src/controllers/devices.js
index ef24f19172..d50f9ce7e5 100644
--- a/src/controllers/devices.js
+++ b/src/controllers/devices.js
@@ -12,7 +12,7 @@ define(["loading", "dom", "libraryMenu", "globalize", "scripts/imagehelper", "hu
text: msg,
title: globalize.translate("HeaderDeleteDevice"),
confirmText: globalize.translate("ButtonDelete"),
- primary: "cancel"
+ primary: "delete"
}).then(function() {
loading.show(), ApiClient.ajax({
type: "DELETE",
@@ -112,4 +112,4 @@ define(["loading", "dom", "libraryMenu", "globalize", "scripts/imagehelper", "hu
loadData(this)
})
}
-});
\ No newline at end of file
+});
diff --git a/src/controllers/encodingsettings.js b/src/controllers/encodingsettings.js
index a66c5a49a4..0319d59a79 100644
--- a/src/controllers/encodingsettings.js
+++ b/src/controllers/encodingsettings.js
@@ -10,7 +10,7 @@ define(["jQuery", "loading", "globalize", "dom", "libraryMenu"], function($, loa
$("#selectThreadCount", page).val(config.EncodingThreadCount);
$("#txtDownMixAudioBoost", page).val(config.DownMixAudioBoost);
page.querySelector(".txtEncoderPath").value = config.EncoderAppPathDisplay || "";
- $("#txtTranscodingTempPath", page).val(config.TranscodingTempPath || "");
+ $("#txtTranscodingTempPath", page).val(systemInfo.TranscodingTempPath || "");
$("#txtVaapiDevice", page).val(config.VaapiDevice || "");
page.querySelector("#selectH264Preset").value = config.H264Preset || "";
page.querySelector("#txtH264Crf").value = config.H264Crf || "";
diff --git a/src/controllers/favorites.js b/src/controllers/favorites.js
index 4412ec6e9b..6c521f7bfe 100644
--- a/src/controllers/favorites.js
+++ b/src/controllers/favorites.js
@@ -108,6 +108,15 @@ define(["appRouter", "cardBuilder", "dom", "globalize", "connectionManager", "ap
overlayMoreButton: !0,
action: "instantmix",
coverImage: !0
+ }, {
+ name: "HeaderFavoriteBooks",
+ types: "Book",
+ shape: getPosterShape(),
+ showTitle: true,
+ showYear: true,
+ overlayPlayButton: true,
+ overlayText: false,
+ centerText: true
}]
}
diff --git a/src/controllers/installedplugins.js b/src/controllers/installedplugins.js
index 40de0cc191..f9653fe260 100644
--- a/src/controllers/installedplugins.js
+++ b/src/controllers/installedplugins.js
@@ -7,7 +7,7 @@ define(["loading", "libraryMenu", "dom", "globalize", "cardStyle", "emby-button"
confirm({
title: globalize.translate("UninstallPluginHeader"),
text: msg,
- primary: "cancel",
+ primary: "delete",
confirmText: globalize.translate("UninstallPluginHeader")
}).then(function() {
loading.show();
diff --git a/src/controllers/itemdetailpage.js b/src/controllers/itemdetailpage.js
index 9149d78391..cd701a481a 100644
--- a/src/controllers/itemdetailpage.js
+++ b/src/controllers/itemdetailpage.js
@@ -235,7 +235,20 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
var name = itemHelper.getDisplayName(item, {
includeParentInfo: !1
});
- html && !parentNameLast ? html += '
' + name + " " : html = parentNameLast ? '
' + name + " " + html : '
' + name + " " + html, container.innerHTML = html, html.length ? container.classList.remove("hide") : container.classList.add("hide")
+
+ var offset = parentNameLast ? ".25em" : ".5em";
+ if (html && !parentNameLast) {
+ html += '
' + name + ' ';
+ } else {
+ html = '
' + name + " " + html;
+ }
+
+ if (item.OriginalTitle && item.OriginalTitle != item.Name) {
+ html += '
' + item.OriginalTitle + ' ';
+ }
+
+ container.innerHTML = html;
+ html.length ? container.classList.remove("hide") : container.classList.add("hide")
}
function setTrailerButtonVisibility(page, item) {
@@ -361,7 +374,7 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
function renderLogo(page, item, apiClient) {
var url = logoImageUrl(item, apiClient, {
- maxWidth: 300
+ maxWidth: 400
}),
detailLogo = page.querySelector(".detailLogo");
url ? (detailLogo.classList.remove("hide"), detailLogo.classList.add("lazy"), detailLogo.setAttribute("data-src", url), imageLoader.lazyImage(detailLogo)) : detailLogo.classList.add("hide")
@@ -380,6 +393,18 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
}
}
+ function renderUserInfo(page, item) {
+ var lastPlayedElement = page.querySelector(".itemLastPlayed");
+
+ if (item.UserData && item.UserData.LastPlayedDate) {
+ lastPlayedElement.classList.remove("hide");
+ var datePlayed = datetime.parseISO8601Date(item.UserData.LastPlayedDate);
+ lastPlayedElement.innerHTML = globalize.translate("DatePlayed") + " " + datetime.toLocaleDateString(datePlayed) + " " + datetime.getDisplayTime(datePlayed);
+ } else {
+ lastPlayedElement.classList.add("hide");
+ }
+ }
+
function renderLinks(linksElem, item) {
var html = [];
if (item.DateCreated && itemHelper.enableDateAddedDisplay(item)) {
@@ -404,7 +429,7 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
detectRatio = !1;
imageTags.Primary ? (url = apiClient.getScaledImageUrl(item.Id, {
type: "Primary",
- maxHeight: 360,
+ maxHeight: 460,
tag: item.ImageTags.Primary
}), detectRatio = !0) : item.BackdropImageTags && item.BackdropImageTags.length ? (url = apiClient.getScaledImageUrl(item.Id, {
type: "Backdrop",
@@ -531,22 +556,64 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
}
function renderDetails(page, item, apiClient, context, isStatic) {
- renderSimilarItems(page, item, context), renderMoreFromSeason(page, item, apiClient), renderMoreFromArtist(page, item, apiClient), renderDirector(page, item, apiClient, context, isStatic), renderGenres(page, item, apiClient, context, isStatic), renderChannelGuide(page, apiClient, item);
+ renderSimilarItems(page, item, context);
+ renderMoreFromSeason(page, item, apiClient);
+ renderMoreFromArtist(page, item, apiClient);
+ renderDirector(page, item, apiClient, context, isStatic);
+ renderGenres(page, item, apiClient, context, isStatic);
+ renderChannelGuide(page, apiClient, item);
+
var taglineElement = page.querySelector(".tagline");
- item.Taglines && item.Taglines.length ? (taglineElement.classList.remove("hide"), taglineElement.innerHTML = item.Taglines[0]) : taglineElement.classList.add("hide");
- var overview = page.querySelector(".overview"),
- externalLinksElem = page.querySelector(".itemExternalLinks");
- "Season" !== item.Type && "MusicAlbum" !== item.Type && "MusicArtist" !== item.Type || (overview.classList.add("detailsHiddenOnMobile"), externalLinksElem.classList.add("detailsHiddenOnMobile")), renderOverview([overview], item);
- var i, length, itemMiscInfo = page.querySelectorAll(".itemMiscInfo-primary");
- for (i = 0, length = itemMiscInfo.length; i < length; i++) mediaInfo.fillPrimaryMediaInfo(itemMiscInfo[i], item, {
- interactive: !0,
- episodeTitle: !1,
- subtitles: !1
- }), itemMiscInfo[i].innerHTML && "SeriesTimer" !== item.Type ? itemMiscInfo[i].classList.remove("hide") : itemMiscInfo[i].classList.add("hide");
- for (itemMiscInfo = page.querySelectorAll(".itemMiscInfo-secondary"), i = 0, length = itemMiscInfo.length; i < length; i++) mediaInfo.fillSecondaryMediaInfo(itemMiscInfo[i], item, {
- interactive: !0
- }), itemMiscInfo[i].innerHTML ? itemMiscInfo[i].classList.remove("hide") : itemMiscInfo[i].classList.add("hide");
- reloadUserDataButtons(page, item), renderLinks(externalLinksElem, item), renderTags(page, item), renderSeriesAirTime(page, item, isStatic)
+ if (item.Taglines && item.Taglines.length) {
+ taglineElement.classList.remove("hide");
+ taglineElement.innerHTML = item.Taglines[0];
+ } else {
+ taglineElement.classList.add("hide");
+ }
+
+ var overview = page.querySelector(".overview");
+ var externalLinksElem = page.querySelector(".itemExternalLinks");
+
+ if ("Season" !== item.Type && "MusicAlbum" !== item.Type && "MusicArtist" !== item.Type) {
+ overview.classList.add("detailsHiddenOnMobile");
+ externalLinksElem.classList.add("detailsHiddenOnMobile");
+ }
+ renderOverview([overview], item);
+
+ var i, itemMiscInfo;
+ itemMiscInfo = page.querySelectorAll(".itemMiscInfo-primary");
+ for (i = 0; i < itemMiscInfo.length; i++) {
+ mediaInfo.fillPrimaryMediaInfo(itemMiscInfo[i], item, {
+ interactive: !0,
+ episodeTitle: !1,
+ subtitles: !1
+ });
+
+ if (itemMiscInfo[i].innerHTML && "SeriesTimer" !== item.Type) {
+ itemMiscInfo[i].classList.remove("hide");
+ } else {
+ itemMiscInfo[i].classList.add("hide");
+ }
+ }
+
+ itemMiscInfo = page.querySelectorAll(".itemMiscInfo-secondary")
+ for (i = 0; i < itemMiscInfo.length; i++) {
+ mediaInfo.fillSecondaryMediaInfo(itemMiscInfo[i], item, {
+ interactive: !0
+ })
+
+ if (itemMiscInfo[i].innerHTML && "SeriesTimer" !== item.Type) {
+ itemMiscInfo[i].classList.remove("hide");
+ } else {
+ itemMiscInfo[i].classList.add("hide");
+ }
+ }
+
+ reloadUserDataButtons(page, item);
+ renderLinks(externalLinksElem, item);
+ renderUserInfo(page, item);
+ renderTags(page, item);
+ renderSeriesAirTime(page, item, isStatic)
}
function enableScrollX() {
diff --git a/src/controllers/medialibrarypage.js b/src/controllers/medialibrarypage.js
index 405d38bfa7..6ce5f7fac7 100644
--- a/src/controllers/medialibrarypage.js
+++ b/src/controllers/medialibrarypage.js
@@ -1,48 +1,61 @@
-define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "globalize", "dom", "indicators", "scripts/imagehelper", "cardStyle", "emby-itemrefreshindicator"], function($, appHost, taskButton, loading, libraryMenu, globalize, dom, indicators, imageHelper) {
+define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "globalize", "dom", "indicators", "scripts/imagehelper", "cardStyle", "emby-itemrefreshindicator"], function ($, appHost, taskButton, loading, libraryMenu, globalize, dom, indicators, imageHelper) {
"use strict";
function addVirtualFolder(page) {
- require(["medialibrarycreator"], function(medialibrarycreator) {
- (new medialibrarycreator).show({
- collectionTypeOptions: getCollectionTypeOptions().filter(function(f) {
+ require(["medialibrarycreator"], function (medialibrarycreator) {
+ new medialibrarycreator().show({
+ collectionTypeOptions: getCollectionTypeOptions().filter(function (f) {
return !f.hidden;
}),
refresh: shouldRefreshLibraryAfterChanges(page)
- }).then(function(hasChanges) {
- hasChanges && reloadLibrary(page);
- })
- })
+ }).then(function (hasChanges) {
+ if (hasChanges) {
+ reloadLibrary(page);
+ }
+ });
+ });
}
function editVirtualFolder(page, virtualFolder) {
- require(["medialibraryeditor"], function(medialibraryeditor) {
- (new medialibraryeditor).show({
+ require(["medialibraryeditor"], function (medialibraryeditor) {
+ new medialibraryeditor().show({
refresh: shouldRefreshLibraryAfterChanges(page),
library: virtualFolder
- }).then(function(hasChanges) {
- hasChanges && reloadLibrary(page);
- })
- })
+ }).then(function (hasChanges) {
+ if (hasChanges) {
+ reloadLibrary(page);
+ }
+ });
+ });
}
function deleteVirtualFolder(page, virtualFolder) {
var msg = globalize.translate("MessageAreYouSureYouWishToRemoveMediaFolder");
+
if (virtualFolder.Locations.length) {
msg += "
" + globalize.translate("MessageTheFollowingLocationWillBeRemovedFromLibrary") + "
";
msg += virtualFolder.Locations.join("
");
}
- require(["confirm"], function(confirm) {
- confirm(msg, globalize.translate("HeaderRemoveMediaFolder")).then(function() {
+
+ require(["confirm"], function (confirm) {
+ confirm({
+
+ text: msg,
+ title: globalize.translate('HeaderRemoveMediaFolder'),
+ confirmText: globalize.translate('Delete'),
+ primary: 'delete'
+
+ }).then(function () {
var refreshAfterChange = shouldRefreshLibraryAfterChanges(page);
- ApiClient.removeVirtualFolder(virtualFolder.Name, refreshAfterChange).then(function() {
+ ApiClient.removeVirtualFolder(virtualFolder.Name, refreshAfterChange).then(function () {
reloadLibrary(page);
- })
- })
- })
+ });
+ });
+ });
}
function refreshVirtualFolder(page, virtualFolder) {
- require(["refreshDialog"], function(refreshDialog) {
+ require(["refreshDialog"], function (refreshDialog) {
new refreshDialog({
itemIds: [virtualFolder.ItemId],
serverId: ApiClient.serverId(),
@@ -52,14 +65,14 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
}
function renameVirtualFolder(page, virtualFolder) {
- require(["prompt"], function(prompt) {
+ require(["prompt"], function (prompt) {
prompt({
label: globalize.translate("LabelNewName"),
confirmText: globalize.translate("ButtonRename")
- }).then(function(newName) {
+ }).then(function (newName) {
if (newName && newName != virtualFolder.Name) {
var refreshAfterChange = shouldRefreshLibraryAfterChanges(page);
- ApiClient.renameVirtualFolder(virtualFolder.Name, newName, refreshAfterChange).then(function() {
+ ApiClient.renameVirtualFolder(virtualFolder.Name, newName, refreshAfterChange).then(function () {
reloadLibrary(page);
});
}
@@ -97,24 +110,29 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
id: "refresh",
ironIcon: "refresh"
});
- require(["actionsheet"], function(actionsheet) {
+
+ require(["actionsheet"], function (actionsheet) {
actionsheet.show({
items: menuItems,
positionTo: elem,
- callback: function(resultId) {
+ callback: function (resultId) {
switch (resultId) {
case "edit":
editVirtualFolder(page, virtualFolder);
break;
+
case "editimages":
editImages(page, virtualFolder);
break;
+
case "rename":
renameVirtualFolder(page, virtualFolder);
break;
+
case "delete":
deleteVirtualFolder(page, virtualFolder);
break;
+
case "refresh":
refreshVirtualFolder(page, virtualFolder);
}
@@ -125,7 +143,7 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
function reloadLibrary(page) {
loading.show();
- ApiClient.getVirtualFolders().then(function(result) {
+ ApiClient.getVirtualFolders().then(function (result) {
reloadVirtualFolders(page, result);
});
}
@@ -148,36 +166,40 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
for (var i = 0; i < virtualFolders.length; i++) {
var virtualFolder = virtualFolders[i];
- html += getVirtualFolderHtml(page, virtualFolder, i)
+ html += getVirtualFolderHtml(page, virtualFolder, i);
}
+
var divVirtualFolders = page.querySelector("#divVirtualFolders");
divVirtualFolders.innerHTML = html;
divVirtualFolders.classList.add("itemsContainer");
divVirtualFolders.classList.add("vertical-wrap");
- $(".btnCardMenu", divVirtualFolders).on("click", function() {
+ $(".btnCardMenu", divVirtualFolders).on("click", function () {
showCardMenu(page, this, virtualFolders);
});
- divVirtualFolders.querySelector(".addLibrary").addEventListener("click", function() {
+ divVirtualFolders.querySelector(".addLibrary").addEventListener("click", function () {
addVirtualFolder(page);
});
- $(".editLibrary", divVirtualFolders).on("click", function() {
+ $(".editLibrary", divVirtualFolders).on("click", function () {
var card = $(this).parents(".card")[0];
var index = parseInt(card.getAttribute("data-index"));
var virtualFolder = virtualFolders[index];
- virtualFolder.ItemId && editVirtualFolder(page, virtualFolder);
+
+ if (virtualFolder.ItemId) {
+ editVirtualFolder(page, virtualFolder);
+ }
});
loading.hide();
}
function editImages(page, virtualFolder) {
- require(["imageEditor"], function(imageEditor) {
+ require(["imageEditor"], function (imageEditor) {
imageEditor.show({
itemId: virtualFolder.ItemId,
serverId: ApiClient.serverId()
- }).then(function() {
+ }).then(function () {
reloadLibrary(page);
});
- })
+ });
}
function getLink(text, url) {
@@ -214,25 +236,32 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
name: globalize.translate("FolderTypeUnset"),
value: "mixed",
message: globalize.translate("MessageUnsetContentHelp")
- }]
+ }];
}
function getVirtualFolderHtml(page, virtualFolder, index) {
var html = "";
var style = "";
- page.classList.contains("wizardPage") && (style += "min-width:33.3%;");
+
+ if (page.classList.contains("wizardPage")) {
+ style += "min-width:33.3%;";
+ }
+
html += '
';
html += '
';
html += '
';
html += '
';
html += '
';
var imgUrl = "";
+
if (virtualFolder.PrimaryImageItemId) {
imgUrl = ApiClient.getScaledImageUrl(virtualFolder.PrimaryImageItemId, {
type: "Primary"
});
}
+
var hasCardImageContainer;
+
if (imgUrl) {
html += '
";
hasCardImageContainer = true;
@@ -241,38 +270,60 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
html += '
' + (virtualFolder.icon || imageHelper.getLibraryIcon(virtualFolder.CollectionType)) + " ";
hasCardImageContainer = true;
}
+
if (hasCardImageContainer) {
html += '
";
html += "
";
}
+
if (!imgUrl && virtualFolder.showNameWithIcon) {
html += '
';
html += '' + (virtualFolder.icon || imageHelper.getLibraryIcon(virtualFolder.CollectionType)) + " ";
- virtualFolder.showNameWithIcon && (html += ' ', html += virtualFolder.Name, html += "
");
+
+ if (virtualFolder.showNameWithIcon) {
+ html += '';
+ html += virtualFolder.Name;
+ html += "
";
+ }
+
html += "";
}
- html += "
";
- html += "
";
- html += '";
+ html += "
";
+ html += '";
html += "
";
html += "
";
@@ -305,18 +357,18 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
}, {
href: "metadatanfo.html",
name: globalize.translate("TabNfoSettings")
- }]
+ }];
}
window.WizardLibraryPage = {
- next: function() {
- Dashboard.navigate("wizardsettings.html")
+ next: function () {
+ Dashboard.navigate("wizardsettings.html");
}
};
- pageClassOn("pageshow", "mediaLibraryPage", function() {
+ pageClassOn("pageshow", "mediaLibraryPage", function () {
reloadLibrary(this);
});
- pageIdOn("pageshow", "mediaLibraryPage", function() {
+ pageIdOn("pageshow", "mediaLibraryPage", function () {
libraryMenu.setTabs("librarysetup", 0, getTabs);
var page = this;
taskButton({
@@ -326,7 +378,7 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
button: page.querySelector(".btnRefresh")
});
});
- pageIdOn("pagebeforehide", "mediaLibraryPage", function() {
+ pageIdOn("pagebeforehide", "mediaLibraryPage", function () {
var page = this;
taskButton({
mode: "off",
diff --git a/src/controllers/movies/movies.js b/src/controllers/movies/movies.js
index 1ee558e6e3..e0a5947ca6 100644
--- a/src/controllers/movies/movies.js
+++ b/src/controllers/movies/movies.js
@@ -140,31 +140,31 @@ define(["loading", "layoutManager", "userSettings", "events", "libraryBrowser",
libraryBrowser.showSortMenu({
items: [{
name: Globalize.translate("OptionNameSort"),
- id: "SortName"
+ id: "SortName,ProductionYear"
}, {
name: Globalize.translate("OptionImdbRating"),
- id: "CommunityRating,SortName"
+ id: "CommunityRating,SortName,ProductionYear"
}, {
name: Globalize.translate("OptionCriticRating"),
- id: "CriticRating,SortName"
+ id: "CriticRating,SortName,ProductionYear"
}, {
name: Globalize.translate("OptionDateAdded"),
- id: "DateCreated,SortName"
+ id: "DateCreated,SortName,ProductionYear"
}, {
name: Globalize.translate("OptionDatePlayed"),
- id: "DatePlayed,SortName"
+ id: "DatePlayed,SortName,ProductionYear"
}, {
name: Globalize.translate("OptionParentalRating"),
- id: "OfficialRating,SortName"
+ id: "OfficialRating,SortName,ProductionYear"
}, {
name: Globalize.translate("OptionPlayCount"),
- id: "PlayCount,SortName"
+ id: "PlayCount,SortName,ProductionYear"
}, {
name: Globalize.translate("OptionReleaseDate"),
- id: "PremiereDate,SortName"
+ id: "PremiereDate,SortName,ProductionYear"
}, {
name: Globalize.translate("OptionRuntime"),
- id: "Runtime,SortName"
+ id: "Runtime,SortName,ProductionYear"
}],
callback: function() {
query.StartIndex = 0, userSettings.saveQuerySettings(savedQueryKey, query), itemsContainer.refreshItems()
@@ -189,7 +189,7 @@ define(["loading", "layoutManager", "userSettings", "events", "libraryBrowser",
savedQueryKey = params.topParentId + "-" + options.mode,
savedViewKey = savedQueryKey + "-view",
query = {
- SortBy: "SortName",
+ SortBy: "SortName,ProductionYear",
SortOrder: "Ascending",
IncludeItemTypes: "Movie",
Recursive: !0,
diff --git a/src/controllers/useredit.js b/src/controllers/useredit.js
index 356a93c4e7..0709e8dae9 100644
--- a/src/controllers/useredit.js
+++ b/src/controllers/useredit.js
@@ -13,7 +13,7 @@ define(["jQuery", "loading", "libraryMenu", "fnchecked"], function($, loading, l
}
function loadAuthProviders(page, user, providers) {
- providers.length > 1 && !user.Policy.IsAdministrator ? page.querySelector(".fldSelectLoginProvider").classList.remove("hide") : page.querySelector(".fldSelectLoginProvider").classList.add("hide");
+ providers.length > 1 ? page.querySelector(".fldSelectLoginProvider").classList.remove("hide") : page.querySelector(".fldSelectLoginProvider").classList.add("hide");
var currentProviderId = user.Policy.AuthenticationProviderId;
page.querySelector(".selectLoginProvider").innerHTML = providers.map(function(provider) {
var selected = provider.Id === currentProviderId || providers.length < 2 ? " selected" : "";
@@ -22,11 +22,7 @@ define(["jQuery", "loading", "libraryMenu", "fnchecked"], function($, loading, l
}
function loadPasswordResetProviders(page, user, providers) {
- if (providers.length > 1 && !user.Policy.IsAdministrator) {
- page.querySelector(".fldSelectPasswordResetProvider").classList.remove("hide");
- } else {
- page.querySelector(".fldSelectPasswordResetProvider").classList.add("hide");
- }
+ providers.length > 1 ? page.querySelector(".fldSelectPasswordResetProvider").classList.remove("hide") : page.querySelector(".fldSelectPasswordResetProvider").classList.add("hide");
var currentProviderId = user.Policy.PasswordResetProviderId;
page.querySelector(".selectPasswordResetProvider").innerHTML = providers.map(function(provider) {
var selected = (provider.Id === currentProviderId || providers.length < 2) ? " selected" : "";
diff --git a/src/controllers/userprofilespage.js b/src/controllers/userprofilespage.js
index c0d1d0d87b..f76bb35e6a 100644
--- a/src/controllers/userprofilespage.js
+++ b/src/controllers/userprofilespage.js
@@ -9,7 +9,7 @@ define(["loading", "dom", "globalize", "humanedate", "paper-icon-button-light",
title: globalize.translate("DeleteUser"),
text: msg,
confirmText: globalize.translate("ButtonDelete"),
- primary: "cancel"
+ primary: "delete"
}).then(function () {
loading.show();
ApiClient.deleteUser(id).then(function () {
@@ -207,7 +207,7 @@ define(["loading", "dom", "globalize", "humanedate", "paper-icon-button-light",
page.querySelector(".pending").innerHTML = users.map(getPendingUserHtml).join("");
}
-
+
// TODO cvium: maybe reuse for invitation system
function cancelAuthorization(page, id) {
loading.show();
@@ -230,7 +230,7 @@ define(["loading", "dom", "globalize", "humanedate", "paper-icon-button-light",
// TODO cvium
renderPendingGuests(page, []);
// ApiClient.getJSON(ApiClient.getUrl("Connect/Pending")).then(function (pending) {
- //
+ //
// });
}
diff --git a/src/css/dashboard.css b/src/css/dashboard.css
index 8ee6c69c8d..b07adc96ef 100644
--- a/src/css/dashboard.css
+++ b/src/css/dashboard.css
@@ -272,10 +272,9 @@ div[data-role=controlgroup] a.ui-btn-active {
position: relative
}
-.sessionAppInfo,
-.sessionNowPlayingInfo {
- padding: .5em;
- overflow: hidden
+.sessionAppInfo {
+ padding: 0.5em;
+ overflow: hidden;
}
.sessionCardButtons {
@@ -317,105 +316,60 @@ div[data-role=controlgroup] a.ui-btn-active {
max-width: 200px
}
-.sessionNowPlayingInfo {
+.sessionNowPlayingDetails {
+ display: flex;
position: absolute;
- left: 0;
- bottom: 11px;
- max-width: 50%;
- -o-text-overflow: ellipsis;
- text-overflow: ellipsis
+ bottom: 0px;
+ width: 100%;
+}
+
+.sessionNowPlayingInfo {
+ flex-grow: 1;
+ text-overflow: ellipsis;
+ padding: 0.8em 0.5em;
}
.sessionAppInfo img {
- max-width: 32px;
- max-height: 32px;
- margin-right: 5px
-}
-
-.activeSession .playbackProgress {
- position: absolute;
- right: 0;
- bottom: 0;
- left: 0;
- height: 7px;
- width: 100%;
- opacity: .95
-}
-
-.activeSession:not(.playingSession) .sessionNowPlayingInfo {
- bottom: 0
+ max-width: 40px;
+ max-height: 40px;
+ margin-right: 8px;
}
.sessionNowPlayingTime {
- position: absolute;
- right: 10px;
- bottom: 19px
+ flex-shrink: 0;
+ align-self: flex-end;
+ text-overflow: ellipsis;
+ padding: 0.8em 0.5em;
}
.sessionNowPlayingStreamInfo {
- white-space: nowrap
+ white-space: nowrap;
}
+.activeSession .playbackProgress,
.activeSession .transcodingProgress {
+ position: absolute;
right: 0;
bottom: 0;
left: 0;
- height: 5px;
+ height: 6px;
width: 100%;
- opacity: .9;
- position: absolute
}
.playbackProgress,
.transcodingProgress {
- appearance: none;
- -moz-appearance: none;
- -webkit-appearance: none;
- margin: 0 5px 0 0;
- height: 14px;
- border: 0 solid #222;
- -webkit-border-radius: 0;
- border-radius: 0;
- width: 50px;
- background: #000 !important
+ margin: 0px;
+ width: 100%;
+ background: transparent !important;
}
-.playbackProgress::-webkit-progress-bar,
-.transcodingProgress::-webkit-progress-bar {
- background: #000
+.playbackProgress > div {
+ z-index: 1000;
+ background-color: #00a4dc;
}
-.transcodingSession .playbackProgress {
- bottom: 5px
-}
-
-.transcodingProgress::-moz-progress-bar {
- border-radius: .3em;
- background-color: #dd4919
-}
-
-.transcodingProgress::-webkit-progress-value {
- -webkit-border-radius: .3em;
- border-radius: .3em;
- background-color: #dd4919
-}
-
-.transcodingProgress[aria-valuenow]:before {
- -webkit-border-radius: .3em;
- border-radius: .3em;
- background-color: #dd4919
-}
-
-.playbackProgress::-moz-progress-bar {
- background-color: #00a4dc
-}
-
-.playbackProgress::-webkit-progress-value {
- background-color: #00a4dc
-}
-
-.playbackProgress[aria-valuenow]:before {
- background-color: #00a4dc
+.transcodingProgress > div {
+ background-color: #dd4919;
}
@media all and (max-width:34.375em) {
diff --git a/src/css/metadataeditor.css b/src/css/metadataeditor.css
index abc5668b24..542c7c8f2b 100644
--- a/src/css/metadataeditor.css
+++ b/src/css/metadataeditor.css
@@ -47,6 +47,10 @@
background: #00a4dc !important
}
+.metadataSidebarIcon {
+ margin-right: .4em
+}
+
@media all and (min-width:50em) {
.editPageSidebar {
position: fixed;
@@ -72,4 +76,4 @@
.editPageInnerContent {
width: 73.5%
}
-}
\ No newline at end of file
+}
diff --git a/src/css/site.css b/src/css/site.css
index 65f8ffdbce..87ce6841ae 100644
--- a/src/css/site.css
+++ b/src/css/site.css
@@ -70,11 +70,10 @@ div[data-role=page] {
.page,
.pageWithAbsoluteTabs .pageTabContent {
/* provides room for the music controls */
- padding-bottom: 5em !important
+ padding-bottom: 5em !important;
}
@media all and (min-width:50em) {
-
.readOnlyContent,
form {
max-width: 54em
diff --git a/src/dashboardgeneral.html b/src/dashboardgeneral.html
index a285b0e55f..af46f34903 100644
--- a/src/dashboardgeneral.html
+++ b/src/dashboardgeneral.html
@@ -26,9 +26,9 @@
-