mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
commit
52d4f4fe4f
75 changed files with 942 additions and 2506 deletions
|
@ -54,6 +54,7 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for
|
||||||
<g id="refresh"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z" /></g>
|
<g id="refresh"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z" /></g>
|
||||||
<g id="person"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" /></g>
|
<g id="person"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" /></g>
|
||||||
<g id="play-arrow"><path d="M8 5v14l11-7z" /></g>
|
<g id="play-arrow"><path d="M8 5v14l11-7z" /></g>
|
||||||
|
<g id="star"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" /></g>
|
||||||
<g id="folder-open"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z" /></g>
|
<g id="folder-open"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z" /></g>
|
||||||
<g id="mode-edit"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" /></g>
|
<g id="mode-edit"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" /></g>
|
||||||
<g id="more-vert"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" /></g>
|
<g id="more-vert"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" /></g>
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.2.87",
|
"version": "1.3.18",
|
||||||
"_release": "1.2.87",
|
"_release": "1.3.18",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.2.87",
|
"tag": "1.3.18",
|
||||||
"commit": "21a6cacb0ec2cf301045a5fb35192753efd71025"
|
"commit": "127ca5da89083c44351fd0664355f3f521313d5d"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.0",
|
"_target": "^1.2.0",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['dialogHelper', 'layoutManager', 'dialogText', 'paper-button', 'css!./actionsheet', 'html!./../icons/nav.html'], function (dialogHelper, layoutManager, dialogText) {
|
define(['dialogHelper', 'layoutManager', 'globalize', 'paper-button', 'css!./actionsheet', 'html!./../icons/nav.html'], function (dialogHelper, layoutManager, globalize) {
|
||||||
|
|
||||||
function parentWithClass(elem, className) {
|
function parentWithClass(elem, className) {
|
||||||
|
|
||||||
|
@ -88,7 +88,8 @@
|
||||||
// title
|
// title
|
||||||
var dialogOptions = {
|
var dialogOptions = {
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
enableHistory: options.enableHistory
|
enableHistory: options.enableHistory,
|
||||||
|
scrollY: false
|
||||||
};
|
};
|
||||||
|
|
||||||
var backButton = false;
|
var backButton = false;
|
||||||
|
@ -179,7 +180,7 @@
|
||||||
|
|
||||||
if (options.showCancel) {
|
if (options.showCancel) {
|
||||||
html += '<div class="buttons">';
|
html += '<div class="buttons">';
|
||||||
html += '<paper-button class="btnCancel">' + dialogText.get('Cancel') + '</paper-button>';
|
html += '<paper-button class="btnCancel">' + globalize.translate('sharedcomponents#ButtonCancel') + '</paper-button>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./../icons/nav.html', 'css!./../prompt/style.css', 'paper-button', 'paper-icon-button-light', 'paper-input'], function (dialogHelper, layoutManager, dialogText) {
|
define(['dialogHelper', 'layoutManager', 'globalize', 'html!./../icons/nav.html', 'css!./../prompt/style.css', 'paper-button', 'paper-icon-button-light', 'paper-input'], function (dialogHelper, layoutManager, globalize) {
|
||||||
|
|
||||||
function getIcon(icon, cssClass, canFocus, autoFocus) {
|
function getIcon(icon, cssClass, canFocus, autoFocus) {
|
||||||
|
|
||||||
|
@ -70,12 +70,12 @@ define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./../icons/nav.html
|
||||||
html += '</p>';
|
html += '</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
var buttonText = options.type == 'error' ? 'Ok' : 'GotIt';
|
var buttonText = options.type == 'error' ? 'sharedcomponents#ButtonOk' : 'sharedcomponents#ButtonGotIt';
|
||||||
if (raisedButtons) {
|
if (raisedButtons) {
|
||||||
html += '<paper-button raised class="btnSubmit"><iron-icon icon="nav:check"></iron-icon><span>' + dialogText.get(buttonText) + '</span></paper-button>';
|
html += '<paper-button raised class="btnSubmit"><iron-icon icon="nav:check"></iron-icon><span>' + globalize.translate(buttonText) + '</span></paper-button>';
|
||||||
} else {
|
} else {
|
||||||
html += '<div class="buttons" style="text-align:right;">';
|
html += '<div class="buttons" style="text-align:right;">';
|
||||||
html += '<paper-button class="btnSubmit">' + dialogText.get(buttonText) + '</paper-button>';
|
html += '<paper-button class="btnSubmit">' + globalize.translate(buttonText) + '</paper-button>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['layoutManager', 'dialogText'], function (layoutManager, dialogText) {
|
define(['layoutManager', 'globalize'], function (layoutManager, globalize) {
|
||||||
|
|
||||||
function showTvConfirm(options) {
|
function showTvConfirm(options) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
@ -8,12 +8,12 @@ define(['layoutManager', 'dialogText'], function (layoutManager, dialogText) {
|
||||||
var items = [];
|
var items = [];
|
||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
name: dialogText.get('Ok'),
|
name: globalize.translate('sharedcomponents#ButtonOk'),
|
||||||
id: 'ok'
|
id: 'ok'
|
||||||
});
|
});
|
||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
name: dialogText.get('Cancel'),
|
name: globalize.translate('sharedcomponents#ButtonCancel'),
|
||||||
id: 'cancel'
|
id: 'cancel'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -74,9 +74,9 @@ define(['layoutManager', 'dialogText'], function (layoutManager, dialogText) {
|
||||||
|
|
||||||
html += '<div class="buttons">';
|
html += '<div class="buttons">';
|
||||||
|
|
||||||
html += '<paper-button class="btnConfirm" autofocus>' + dialogText.get('Ok') + '</paper-button>';
|
html += '<paper-button class="btnConfirm" autofocus>' + globalize.translate('sharedcomponents#ButtonOk') + '</paper-button>';
|
||||||
|
|
||||||
html += '<paper-button class="btnCancel">' + dialogText.get('Cancel') + '</paper-button>';
|
html += '<paper-button class="btnCancel">' + globalize.translate('sharedcomponents#ButtonCancel') + '</paper-button>';
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
z-index: 999999 !important;
|
z-index: 999999 !important;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
margin: 24px 40px;
|
margin: 24px 40px;
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.4);
|
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.4);
|
||||||
height: auto;
|
height: auto;
|
||||||
|
@ -32,21 +31,6 @@
|
||||||
max-width: 70%;
|
max-width: 70%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog.scrollY {
|
|
||||||
overflow-y: auto;
|
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog.hiddenScroll::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog.hiddenScroll {
|
|
||||||
-ms-overflow-style: none;
|
|
||||||
overflow: -moz-scrollbars-none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (min-width: 1280px) and (min-height: 720px) {
|
@media all and (min-width: 1280px) and (min-height: 720px) {
|
||||||
|
|
||||||
.dialog.medium {
|
.dialog.medium {
|
||||||
|
@ -80,14 +64,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog > * {
|
.dialog > * {
|
||||||
margin-top: 20px;
|
|
||||||
padding: 0 24px;
|
padding: 0 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog > *:first-child {
|
|
||||||
margin-top: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog .buttons {
|
.dialog .buttons {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 8px 8px 8px 24px;
|
padding: 8px 8px 8px 24px;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
define(['historyManager', 'focusManager', 'browser', 'layoutManager', 'inputManager', 'css!./dialoghelper.css'], function (historyManager, focusManager, browser, layoutManager, inputManager) {
|
define(['historyManager', 'focusManager', 'browser', 'layoutManager', 'inputManager', 'scrollHelper', 'css!./dialoghelper.css', 'scrollStyles'], function (historyManager, focusManager, browser, layoutManager, inputManager, scrollHelper) {
|
||||||
|
|
||||||
|
var globalOnOpenCallback;
|
||||||
|
|
||||||
function dialogHashHandler(dlg, hash, resolve) {
|
function dialogHashHandler(dlg, hash, resolve) {
|
||||||
|
|
||||||
|
@ -184,6 +186,10 @@
|
||||||
|
|
||||||
function open(dlg) {
|
function open(dlg) {
|
||||||
|
|
||||||
|
if (globalOnOpenCallback) {
|
||||||
|
globalOnOpenCallback(dlg);
|
||||||
|
}
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
new dialogHashHandler(dlg, 'dlg' + new Date().getTime(), resolve);
|
new dialogHashHandler(dlg, 'dlg' + new Date().getTime(), resolve);
|
||||||
|
@ -380,11 +386,12 @@
|
||||||
|
|
||||||
dlg.classList.add('dialog');
|
dlg.classList.add('dialog');
|
||||||
|
|
||||||
dlg.classList.add('scrollY');
|
if (options.scrollY !== false) {
|
||||||
|
dlg.classList.add('smoothScrollY');
|
||||||
|
|
||||||
if (layoutManager.tv || layoutManager.mobile) {
|
if (layoutManager.tv) {
|
||||||
// Need scrollbars for mouse use
|
scrollHelper.centerFocus.on(dlg, false);
|
||||||
dlg.classList.add('hiddenScroll');
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.removeOnClose) {
|
if (options.removeOnClose) {
|
||||||
|
@ -402,6 +409,9 @@
|
||||||
return {
|
return {
|
||||||
open: open,
|
open: open,
|
||||||
close: close,
|
close: close,
|
||||||
createDialog: createDialog
|
createDialog: createDialog,
|
||||||
|
setOnOpen: function (val) {
|
||||||
|
globalOnOpenCallback = val;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
41
dashboard-ui/bower_components/emby-webcomponents/formdialog.css
vendored
Normal file
41
dashboard-ui/bower_components/emby-webcomponents/formdialog.css
vendored
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
.formDialog {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formDialog .dialogHeader {
|
||||||
|
padding: .35em .5em;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #101010;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formDialog .dialogHeaderTitle {
|
||||||
|
margin-left: .75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formDialog form {
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formDialog .dialogContent {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formDialog .dialogContentInner {
|
||||||
|
padding-bottom: 50vh;
|
||||||
|
padding-top: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (min-width: 1000px) {
|
||||||
|
|
||||||
|
.formDialog form {
|
||||||
|
max-width: 70vw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-tv .formDialog .dialogHeader {
|
||||||
|
padding-top: 1.5em;
|
||||||
|
padding-bottom: 1.5em;
|
||||||
|
}
|
|
@ -1,6 +1,4 @@
|
||||||
define(['globalize', 'connectionManager', 'loading', 'scrollHelper', 'datetime', 'focusManager', 'imageLoader', 'events', 'layoutManager', 'itemShortcuts', 'registrationservices', 'clearButtonStyle', 'css!./guide.css', 'html!./../icons/mediainfo.html', 'html!./../icons/nav.html', 'scrollStyles'], function (globalize, connectionManager, loading, scrollHelper, datetime, focusManager, imageLoader, events, layoutManager, itemShortcuts, registrationServices) {
|
define(['require', 'globalize', 'connectionManager', 'loading', 'scrollHelper', 'datetime', 'focusManager', 'imageLoader', 'events', 'layoutManager', 'itemShortcuts', 'registrationservices', 'clearButtonStyle', 'css!./guide.css', 'html!./../icons/mediainfo.html', 'html!./../icons/nav.html', 'scrollStyles'], function (require, globalize, connectionManager, loading, scrollHelper, datetime, focusManager, imageLoader, events, layoutManager, itemShortcuts, registrationServices) {
|
||||||
|
|
||||||
var baseUrl;
|
|
||||||
|
|
||||||
function Guide(options) {
|
function Guide(options) {
|
||||||
|
|
||||||
|
@ -72,7 +70,7 @@
|
||||||
var limit = 5;
|
var limit = 5;
|
||||||
|
|
||||||
context.querySelector('.guideRequiresUnlock').classList.remove('hide');
|
context.querySelector('.guideRequiresUnlock').classList.remove('hide');
|
||||||
context.querySelector('.unlockText').innerHTML = globalize.translate('MessageLiveTvGuideRequiresUnlock', limit);
|
context.querySelector('.unlockText').innerHTML = globalize.translate('LiveTvGuideRequiresUnlock', limit);
|
||||||
|
|
||||||
return limit;
|
return limit;
|
||||||
});
|
});
|
||||||
|
@ -258,13 +256,13 @@
|
||||||
html += '<div class="' + guideProgramNameClass + '">';
|
html += '<div class="' + guideProgramNameClass + '">';
|
||||||
|
|
||||||
if (program.IsLive) {
|
if (program.IsLive) {
|
||||||
html += '<span class="liveTvProgram">' + globalize.translate('core#AttributeLive') + ' </span>';
|
html += '<span class="liveTvProgram">' + globalize.translate('sharedcomponents#AttributeLive') + ' </span>';
|
||||||
}
|
}
|
||||||
else if (program.IsPremiere) {
|
else if (program.IsPremiere) {
|
||||||
html += '<span class="premiereTvProgram">' + globalize.translate('core#AttributePremiere') + ' </span>';
|
html += '<span class="premiereTvProgram">' + globalize.translate('sharedcomponents#AttributePremiere') + ' </span>';
|
||||||
}
|
}
|
||||||
else if (program.IsSeries && !program.IsRepeat) {
|
else if (program.IsSeries && !program.IsRepeat) {
|
||||||
html += '<span class="newTvProgram">' + globalize.translate('core#AttributeNew') + ' </span>';
|
html += '<span class="newTvProgram">' + globalize.translate('sharedcomponents#AttributeNew') + ' </span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += program.Name;
|
html += program.Name;
|
||||||
|
@ -441,13 +439,13 @@
|
||||||
function getFutureDateText(date) {
|
function getFutureDateText(date) {
|
||||||
|
|
||||||
var weekday = [];
|
var weekday = [];
|
||||||
weekday[0] = globalize.translate('core#OptionSundayShort');
|
weekday[0] = globalize.translate('sharedcomponents#OptionSundayShort');
|
||||||
weekday[1] = globalize.translate('core#OptionMondayShort');
|
weekday[1] = globalize.translate('sharedcomponents#OptionMondayShort');
|
||||||
weekday[2] = globalize.translate('core#OptionTuesdayShort');
|
weekday[2] = globalize.translate('sharedcomponents#OptionTuesdayShort');
|
||||||
weekday[3] = globalize.translate('core#OptionWednesdayShort');
|
weekday[3] = globalize.translate('sharedcomponents#OptionWednesdayShort');
|
||||||
weekday[4] = globalize.translate('core#OptionThursdayShort');
|
weekday[4] = globalize.translate('sharedcomponents#OptionThursdayShort');
|
||||||
weekday[5] = globalize.translate('core#OptionFridayShort');
|
weekday[5] = globalize.translate('sharedcomponents#OptionFridayShort');
|
||||||
weekday[6] = globalize.translate('core#OptionSaturdayShort');
|
weekday[6] = globalize.translate('sharedcomponents#OptionSaturdayShort');
|
||||||
|
|
||||||
var day = weekday[date.getDay()];
|
var day = weekday[date.getDay()];
|
||||||
date = datetime.toLocaleDateString(date);
|
date = datetime.toLocaleDateString(date);
|
||||||
|
@ -530,7 +528,7 @@
|
||||||
|
|
||||||
actionsheet.show({
|
actionsheet.show({
|
||||||
items: dateOptions,
|
items: dateOptions,
|
||||||
title: globalize.translate('core#HeaderSelectDate'),
|
title: globalize.translate('sharedcomponents#HeaderSelectDate'),
|
||||||
callback: function (id) {
|
callback: function (id) {
|
||||||
|
|
||||||
var date = new Date();
|
var date = new Date();
|
||||||
|
@ -598,9 +596,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.open('GET', baseUrl + '/tvguide.template.html', true);
|
|
||||||
|
|
||||||
var supportsCaptureOption = false;
|
var supportsCaptureOption = false;
|
||||||
try {
|
try {
|
||||||
var opts = Object.defineProperty({}, 'capture', {
|
var opts = Object.defineProperty({}, 'capture', {
|
||||||
|
@ -619,9 +614,7 @@
|
||||||
target.addEventListener(type, handler, optionsOrCapture);
|
target.addEventListener(type, handler, optionsOrCapture);
|
||||||
}
|
}
|
||||||
|
|
||||||
xhr.onload = function (e) {
|
require(['text!./tvguide.template.html'], function (template) {
|
||||||
|
|
||||||
var template = this.response;
|
|
||||||
var context = options.element;
|
var context = options.element;
|
||||||
context.innerHTML = globalize.translateDocument(template, 'core');
|
context.innerHTML = globalize.translateDocument(template, 'core');
|
||||||
|
|
||||||
|
@ -658,13 +651,7 @@
|
||||||
events.trigger(self, 'load');
|
events.trigger(self, 'load');
|
||||||
|
|
||||||
self.refresh();
|
self.refresh();
|
||||||
}
|
});
|
||||||
|
|
||||||
xhr.send();
|
|
||||||
};
|
|
||||||
|
|
||||||
Guide.setBaseUrl = function (url) {
|
|
||||||
baseUrl = url;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return Guide;
|
return Guide;
|
||||||
|
|
101
dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js
vendored
Normal file
101
dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js
vendored
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
define(['apphost', 'globalize', 'connectionManager'], function (appHost, globalize, connectionManager) {
|
||||||
|
|
||||||
|
function getCommands(options) {
|
||||||
|
|
||||||
|
var item = options.item;
|
||||||
|
|
||||||
|
var serverId = item.ServerId;
|
||||||
|
var apiClient = connectionManager.getApiClient(serverId);
|
||||||
|
|
||||||
|
return apiClient.getCurrentUser().then(function (user) {
|
||||||
|
|
||||||
|
var commands = [];
|
||||||
|
|
||||||
|
if (item.CanDownload && user.Policy.EnableContentDownloading && appHost.supports('filedownload')) {
|
||||||
|
commands.push({
|
||||||
|
name: globalize.translate('sharedcomponents#Download'),
|
||||||
|
id: 'download'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.Type != 'Timer' && user.Policy.EnablePublicSharing && appHost.supports('sharing')) {
|
||||||
|
commands.push({
|
||||||
|
name: globalize.translate('Share'),
|
||||||
|
id: 'share'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return commands;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function executeCommand(item, id) {
|
||||||
|
|
||||||
|
var itemId = item.Id;
|
||||||
|
var serverId = item.ServerId;
|
||||||
|
var apiClient = connectionManager.getApiClient(serverId);
|
||||||
|
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
|
switch (id) {
|
||||||
|
|
||||||
|
case 'download':
|
||||||
|
{
|
||||||
|
require(['fileDownloader'], function (fileDownloader) {
|
||||||
|
var downloadHref = apiClient.getUrl("Items/" + itemId + "/Download", {
|
||||||
|
api_key: apiClient.accessToken()
|
||||||
|
});
|
||||||
|
|
||||||
|
fileDownloader.download([
|
||||||
|
{
|
||||||
|
url: downloadHref,
|
||||||
|
itemId: itemId,
|
||||||
|
serverId: serverId
|
||||||
|
}]);
|
||||||
|
|
||||||
|
reject();
|
||||||
|
});
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'share':
|
||||||
|
{
|
||||||
|
require(['sharingmanager'], function (sharingManager) {
|
||||||
|
sharingManager.showMenu({
|
||||||
|
serverId: serverId,
|
||||||
|
itemId: itemId
|
||||||
|
|
||||||
|
}).then(reject);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function show(options) {
|
||||||
|
|
||||||
|
return getCommands(options).then(function (commands) {
|
||||||
|
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
|
require(['actionsheet'], function (actionSheet) {
|
||||||
|
|
||||||
|
actionSheet.show({
|
||||||
|
items: commands
|
||||||
|
}).then(function (id) {
|
||||||
|
executeCommand(options.item, id).then(resolve);
|
||||||
|
}, reject);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
getCommands: getCommands,
|
||||||
|
show: show
|
||||||
|
};
|
||||||
|
});
|
|
@ -19,7 +19,7 @@ define([], function () {
|
||||||
}
|
}
|
||||||
if (/*options.isInlineSpecial &&*/ item.Type == "Episode" && item.ParentIndexNumber == 0) {
|
if (/*options.isInlineSpecial &&*/ item.Type == "Episode" && item.ParentIndexNumber == 0) {
|
||||||
|
|
||||||
name = Globalize.translate('core#ValueSpecialEpisodeName', name);
|
name = Globalize.translate('sharedcomponents#ValueSpecialEpisodeName', name);
|
||||||
|
|
||||||
} else if ((item.Type == "Episode" || item.Type == 'Program') && item.IndexNumber != null && item.ParentIndexNumber != null) {
|
} else if ((item.Type == "Episode" || item.Type == 'Program') && item.IndexNumber != null && item.ParentIndexNumber != null) {
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ define(['datetime', 'globalize', 'embyRouter', 'html!./../icons/mediainfo.html',
|
||||||
|
|
||||||
if (count) {
|
if (count) {
|
||||||
|
|
||||||
miscInfo.push(globalize.translate('core#TrackCount', count));
|
miscInfo.push(globalize.translate('sharedcomponents#TrackCount', count));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.CumulativeRunTimeTicks) {
|
if (item.CumulativeRunTimeTicks) {
|
||||||
|
@ -86,7 +86,7 @@ define(['datetime', 'globalize', 'embyRouter', 'html!./../icons/mediainfo.html',
|
||||||
|
|
||||||
if (count) {
|
if (count) {
|
||||||
|
|
||||||
miscInfo.push(globalize.translate('core#ItemCount', count));
|
miscInfo.push(globalize.translate('sharedcomponents#ItemCount', count));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ define(['datetime', 'globalize', 'embyRouter', 'html!./../icons/mediainfo.html',
|
||||||
if (item.ProductionYear && item.Type == "Series") {
|
if (item.ProductionYear && item.Type == "Series") {
|
||||||
|
|
||||||
if (item.Status == "Continuing") {
|
if (item.Status == "Continuing") {
|
||||||
miscInfo.push(globalize.translate('core#ValueSeriesYearToPresent', item.ProductionYear));
|
miscInfo.push(globalize.translate('sharedcomponents#ValueSeriesYearToPresent', item.ProductionYear));
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (item.ProductionYear) {
|
else if (item.ProductionYear) {
|
||||||
|
@ -158,17 +158,17 @@ define(['datetime', 'globalize', 'embyRouter', 'html!./../icons/mediainfo.html',
|
||||||
|
|
||||||
if (item.IsLive) {
|
if (item.IsLive) {
|
||||||
miscInfo.push({
|
miscInfo.push({
|
||||||
html: '<div class="mediaInfoProgramAttribute mediaInfoItem">' + globalize.translate('core#AttributeLive') + '</div>'
|
html: '<div class="mediaInfoProgramAttribute mediaInfoItem">' + globalize.translate('sharedcomponents#AttributeLive') + '</div>'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (item.IsPremiere) {
|
else if (item.IsPremiere) {
|
||||||
miscInfo.push({
|
miscInfo.push({
|
||||||
html: '<div class="mediaInfoProgramAttribute mediaInfoItem">' + globalize.translate('core#AttributePremiere') + '</div>'
|
html: '<div class="mediaInfoProgramAttribute mediaInfoItem">' + globalize.translate('sharedcomponents#AttributePremiere') + '</div>'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (item.IsSeries && !item.IsRepeat) {
|
else if (item.IsSeries && !item.IsRepeat) {
|
||||||
miscInfo.push({
|
miscInfo.push({
|
||||||
html: '<div class="mediaInfoProgramAttribute mediaInfoItem">' + globalize.translate('core#AttributeNew') + '</div>'
|
html: '<div class="mediaInfoProgramAttribute mediaInfoItem">' + globalize.translate('sharedcomponents#AttributeNew') + '</div>'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,14 +176,14 @@ define(['datetime', 'globalize', 'embyRouter', 'html!./../icons/mediainfo.html',
|
||||||
|
|
||||||
try {
|
try {
|
||||||
date = datetime.parseISO8601Date(item.PremiereDate);
|
date = datetime.parseISO8601Date(item.PremiereDate);
|
||||||
text = globalize.translate('core#OriginalAirDateValue', date.toLocaleDateString());
|
text = globalize.translate('sharedcomponents#OriginalAirDateValue', date.toLocaleDateString());
|
||||||
miscInfo.push(text);
|
miscInfo.push(text);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
console.log("Error parsing date: " + item.PremiereDate);
|
console.log("Error parsing date: " + item.PremiereDate);
|
||||||
}
|
}
|
||||||
} else if (item.ProductionYear) {
|
} else if (item.ProductionYear) {
|
||||||
text = globalize.translate('core#ReleaseYearValue', item.ProductionYear);
|
text = globalize.translate('sharedcomponents#ReleaseYearValue', item.ProductionYear);
|
||||||
miscInfo.push(text);
|
miscInfo.push(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ define(['datetime', 'globalize', 'embyRouter', 'html!./../icons/mediainfo.html',
|
||||||
endDate = new Date(endDate);
|
endDate = new Date(endDate);
|
||||||
|
|
||||||
var displayTime = datetime.getDisplayTime(endDate);
|
var displayTime = datetime.getDisplayTime(endDate);
|
||||||
return globalize.translate('core#EndsAtValue', displayTime);
|
return globalize.translate('sharedcomponents#EndsAtValue', displayTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,7 +292,7 @@ define(['datetime', 'globalize', 'embyRouter', 'html!./../icons/mediainfo.html',
|
||||||
if (includeText === false) {
|
if (includeText === false) {
|
||||||
return displayTime;
|
return displayTime;
|
||||||
}
|
}
|
||||||
return globalize.translate('core#EndsAtValue', displayTime);
|
return globalize.translate('sharedcomponents#EndsAtValue', displayTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMediaInfoItem(m, cssClass) {
|
function getMediaInfoItem(m, cssClass) {
|
||||||
|
@ -400,7 +400,7 @@ define(['datetime', 'globalize', 'embyRouter', 'html!./../icons/mediainfo.html',
|
||||||
}
|
}
|
||||||
if (options.isInlineSpecial && item.Type == "Episode" && item.ParentIndexNumber == 0) {
|
if (options.isInlineSpecial && item.Type == "Episode" && item.ParentIndexNumber == 0) {
|
||||||
|
|
||||||
name = globalize.translate('core#ValueSpecialEpisodeName', name);
|
name = globalize.translate('sharedcomponents#ValueSpecialEpisodeName', name);
|
||||||
|
|
||||||
} else if (item.Type == "Episode" && item.IndexNumber != null && item.ParentIndexNumber != null) {
|
} else if (item.Type == "Episode" && item.IndexNumber != null && item.ParentIndexNumber != null) {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./../icons/nav.html', 'css!./style.css', 'paper-button', 'paper-icon-button-light', 'paper-input'], function (dialogHelper, layoutManager, dialogText) {
|
define(['dialogHelper', 'layoutManager', 'globalize', 'html!./../icons/nav.html', 'css!./style.css', 'paper-button', 'paper-icon-button-light', 'paper-input'], function (dialogHelper, layoutManager, globalize) {
|
||||||
|
|
||||||
function getIcon(icon, cssClass, canFocus, autoFocus) {
|
function getIcon(icon, cssClass, canFocus, autoFocus) {
|
||||||
|
|
||||||
|
@ -64,11 +64,11 @@ define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./../icons/nav.html
|
||||||
|
|
||||||
html += '<br/>';
|
html += '<br/>';
|
||||||
if (raisedButtons) {
|
if (raisedButtons) {
|
||||||
html += '<paper-button raised class="btnSubmit"><iron-icon icon="nav:check"></iron-icon><span>' + dialogText.get('Ok') + '</span></paper-button>';
|
html += '<paper-button raised class="btnSubmit"><iron-icon icon="nav:check"></iron-icon><span>' + globalize.translate('sharedcomponents#ButtonOk') + '</span></paper-button>';
|
||||||
} else {
|
} else {
|
||||||
html += '<div class="buttons">';
|
html += '<div class="buttons">';
|
||||||
html += '<paper-button class="btnSubmit">' + dialogText.get('Ok') + '</paper-button>';
|
html += '<paper-button class="btnSubmit">' + globalize.translate('sharedcomponents#ButtonOk') + '</paper-button>';
|
||||||
html += '<paper-button class="btnPromptExit">' + dialogText.get('Cancel') + '</paper-button>';
|
html += '<paper-button class="btnPromptExit">' + globalize.translate('sharedcomponents#ButtonCancel') + '</paper-button>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
html += '</form>';
|
html += '</form>';
|
||||||
|
|
3
dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.css
vendored
Normal file
3
dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.css
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
.recordingDialog .btnSubmit {
|
||||||
|
background-color: #cc3333;
|
||||||
|
}
|
416
dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.js
vendored
Normal file
416
dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.js
vendored
Normal file
|
@ -0,0 +1,416 @@
|
||||||
|
define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'connectionManager', 'require', 'loading', 'scrollHelper', 'scrollStyles', 'paper-checkbox', 'emby-collapsible', 'paper-input', 'paper-icon-button-light', 'css!./../formdialog', 'css!./recordingcreator', 'html!./../icons/mediainfo.html', 'html!./../icons/nav.html'], function (dialogHelper, globalize, layoutManager, mediaInfo, appHost, connectionManager, require, loading, scrollHelper) {
|
||||||
|
|
||||||
|
var currentProgramId;
|
||||||
|
var currentServerId;
|
||||||
|
var currentDialog;
|
||||||
|
var recordingCreated = false;
|
||||||
|
|
||||||
|
function getDaysOfWeek() {
|
||||||
|
|
||||||
|
return [
|
||||||
|
'Sunday',
|
||||||
|
'Monday',
|
||||||
|
'Tuesday',
|
||||||
|
'Wednesday',
|
||||||
|
'Thursday',
|
||||||
|
'Friday',
|
||||||
|
'Saturday'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDays(context) {
|
||||||
|
|
||||||
|
var daysOfWeek = getDaysOfWeek();
|
||||||
|
|
||||||
|
var days = [];
|
||||||
|
|
||||||
|
for (var i = 0, length = daysOfWeek.length; i < length; i++) {
|
||||||
|
|
||||||
|
var day = daysOfWeek[i];
|
||||||
|
|
||||||
|
if (context.querySelector('#chk' + day).checked) {
|
||||||
|
days.push(day);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return days;
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideSeriesRecordingFields(context) {
|
||||||
|
slideUpToHide(context.querySelector('#seriesFields'));
|
||||||
|
context.querySelector('.btnSubmit').classList.remove('hide');
|
||||||
|
context.querySelector('.supporterContainer').classList.add('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeDialog(isSubmitted) {
|
||||||
|
|
||||||
|
recordingCreated = isSubmitted;
|
||||||
|
dialogHelper.close(currentDialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSubmit(e) {
|
||||||
|
|
||||||
|
loading.show();
|
||||||
|
|
||||||
|
var form = this;
|
||||||
|
|
||||||
|
var apiClient = connectionManager.getApiClient(currentServerId);
|
||||||
|
|
||||||
|
apiClient.getNamedConfiguration("livetv").then(function (config) {
|
||||||
|
|
||||||
|
config.EnableRecordingEncoding = form.querySelector('#chkConvertRecordings').checked;
|
||||||
|
|
||||||
|
apiClient.updateNamedConfiguration("livetv", config);
|
||||||
|
});
|
||||||
|
|
||||||
|
apiClient.getNewLiveTvTimerDefaults({ programId: currentProgramId }).then(function (item) {
|
||||||
|
|
||||||
|
item.PrePaddingSeconds = form.querySelector('#txtPrePaddingMinutes').value * 60;
|
||||||
|
item.PostPaddingSeconds = form.querySelector('#txtPostPaddingMinutes').value * 60;
|
||||||
|
|
||||||
|
item.RecordNewOnly = form.querySelector('#chkNewOnly').checked;
|
||||||
|
item.RecordAnyChannel = form.querySelector('#chkAllChannels').checked;
|
||||||
|
item.RecordAnyTime = form.querySelector('#chkAnyTime').checked;
|
||||||
|
|
||||||
|
item.Days = getDays(form);
|
||||||
|
|
||||||
|
if (form.querySelector('#chkRecordSeries').checked) {
|
||||||
|
|
||||||
|
apiClient.createLiveTvSeriesTimer(item).then(function () {
|
||||||
|
|
||||||
|
loading.hide();
|
||||||
|
closeDialog(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
apiClient.createLiveTvTimer(item).then(function () {
|
||||||
|
|
||||||
|
loading.hide();
|
||||||
|
closeDialog(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Disable default form submission
|
||||||
|
e.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRegistration(programId, apiClient) {
|
||||||
|
|
||||||
|
loading.show();
|
||||||
|
|
||||||
|
return apiClient.getJSON(apiClient.getUrl('LiveTv/Registration', {
|
||||||
|
|
||||||
|
ProgramId: programId,
|
||||||
|
Feature: 'seriesrecordings'
|
||||||
|
|
||||||
|
})).then(function (result) {
|
||||||
|
|
||||||
|
loading.hide();
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}, function () {
|
||||||
|
|
||||||
|
loading.hide();
|
||||||
|
|
||||||
|
return {
|
||||||
|
TrialVersion: true,
|
||||||
|
IsValid: true,
|
||||||
|
IsRegistered: false
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function showSeriesRecordingFields(context, apiClient) {
|
||||||
|
slideDownToShow(context.querySelector('#seriesFields'));
|
||||||
|
context.querySelector('.btnSubmit').classList.remove('hide');
|
||||||
|
|
||||||
|
getRegistration(currentProgramId, apiClient).then(function (regInfo) {
|
||||||
|
|
||||||
|
if (regInfo.IsValid) {
|
||||||
|
context.querySelector('.btnSubmit').classList.remove('hide');
|
||||||
|
} else {
|
||||||
|
context.querySelector('.btnSubmit').classList.add('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (regInfo.IsRegistered) {
|
||||||
|
|
||||||
|
context.querySelector('.supporterContainer').classList.add('hide');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
context.querySelector('.supporterContainer').classList.remove('hide');
|
||||||
|
|
||||||
|
if (regInfo.TrialVersion) {
|
||||||
|
context.querySelector('.supporterTrial').classList.remove('hide');
|
||||||
|
} else {
|
||||||
|
context.querySelector('.supporterTrial').classList.add('hide');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function slideDownToShow(elem) {
|
||||||
|
|
||||||
|
if (!elem.classList.contains('hide')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
elem.classList.remove('hide');
|
||||||
|
|
||||||
|
elem.style.overflowY = 'hidden';
|
||||||
|
|
||||||
|
requestAnimationFrame(function () {
|
||||||
|
|
||||||
|
elem.animate([{
|
||||||
|
height: 0
|
||||||
|
}, {
|
||||||
|
height: elem.offsetHeight + 'px'
|
||||||
|
|
||||||
|
}], { duration: 400, easing: 'ease' }).onfinish = function () {
|
||||||
|
elem.classList.remove('hide');
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function slideUpToHide(elem) {
|
||||||
|
|
||||||
|
if (elem.classList.contains('hide')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
elem.style.overflowY = 'hidden';
|
||||||
|
|
||||||
|
requestAnimationFrame(function () {
|
||||||
|
|
||||||
|
elem.animate([{
|
||||||
|
height: elem.offsetHeight + 'px'
|
||||||
|
}, {
|
||||||
|
height: 0
|
||||||
|
}], { duration: 400, easing: 'ease' }).onfinish = function () {
|
||||||
|
elem.classList.add('hide');
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function onPremiereLinkClicked(e) {
|
||||||
|
|
||||||
|
require(['shell'], function (shell) {
|
||||||
|
shell.openUrl('https://emby.media/premiere');
|
||||||
|
});
|
||||||
|
e.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function init(context) {
|
||||||
|
|
||||||
|
var apiClient = connectionManager.getApiClient(currentServerId);
|
||||||
|
|
||||||
|
context.querySelector('.lnkPremiere').addEventListener('click', onPremiereLinkClicked);
|
||||||
|
|
||||||
|
context.querySelector('#chkRecordSeries').addEventListener('change', function () {
|
||||||
|
|
||||||
|
if (this.checked) {
|
||||||
|
showSeriesRecordingFields(context, apiClient);
|
||||||
|
} else {
|
||||||
|
hideSeriesRecordingFields(context);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
context.querySelector('.btnSubmit').addEventListener('click', function () {
|
||||||
|
|
||||||
|
// Do a fake form submit this the button isn't a real submit button
|
||||||
|
var fakeSubmit = document.createElement('input');
|
||||||
|
fakeSubmit.setAttribute('type', 'submit');
|
||||||
|
fakeSubmit.style.display = 'none';
|
||||||
|
var form = context.querySelector('form');
|
||||||
|
form.appendChild(fakeSubmit);
|
||||||
|
fakeSubmit.click();
|
||||||
|
|
||||||
|
// Seeing issues in smart tv browsers where the form does not get submitted if the button is removed prior to the submission actually happening
|
||||||
|
setTimeout(function () {
|
||||||
|
form.removeChild(fakeSubmit);
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
|
||||||
|
context.querySelector('.btnCancel').addEventListener('click', function () {
|
||||||
|
|
||||||
|
closeDialog(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
context.querySelector('form', context).addEventListener('submit', onSubmit);
|
||||||
|
|
||||||
|
var supporterButtons = context.querySelectorAll('.btnSupporter');
|
||||||
|
for (var i = 0, length = supporterButtons.length; i < length; i++) {
|
||||||
|
if (appHost.supports('externalpremium')) {
|
||||||
|
supporterButtons[i].classList.remove('hide');
|
||||||
|
} else {
|
||||||
|
supporterButtons[i].classList.add('hide');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (appHost.supports('externalpremium')) {
|
||||||
|
context.querySelector('.btnSupporterForConverting a').href = 'https://emby.media/premiere';
|
||||||
|
} else {
|
||||||
|
context.querySelector('.btnSupporterForConverting a').href = '#';
|
||||||
|
}
|
||||||
|
|
||||||
|
apiClient.getNamedConfiguration("livetv").then(function (config) {
|
||||||
|
|
||||||
|
context.querySelector('#chkConvertRecordings').checked = config.EnableRecordingEncoding;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (layoutManager.tv) {
|
||||||
|
context.querySelector('.advanced').classList.add('hide');
|
||||||
|
} else {
|
||||||
|
context.querySelector('.advanced').classList.remove('hide');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDays(page, days) {
|
||||||
|
|
||||||
|
var daysOfWeek = getDaysOfWeek();
|
||||||
|
|
||||||
|
for (var i = 0, length = daysOfWeek.length; i < length; i++) {
|
||||||
|
|
||||||
|
var day = daysOfWeek[i];
|
||||||
|
|
||||||
|
page.querySelector('#chk' + day).checked = days.indexOf(day) != -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderRecording(context, defaultTimer, program, apiClient) {
|
||||||
|
|
||||||
|
context.querySelector('.itemName').innerHTML = program.Name;
|
||||||
|
context.querySelector('.itemEpisodeName').innerHTML = program.EpisodeTitle || '';
|
||||||
|
|
||||||
|
context.querySelector('.itemMiscInfoPrimary').innerHTML = mediaInfo.getPrimaryMediaInfoHtml(program);
|
||||||
|
context.querySelector('.itemMiscInfoSecondary').innerHTML = mediaInfo.getSecondaryMediaInfoHtml(program);
|
||||||
|
|
||||||
|
context.querySelector('#chkNewOnly').checked = defaultTimer.RecordNewOnly;
|
||||||
|
context.querySelector('#chkAllChannels').checked = defaultTimer.RecordAnyChannel;
|
||||||
|
context.querySelector('#chkAnyTime').checked = defaultTimer.RecordAnyTime;
|
||||||
|
|
||||||
|
context.querySelector('#txtPrePaddingMinutes').value = defaultTimer.PrePaddingSeconds / 60;
|
||||||
|
context.querySelector('#txtPostPaddingMinutes').value = defaultTimer.PostPaddingSeconds / 60;
|
||||||
|
|
||||||
|
if (program.IsSeries) {
|
||||||
|
context.querySelector('#eligibleForSeriesFields').classList.remove('hide');
|
||||||
|
} else {
|
||||||
|
context.querySelector('#eligibleForSeriesFields').classList.add('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
selectDays(context, defaultTimer.Days);
|
||||||
|
|
||||||
|
if (program.ServiceName == 'Emby') {
|
||||||
|
context.querySelector('.convertRecordingsContainer').classList.remove('hide');
|
||||||
|
showConvertRecordingsUnlockMessage(context, apiClient);
|
||||||
|
} else {
|
||||||
|
context.querySelector('.convertRecordingsContainer').classList.add('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
loading.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function showConvertRecordingsUnlockMessage(context, apiClient) {
|
||||||
|
|
||||||
|
apiClient.getPluginSecurityInfo().then(function (regInfo) {
|
||||||
|
|
||||||
|
if (regInfo.IsMBSupporter) {
|
||||||
|
context.querySelector('.btnSupporterForConverting').classList.add('hide');
|
||||||
|
} else {
|
||||||
|
context.querySelector('.btnSupporterForConverting').classList.remove('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
}, function () {
|
||||||
|
|
||||||
|
context.querySelector('.btnSupporterForConverting').classList.remove('hide');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function reload(context, programId) {
|
||||||
|
|
||||||
|
loading.show();
|
||||||
|
|
||||||
|
var apiClient = connectionManager.getApiClient(currentServerId);
|
||||||
|
|
||||||
|
var promise1 = apiClient.getNewLiveTvTimerDefaults({ programId: programId });
|
||||||
|
var promise2 = apiClient.getLiveTvProgram(programId, apiClient.getCurrentUserId());
|
||||||
|
|
||||||
|
Promise.all([promise1, promise2]).then(function (responses) {
|
||||||
|
|
||||||
|
var defaults = responses[0];
|
||||||
|
var program = responses[1];
|
||||||
|
|
||||||
|
renderRecording(context, defaults, program, apiClient);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function showEditor(itemId, serverId) {
|
||||||
|
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
|
recordingCreated = false;
|
||||||
|
currentProgramId = itemId;
|
||||||
|
currentServerId = serverId;
|
||||||
|
loading.show();
|
||||||
|
|
||||||
|
require(['text!./recordingcreator.template.html'], function (template) {
|
||||||
|
|
||||||
|
var dialogOptions = {
|
||||||
|
removeOnClose: true,
|
||||||
|
scrollY: false
|
||||||
|
};
|
||||||
|
|
||||||
|
if (layoutManager.tv) {
|
||||||
|
dialogOptions.size = 'fullscreen';
|
||||||
|
} else {
|
||||||
|
dialogOptions.size = 'small';
|
||||||
|
}
|
||||||
|
|
||||||
|
var dlg = dialogHelper.createDialog(dialogOptions);
|
||||||
|
|
||||||
|
dlg.classList.add('formDialog');
|
||||||
|
dlg.classList.add('recordingDialog');
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
|
||||||
|
html += globalize.translateDocument(template, 'sharedcomponents');
|
||||||
|
|
||||||
|
dlg.innerHTML = html;
|
||||||
|
document.body.appendChild(dlg);
|
||||||
|
|
||||||
|
currentDialog = dlg;
|
||||||
|
|
||||||
|
dlg.addEventListener('close', function () {
|
||||||
|
|
||||||
|
if (recordingCreated) {
|
||||||
|
require(['toast'], function (toast) {
|
||||||
|
toast(globalize.translate('RecordingScheduled'));
|
||||||
|
});
|
||||||
|
resolve();
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (layoutManager.tv) {
|
||||||
|
scrollHelper.centerFocus.on(dlg.querySelector('.dialogContent'), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
hideSeriesRecordingFields(dlg);
|
||||||
|
init(dlg);
|
||||||
|
|
||||||
|
reload(dlg, itemId);
|
||||||
|
|
||||||
|
dialogHelper.open(dlg);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
show: showEditor
|
||||||
|
};
|
||||||
|
});
|
77
dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.template.html
vendored
Normal file
77
dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.template.html
vendored
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
<div class="dialogHeader">
|
||||||
|
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="nav:arrow-back"></iron-icon></button>
|
||||||
|
<div class="dialogHeaderTitle">
|
||||||
|
${HeaderNewRecording}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dialogContent smoothScrollY">
|
||||||
|
<form class="dialogContentInner">
|
||||||
|
|
||||||
|
<h1 class="itemName"></h1>
|
||||||
|
<p class="itemEpisodeName"></p>
|
||||||
|
<p class="itemMiscInfoPrimary" style="display: flex; align-items: center;"></p>
|
||||||
|
<p class="itemMiscInfoSecondary" style="display: flex; align-items: center;"></p>
|
||||||
|
|
||||||
|
<div id="eligibleForSeriesFields" class="hide">
|
||||||
|
<br />
|
||||||
|
<div>
|
||||||
|
<paper-checkbox id="chkRecordSeries">${RecordSeries}</paper-checkbox>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="seriesFields" class="hide">
|
||||||
|
<div>
|
||||||
|
<h1>${Days}</h1>
|
||||||
|
</div>
|
||||||
|
<div class="paperCheckboxList">
|
||||||
|
<paper-checkbox id="chkSunday">${Sunday}</paper-checkbox>
|
||||||
|
<paper-checkbox id="chkMonday">${Monday}</paper-checkbox>
|
||||||
|
<paper-checkbox id="chkTuesday">${Tuesday}</paper-checkbox>
|
||||||
|
<paper-checkbox id="chkWednesday">${Wednesday}</paper-checkbox>
|
||||||
|
<paper-checkbox id="chkThursday">${Thursday}</paper-checkbox>
|
||||||
|
<paper-checkbox id="chkFriday">${Friday}</paper-checkbox>
|
||||||
|
<paper-checkbox id="chkSaturday">${Saturday}</paper-checkbox>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="paperCheckboxList">
|
||||||
|
<paper-checkbox id="chkNewOnly">${RecordOnlyNewEpisodes}</paper-checkbox>
|
||||||
|
<paper-checkbox id="chkAnyTime">${RecordAnytime}</paper-checkbox>
|
||||||
|
<paper-checkbox id="chkAllChannels">${RecordOnAllChannels}</paper-checkbox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="convertRecordingsContainer hide">
|
||||||
|
<br />
|
||||||
|
<paper-checkbox id="chkConvertRecordings">${OptionConvertRecordingsToStreamingFormat}</paper-checkbox>
|
||||||
|
<div class="fieldDescription paperCheckboxFieldDescription">${OptionConvertRecordingsToStreamingFormatHelp}</div>
|
||||||
|
<div class="fieldDescription paperCheckboxFieldDescription btnSupporterForConverting hide">
|
||||||
|
<a href="#" class="accent lnkPremiere">${FeatureRequiresEmbyPremiere}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="advanced hide">
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<emby-collapsible title="${Advanced}">
|
||||||
|
<div>
|
||||||
|
<paper-input type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${PrePaddingMinutes}"></paper-input>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div>
|
||||||
|
<paper-input type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${PostPaddingMinutes}"></paper-input>
|
||||||
|
</div>
|
||||||
|
</emby-collapsible>
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div>
|
||||||
|
<div class="supporterContainer hide">
|
||||||
|
<p>${MessageActiveSubscriptionRequiredSeriesRecordings}</p>
|
||||||
|
<p class="supporterTrial hide">${HeaderEnjoyDayTrial}</p>
|
||||||
|
<a class="clearLink btnSupporter hide" href="http://emby.media/premiere" target="_blank"><paper-button raised class="accent block"><iron-icon icon="nav:check"></iron-icon><span>${HeaderBecomeProjectSupporter}</span></paper-button></a>
|
||||||
|
</div>
|
||||||
|
<paper-button raised class="btnSubmit block"><iron-icon icon="mediainfo:fiber-manual-record"></iron-icon><span>${Record}</span></paper-button>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
</form>
|
||||||
|
</div>
|
|
@ -26,7 +26,7 @@ define(function () {
|
||||||
requireCss.load = function (cssId, req, load, config) {
|
requireCss.load = function (cssId, req, load, config) {
|
||||||
|
|
||||||
// Somehow if the url starts with /css, require will get all screwed up since this extension is also called css
|
// Somehow if the url starts with /css, require will get all screwed up since this extension is also called css
|
||||||
var srch = '/emby-webcomponents/requirecss';
|
var srch = '/emby-webcomponents/require/requirecss';
|
||||||
var index = cssId.indexOf(srch);
|
var index = cssId.indexOf(srch);
|
||||||
|
|
||||||
if (index != -1) {
|
if (index != -1) {
|
29
dashboard-ui/bower_components/emby-webcomponents/require/requiretext.js
vendored
Normal file
29
dashboard-ui/bower_components/emby-webcomponents/require/requiretext.js
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
define(function () {
|
||||||
|
|
||||||
|
return {
|
||||||
|
|
||||||
|
load: function (url, req, load, config) {
|
||||||
|
|
||||||
|
if (url.indexOf('http') != 0 && url.indexOf('file:') != 0) {
|
||||||
|
url = config.baseUrl + url;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.urlArgs) {
|
||||||
|
url += config.urlArgs(url, url);
|
||||||
|
}
|
||||||
|
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('GET', url, true);
|
||||||
|
|
||||||
|
xhr.onload = function (e) {
|
||||||
|
load(this.response);
|
||||||
|
};
|
||||||
|
|
||||||
|
xhr.send();
|
||||||
|
},
|
||||||
|
|
||||||
|
normalize: function (name, normalize) {
|
||||||
|
return normalize(name);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
|
@ -71,8 +71,8 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
||||||
require(['alert'], function (alert) {
|
require(['alert'], function (alert) {
|
||||||
alert({
|
alert({
|
||||||
|
|
||||||
text: Globalize.translate('core#ServerUpdateNeeded', 'https://emby.media'),
|
text: Globalize.translate('sharedcomponents#ServerUpdateNeeded', 'https://emby.media'),
|
||||||
html: Globalize.translate('core#ServerUpdateNeeded', '<a href="https://emby.media">https://emby.media</a>')
|
html: Globalize.translate('sharedcomponents#ServerUpdateNeeded', '<a href="https://emby.media">https://emby.media</a>')
|
||||||
|
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
embyRouter.showSelectServer();
|
embyRouter.showSelectServer();
|
||||||
|
|
|
@ -8,10 +8,8 @@
|
||||||
|
|
||||||
// Delete the share since it was cancelled
|
// Delete the share since it was cancelled
|
||||||
apiClient.ajax({
|
apiClient.ajax({
|
||||||
|
|
||||||
type: 'DELETE',
|
type: 'DELETE',
|
||||||
url: apiClient.getUrl('Social/Shares/' + shareId)
|
url: apiClient.getUrl('Social/Shares/' + shareId)
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +39,7 @@
|
||||||
|
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
|
||||||
sharingMenu.showMenu(options).then(function() {
|
return sharingMenu.showMenu(options).then(function () {
|
||||||
console.log('share success. shareId: ' + options.share.Id);
|
console.log('share success. shareId: ' + options.share.Id);
|
||||||
}, function () {
|
}, function () {
|
||||||
onSharingCancel(options, apiClient);
|
onSharingCancel(options, apiClient);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['dialogHelper', 'layoutManager', 'dialogText', './social-share-kit-1.0.4/dist/js/social-share-kit.min', 'css!./social-share-kit-1.0.4/dist/css/social-share-kit.css'], function (dialogHelper, layoutManager, dialogText) {
|
define(['dialogHelper', 'layoutManager', 'globalize', './social-share-kit-1.0.4/dist/js/social-share-kit.min', 'css!./social-share-kit-1.0.4/dist/css/social-share-kit.css'], function (dialogHelper, layoutManager, globalize) {
|
||||||
|
|
||||||
function showMenu(options) {
|
function showMenu(options) {
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<div class="buttons">';
|
html += '<div class="buttons">';
|
||||||
html += '<paper-button class="btnCancel">' + dialogText.get('Cancel') + '</paper-button>';
|
html += '<paper-button class="btnCancel">' + globalize.translate('sharedcomponents#ButtonCancel') + '</paper-button>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
dlg.innerHTML = html;
|
dlg.innerHTML = html;
|
||||||
|
|
14
dashboard-ui/bower_components/emby-webcomponents/shell.js
vendored
Normal file
14
dashboard-ui/bower_components/emby-webcomponents/shell.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
define([], function () {
|
||||||
|
|
||||||
|
return {
|
||||||
|
openUrl: function (url) {
|
||||||
|
window.open(url, '_blank');
|
||||||
|
},
|
||||||
|
canExec: false,
|
||||||
|
exec: function (options) {
|
||||||
|
// options.path
|
||||||
|
// options.arguments
|
||||||
|
return Promise.reject();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
|
@ -118,7 +118,8 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
dlg = dialogHelper.createDialog({
|
dlg = dialogHelper.createDialog({
|
||||||
exitAnimationDuration: options.interactive ? 400 : 800,
|
exitAnimationDuration: options.interactive ? 400 : 800,
|
||||||
size: 'fullscreen',
|
size: 'fullscreen',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
scrollY: false
|
||||||
});
|
});
|
||||||
|
|
||||||
dlg.classList.add('slideshowDialog');
|
dlg.classList.add('slideshowDialog');
|
||||||
|
|
51
dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json
vendored
Normal file
51
dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json
vendored
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
"ValueSpecialEpisodeName": "Special - {0}",
|
||||||
|
"Share": "Share",
|
||||||
|
"ServerUpdateNeeded": "This Emby Server needs to be updated. To download the latest version, please visit {0}",
|
||||||
|
"LiveTvGuideRequiresUnlock": "The Live TV Guide is currently limited to {0} channels. Click the unlock button to learn how to enjoy the full experience.",
|
||||||
|
"AttributeNew": "New",
|
||||||
|
"AttributePremiere": "Premiere",
|
||||||
|
"AttributeLive": "Live",
|
||||||
|
"TrackCount": "{0} tracks",
|
||||||
|
"ItemCount": "{0} items",
|
||||||
|
"ValueSeriesYearToPresent": "{0}-Present",
|
||||||
|
"ReleaseYearValue": "Release year: {0}",
|
||||||
|
"OriginalAirDateValue": "Original air date: {0}",
|
||||||
|
"EndsAtValue": "Ends at {0}",
|
||||||
|
"OptionSundayShort": "Sun",
|
||||||
|
"OptionMondayShort": "Mon",
|
||||||
|
"OptionTuesdayShort": "Tue",
|
||||||
|
"OptionWednesdayShort": "Wed",
|
||||||
|
"OptionThursdayShort": "Thu",
|
||||||
|
"OptionFridayShort": "Fri",
|
||||||
|
"OptionSaturdayShort": "Sat",
|
||||||
|
"HeaderSelectDate": "Select Date",
|
||||||
|
"ButtonOk": "Ok",
|
||||||
|
"ButtonCancel": "Cancel",
|
||||||
|
"ButtonGotIt": "Got It",
|
||||||
|
"RecordingScheduled": "Recording scheduled.",
|
||||||
|
"HeaderNewRecording": "New Recording",
|
||||||
|
"Sunday": "Sunday",
|
||||||
|
"Monday": "Monday",
|
||||||
|
"Tuesday": "Tuesday",
|
||||||
|
"Wednesday": "Wednesday",
|
||||||
|
"Thursday": "Thursday",
|
||||||
|
"Friday": "Friday",
|
||||||
|
"Saturday": "Saturday",
|
||||||
|
"Days": "Days",
|
||||||
|
"RecordSeries": "Record series",
|
||||||
|
"PrePaddingMinutes": "Pre-padding minutes:",
|
||||||
|
"PostPaddingMinutes": "Post-padding minutes:",
|
||||||
|
"RecordOnAllChannels": "Record on all channels",
|
||||||
|
"RecordAnytime": "Record at any time",
|
||||||
|
"RecordOnlyNewEpisodes": "Record only new episodes",
|
||||||
|
"HeaderBecomeProjectSupporter": "Get Emby Premiere",
|
||||||
|
"HeaderEnjoyDayTrial": "Enjoy a 14 Day Free Trial",
|
||||||
|
"MessageActiveSubscriptionRequiredSeriesRecordings": "An active Emby Premiere subscription is required in order to create automated series recordings.",
|
||||||
|
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
|
||||||
|
"OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 for easy playback on your devices.",
|
||||||
|
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
|
||||||
|
"Record": "Record",
|
||||||
|
"Download": "Download",
|
||||||
|
"Advanced": "Advanced"
|
||||||
|
}
|
|
@ -36,7 +36,7 @@
|
||||||
"tag": "v1.5.1",
|
"tag": "v1.5.1",
|
||||||
"commit": "e3e34408fad8f7cde59c4255cf3fe90f7dcf91d8"
|
"commit": "e3e34408fad8f7cde59c4255cf3fe90f7dcf91d8"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-selector.git",
|
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-selector"
|
"_originalSource": "PolymerElements/iron-selector"
|
||||||
}
|
}
|
|
@ -45,7 +45,7 @@
|
||||||
"tag": "v1.0.11",
|
"tag": "v1.0.11",
|
||||||
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
|
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-behaviors.git",
|
"_source": "git://github.com/polymerelements/paper-behaviors.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/paper-behaviors"
|
"_originalSource": "polymerelements/paper-behaviors"
|
||||||
}
|
}
|
|
@ -32,14 +32,14 @@
|
||||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/PolymerElements/paper-ripple",
|
"homepage": "https://github.com/polymerelements/paper-ripple",
|
||||||
"_release": "1.0.5",
|
"_release": "1.0.5",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.5",
|
"tag": "v1.0.5",
|
||||||
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-ripple.git",
|
"_source": "git://github.com/polymerelements/paper-ripple.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/paper-ripple"
|
"_originalSource": "polymerelements/paper-ripple"
|
||||||
}
|
}
|
|
@ -34,6 +34,6 @@
|
||||||
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
|
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/Polymer/polymer.git",
|
"_source": "git://github.com/Polymer/polymer.git",
|
||||||
"_target": "^1.1.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "Polymer/polymer"
|
"_originalSource": "Polymer/polymer"
|
||||||
}
|
}
|
|
@ -91,7 +91,8 @@ define(['appStorage', 'browser'], function (appStorage, browser) {
|
||||||
supports: function (command) {
|
supports: function (command) {
|
||||||
|
|
||||||
var features = [
|
var features = [
|
||||||
'filedownload'
|
'filedownload',
|
||||||
|
'externalpremium'
|
||||||
];
|
];
|
||||||
|
|
||||||
features.push('sharing');
|
features.push('sharing');
|
||||||
|
|
|
@ -201,7 +201,7 @@
|
||||||
var html = '';
|
var html = '';
|
||||||
var title = items.length ? Globalize.translate('HeaderAddToCollection') : Globalize.translate('HeaderNewCollection');
|
var title = items.length ? Globalize.translate('HeaderAddToCollection') : Globalize.translate('HeaderNewCollection');
|
||||||
|
|
||||||
html += '<div class="dialogHeader">';
|
html += '<div class="dialogHeader" style="margin:0 0 2em;">';
|
||||||
html += '<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>';
|
html += '<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>';
|
||||||
html += '<div class="dialogHeaderTitle">';
|
html += '<div class="dialogHeaderTitle">';
|
||||||
html += title;
|
html += title;
|
||||||
|
|
|
@ -161,8 +161,6 @@
|
||||||
|
|
||||||
Promise.all(promises).then(function () {
|
Promise.all(promises).then(function () {
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
|
|
||||||
libraryBrowser.setLastRefreshed(page);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="dialogHeader">
|
<div class="dialogHeader" style="margin:0 0 2em;">
|
||||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||||
<div class="dialogHeaderTitle">
|
<div class="dialogHeaderTitle">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="dialogHeader">
|
<div class="dialogHeader" style="margin:0 0 2em;">
|
||||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||||
<div class="dialogHeaderTitle">
|
<div class="dialogHeaderTitle">
|
||||||
${HeaderInviteUser}
|
${HeaderInviteUser}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="dialogHeader">
|
<div class="dialogHeader" style="margin:0 0 2em;">
|
||||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||||
<div class="dialogHeaderTitle">
|
<div class="dialogHeaderTitle">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="dialogHeader">
|
<div class="dialogHeader" style="margin:0 0 2em;">
|
||||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||||
<div class="dialogHeaderTitle">
|
<div class="dialogHeaderTitle">
|
||||||
${ButtonAddMediaLibrary}
|
${ButtonAddMediaLibrary}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="dialogHeader">
|
<div class="dialogHeader" style="margin:0 0 2em;">
|
||||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||||
<div class="dialogHeaderTitle">
|
<div class="dialogHeaderTitle">
|
||||||
${ButtonEdit}
|
${ButtonEdit}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="dialogHeader">
|
<div class="dialogHeader" style="margin:0 0 2em;">
|
||||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||||
<div class="dialogHeaderTitle">
|
<div class="dialogHeaderTitle">
|
||||||
${ButtonEdit}
|
${ButtonEdit}
|
||||||
|
|
|
@ -207,7 +207,7 @@
|
||||||
|
|
||||||
var title = Globalize.translate('HeaderAddToPlaylist');
|
var title = Globalize.translate('HeaderAddToPlaylist');
|
||||||
|
|
||||||
html += '<div class="dialogHeader">';
|
html += '<div class="dialogHeader" style="margin:0 0 2em;">';
|
||||||
html += '<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>';
|
html += '<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>';
|
||||||
html += '<div class="dialogHeaderTitle">';
|
html += '<div class="dialogHeaderTitle">';
|
||||||
html += title;
|
html += title;
|
||||||
|
|
|
@ -1,370 +0,0 @@
|
||||||
define(['dialogHelper', 'jQuery', 'mediaInfo', 'scripts/livetvcomponents', 'livetvcss', 'paper-checkbox', 'paper-input', 'paper-icon-button-light'], function (dialogHelper, $, mediaInfo) {
|
|
||||||
|
|
||||||
var currentProgramId;
|
|
||||||
var currentDialog;
|
|
||||||
var recordingCreated = false;
|
|
||||||
|
|
||||||
function getDaysOfWeek() {
|
|
||||||
|
|
||||||
// Do not localize. These are used as values, not text.
|
|
||||||
return LiveTvHelpers.getDaysOfWeek().map(function (d) {
|
|
||||||
return d.value;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function getDays(context) {
|
|
||||||
|
|
||||||
var daysOfWeek = getDaysOfWeek();
|
|
||||||
|
|
||||||
var days = [];
|
|
||||||
|
|
||||||
for (var i = 0, length = daysOfWeek.length; i < length; i++) {
|
|
||||||
|
|
||||||
var day = daysOfWeek[i];
|
|
||||||
|
|
||||||
if ($('#chk' + day, context).checked()) {
|
|
||||||
days.push(day);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return days;
|
|
||||||
}
|
|
||||||
|
|
||||||
function hideSeriesRecordingFields(context) {
|
|
||||||
slideUpToHide(context.querySelector('#seriesFields'));
|
|
||||||
context.querySelector('.btnSubmitContainer').classList.remove('hide');
|
|
||||||
context.querySelector('.supporterContainer').classList.add('hide');
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeDialog(isSubmitted) {
|
|
||||||
|
|
||||||
recordingCreated = isSubmitted;
|
|
||||||
dialogHelper.close(currentDialog);
|
|
||||||
}
|
|
||||||
|
|
||||||
function onSubmit() {
|
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
var form = this;
|
|
||||||
|
|
||||||
ApiClient.getNamedConfiguration("livetv").then(function (config) {
|
|
||||||
|
|
||||||
config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked();
|
|
||||||
|
|
||||||
ApiClient.updateNamedConfiguration("livetv", config).then(Dashboard.processServerConfigurationUpdateResult);
|
|
||||||
});
|
|
||||||
|
|
||||||
ApiClient.getNewLiveTvTimerDefaults({ programId: currentProgramId }).then(function (item) {
|
|
||||||
|
|
||||||
item.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60;
|
|
||||||
item.PostPaddingSeconds = $('#txtPostPaddingMinutes', form).val() * 60;
|
|
||||||
|
|
||||||
item.RecordNewOnly = $('#chkNewOnly', form).checked();
|
|
||||||
item.RecordAnyChannel = $('#chkAllChannels', form).checked();
|
|
||||||
item.RecordAnyTime = $('#chkAnyTime', form).checked();
|
|
||||||
|
|
||||||
item.Days = getDays(form);
|
|
||||||
|
|
||||||
if ($('#chkRecordSeries', form).checked()) {
|
|
||||||
|
|
||||||
ApiClient.createLiveTvSeriesTimer(item).then(function () {
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
closeDialog(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
|
||||||
ApiClient.createLiveTvTimer(item).then(function () {
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
closeDialog(true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Disable default form submission
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getRegistration(programId) {
|
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
return ApiClient.getJSON(ApiClient.getUrl('LiveTv/Registration', {
|
|
||||||
|
|
||||||
ProgramId: programId,
|
|
||||||
Feature: 'seriesrecordings'
|
|
||||||
|
|
||||||
})).then(function (result) {
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
return result;
|
|
||||||
|
|
||||||
}, function () {
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
|
|
||||||
return {
|
|
||||||
TrialVersion: true,
|
|
||||||
IsValid: true,
|
|
||||||
IsRegistered: false
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function showSeriesRecordingFields(context) {
|
|
||||||
slideDownToShow(context.querySelector('#seriesFields'));
|
|
||||||
context.querySelector('.btnSubmitContainer').classList.remove('hide');
|
|
||||||
|
|
||||||
getRegistration(currentProgramId).then(function (regInfo) {
|
|
||||||
|
|
||||||
if (regInfo.IsValid) {
|
|
||||||
context.querySelector('.btnSubmitContainer').classList.remove('hide');
|
|
||||||
} else {
|
|
||||||
context.querySelector('.btnSubmitContainer').classList.add('hide');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (regInfo.IsRegistered) {
|
|
||||||
|
|
||||||
context.querySelector('.supporterContainer').classList.add('hide');
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
context.querySelector('.supporterContainer').classList.remove('hide');
|
|
||||||
|
|
||||||
if (regInfo.TrialVersion) {
|
|
||||||
context.querySelector('.supporterTrial').classList.remove('hide');
|
|
||||||
} else {
|
|
||||||
context.querySelector('.supporterTrial').classList.add('hide');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function slideDownToShow(elem) {
|
|
||||||
|
|
||||||
if (!elem.classList.contains('hide')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
elem.classList.remove('hide');
|
|
||||||
|
|
||||||
elem.style.overflow = 'hidden';
|
|
||||||
|
|
||||||
requestAnimationFrame(function () {
|
|
||||||
|
|
||||||
elem.animate([{
|
|
||||||
height: 0
|
|
||||||
}, {
|
|
||||||
height: elem.offsetHeight + 'px'
|
|
||||||
|
|
||||||
}], { duration: 400, easing: 'ease' }).onfinish = function () {
|
|
||||||
elem.classList.remove('hide');
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function slideUpToHide(elem) {
|
|
||||||
|
|
||||||
if (elem.classList.contains('hide')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
elem.style.overflow = 'hidden';
|
|
||||||
|
|
||||||
requestAnimationFrame(function () {
|
|
||||||
|
|
||||||
elem.animate([{
|
|
||||||
height: elem.offsetHeight + 'px'
|
|
||||||
}, {
|
|
||||||
height: 0
|
|
||||||
}], { duration: 400, easing: 'ease' }).onfinish = function () {
|
|
||||||
elem.classList.add('hide');
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function init(context) {
|
|
||||||
|
|
||||||
$('#chkRecordSeries', context).on('change', function () {
|
|
||||||
|
|
||||||
if (this.checked) {
|
|
||||||
showSeriesRecordingFields(context);
|
|
||||||
} else {
|
|
||||||
hideSeriesRecordingFields(context);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.btnCancel', context).on('click', function () {
|
|
||||||
|
|
||||||
closeDialog(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('form', context).off('submit', onSubmit).on('submit', onSubmit);
|
|
||||||
|
|
||||||
var supporterButtons = context.querySelectorAll('.btnSupporter');
|
|
||||||
for (var i = 0, length = supporterButtons.length; i < length; i++) {
|
|
||||||
if (AppInfo.enableSupporterMembership) {
|
|
||||||
supporterButtons[i].classList.remove('hide');
|
|
||||||
} else {
|
|
||||||
supporterButtons[i].classList.add('hide');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (AppInfo.enableSupporterMembership) {
|
|
||||||
context.querySelector('.btnSupporterForConverting a').href = 'https://emby.media/premiere';
|
|
||||||
} else {
|
|
||||||
context.querySelector('.btnSupporterForConverting a').href = '#';
|
|
||||||
}
|
|
||||||
|
|
||||||
ApiClient.getNamedConfiguration("livetv").then(function (config) {
|
|
||||||
|
|
||||||
$('#chkConvertRecordings', context).checked(config.EnableRecordingEncoding);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectDays(page, days) {
|
|
||||||
|
|
||||||
var daysOfWeek = getDaysOfWeek();
|
|
||||||
|
|
||||||
for (var i = 0, length = daysOfWeek.length; i < length; i++) {
|
|
||||||
|
|
||||||
var day = daysOfWeek[i];
|
|
||||||
|
|
||||||
$('#chk' + day, page).checked(days.indexOf(day) != -1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderRecording(context, defaultTimer, program) {
|
|
||||||
|
|
||||||
$('.itemName', context).html(program.Name);
|
|
||||||
|
|
||||||
$('.itemEpisodeName', context).html(program.EpisodeTitle || '');
|
|
||||||
|
|
||||||
$('.itemMiscInfoPrimary', context).html(mediaInfo.getPrimaryMediaInfoHtml(program));
|
|
||||||
$('.itemMiscInfoSecondary', context).html(mediaInfo.getSecondaryMediaInfoHtml(program));
|
|
||||||
|
|
||||||
$('.itemMiscInfo a').each(function () {
|
|
||||||
$(this).replaceWith(this.innerHTML);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#chkNewOnly', context).checked(defaultTimer.RecordNewOnly);
|
|
||||||
$('#chkAllChannels', context).checked(defaultTimer.RecordAnyChannel);
|
|
||||||
$('#chkAnyTime', context).checked(defaultTimer.RecordAnyTime);
|
|
||||||
|
|
||||||
$('#txtPrePaddingMinutes', context).val(defaultTimer.PrePaddingSeconds / 60);
|
|
||||||
$('#txtPostPaddingMinutes', context).val(defaultTimer.PostPaddingSeconds / 60);
|
|
||||||
|
|
||||||
if (program.IsSeries) {
|
|
||||||
$('#eligibleForSeriesFields', context).show();
|
|
||||||
} else {
|
|
||||||
$('#eligibleForSeriesFields', context).hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
selectDays(context, defaultTimer.Days);
|
|
||||||
|
|
||||||
if (program.ServiceName == 'Emby') {
|
|
||||||
context.querySelector('.convertRecordingsContainer').classList.remove('hide');
|
|
||||||
showConvertRecordingsUnlockMessage(context);
|
|
||||||
} else {
|
|
||||||
context.querySelector('.convertRecordingsContainer').classList.add('hide');
|
|
||||||
}
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
}
|
|
||||||
|
|
||||||
function showConvertRecordingsUnlockMessage(context) {
|
|
||||||
|
|
||||||
Dashboard.getPluginSecurityInfo().then(function(regInfo) {
|
|
||||||
|
|
||||||
if (regInfo.IsMBSupporter) {
|
|
||||||
context.querySelector('.btnSupporterForConverting').classList.add('hide');
|
|
||||||
} else {
|
|
||||||
context.querySelector('.btnSupporterForConverting').classList.remove('hide');
|
|
||||||
}
|
|
||||||
|
|
||||||
}, function() {
|
|
||||||
|
|
||||||
context.querySelector('.btnSupporterForConverting').classList.remove('hide');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function reload(context, programId) {
|
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
var promise1 = ApiClient.getNewLiveTvTimerDefaults({ programId: programId });
|
|
||||||
var promise2 = ApiClient.getLiveTvProgram(programId, Dashboard.getCurrentUserId());
|
|
||||||
|
|
||||||
Promise.all([promise1, promise2]).then(function (responses) {
|
|
||||||
|
|
||||||
var defaults = responses[0];
|
|
||||||
var program = responses[1];
|
|
||||||
|
|
||||||
renderRecording(context, defaults, program);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function showEditor(itemId) {
|
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
|
|
||||||
recordingCreated = false;
|
|
||||||
currentProgramId = itemId;
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.open('GET', 'components/recordingcreator/recordingcreator.template.html', true);
|
|
||||||
|
|
||||||
xhr.onload = function (e) {
|
|
||||||
|
|
||||||
var template = this.response;
|
|
||||||
var dlg = dialogHelper.createDialog({
|
|
||||||
removeOnClose: true,
|
|
||||||
size: 'small'
|
|
||||||
});
|
|
||||||
|
|
||||||
dlg.classList.add('ui-body-b');
|
|
||||||
dlg.classList.add('background-theme-b');
|
|
||||||
|
|
||||||
dlg.classList.add('formDialog');
|
|
||||||
|
|
||||||
var html = '';
|
|
||||||
|
|
||||||
html += Globalize.translateDocument(template);
|
|
||||||
|
|
||||||
dlg.innerHTML = html;
|
|
||||||
document.body.appendChild(dlg);
|
|
||||||
|
|
||||||
dialogHelper.open(dlg);
|
|
||||||
|
|
||||||
currentDialog = dlg;
|
|
||||||
|
|
||||||
dlg.addEventListener('close', function () {
|
|
||||||
|
|
||||||
if (recordingCreated) {
|
|
||||||
require(['toast'], function (toast) {
|
|
||||||
toast(Globalize.translate('MessageRecordingScheduled'));
|
|
||||||
});
|
|
||||||
resolve();
|
|
||||||
} else {
|
|
||||||
reject();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
hideSeriesRecordingFields(dlg);
|
|
||||||
init(dlg);
|
|
||||||
|
|
||||||
reload(dlg, itemId);
|
|
||||||
}
|
|
||||||
|
|
||||||
xhr.send();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
show: showEditor
|
|
||||||
};
|
|
||||||
});
|
|
|
@ -1,73 +0,0 @@
|
||||||
<div class="dialogHeader">
|
|
||||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
|
||||||
<div class="dialogHeaderTitle">
|
|
||||||
${HeaderNewRecording}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form class="liveTvNewRecordingForm" style="margin: 0 auto;">
|
|
||||||
|
|
||||||
<h1 class="itemName" style="margin:0;"></h1>
|
|
||||||
<p class="itemEpisodeName"></p>
|
|
||||||
<p class="itemMiscInfo itemMiscInfoPrimary"></p>
|
|
||||||
<p class="itemMiscInfo itemMiscInfoSecondary"></p>
|
|
||||||
|
|
||||||
<div style="display: none;" id="eligibleForSeriesFields">
|
|
||||||
<br />
|
|
||||||
<div>
|
|
||||||
<paper-checkbox id="chkRecordSeries">${OptionRecordSeries}</paper-checkbox>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<div id="seriesFields" class="hide">
|
|
||||||
<div>
|
|
||||||
<h1>${HeaderDays}</h1>
|
|
||||||
</div>
|
|
||||||
<div class="paperCheckboxList">
|
|
||||||
<paper-checkbox id="chkSunday">${OptionSunday}</paper-checkbox>
|
|
||||||
<paper-checkbox id="chkMonday">${OptionMonday}</paper-checkbox>
|
|
||||||
<paper-checkbox id="chkTuesday">${OptionTuesday}</paper-checkbox>
|
|
||||||
<paper-checkbox id="chkWednesday">${OptionWednesday}</paper-checkbox>
|
|
||||||
<paper-checkbox id="chkThursday">${OptionThursday}</paper-checkbox>
|
|
||||||
<paper-checkbox id="chkFriday">${OptionFriday}</paper-checkbox>
|
|
||||||
<paper-checkbox id="chkSaturday">${OptionSaturday}</paper-checkbox>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h1>${HeaderRepeatingOptions}</h1>
|
|
||||||
</div>
|
|
||||||
<div class="paperCheckboxList">
|
|
||||||
<paper-checkbox id="chkNewOnly">${OptionRecordOnlyNewEpisodes}</paper-checkbox>
|
|
||||||
<paper-checkbox id="chkAnyTime">${OptionRecordAnytime}</paper-checkbox>
|
|
||||||
<paper-checkbox id="chkAllChannels">${OptionRecordOnAllChannels}</paper-checkbox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="convertRecordingsContainer hide">
|
|
||||||
<br />
|
|
||||||
<paper-checkbox id="chkConvertRecordings">${OptionConvertRecordingsToStreamingFormat}</paper-checkbox>
|
|
||||||
<div class="fieldDescription paperCheckboxFieldDescription">${OptionConvertRecordingsToStreamingFormatHelp}</div>
|
|
||||||
<div class="fieldDescription paperCheckboxFieldDescription btnSupporterForConverting hide"><a href="https://emby.media/premiere" target="_blank" class="accent">${FeatureRequiresEmbyPremiere}</a></div>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div>
|
|
||||||
<paper-input type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPrePaddingMinutes}"></paper-input>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div>
|
|
||||||
<paper-input type="number" id="txtPostPaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPostPaddingMinutes}"></paper-input>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div>
|
|
||||||
<div class="supporterContainer hide">
|
|
||||||
<p>${MessageActiveSubscriptionRequiredSeriesRecordings}</p>
|
|
||||||
<p class="supporterTrial hide">${HeaderEnjoyDayTrial}</p>
|
|
||||||
<a class="clearLink btnSupporter hide" href="http://emby.media/premiere" target="_blank"><paper-button raised class="accent block"><iron-icon icon="check"></iron-icon><span>${HeaderBecomeProjectSupporter}</span></paper-button></a>
|
|
||||||
</div>
|
|
||||||
<button type="submit" data-role="none" class="clearButton btnSubmitContainer">
|
|
||||||
<paper-button raised class="submit block" style="background:#cc3333;" autoFocus><iron-icon icon="videocam"></iron-icon><span>${ButtonRecord}</span></paper-button>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
</form>
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="dialogHeader">
|
<div class="dialogHeader" style="margin:0 0 2em;">
|
||||||
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>
|
||||||
<div class="dialogHeaderTitle">
|
<div class="dialogHeaderTitle">
|
||||||
${ButtonEdit}
|
${ButtonEdit}
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
<div style="display: none; vertical-align: top; margin-right: 1em; padding-top: 1em;" class="timerPageImageContainer">
|
<div style="display: none; vertical-align: top; margin-right: 1em; padding-top: 1em;" class="timerPageImageContainer">
|
||||||
</div>
|
</div>
|
||||||
<div style="display: inline-block; vertical-align: middle;">
|
<div style="display: inline-block; vertical-align: middle;">
|
||||||
<h1 class="itemName" style="margin:0;"></h1>
|
<h1 class="itemName"></h1>
|
||||||
<p class="itemEpisodeName"></p>
|
<p class="itemEpisodeName"></p>
|
||||||
<p class="itemMiscInfo itemMiscInfoPrimary"></p>
|
<p class="itemMiscInfo itemMiscInfoPrimary"></p>
|
||||||
<p class="itemMiscInfo itemMiscInfoSecondary"></p>
|
<p class="itemMiscInfo itemMiscInfoSecondary"></p>
|
||||||
|
|
|
@ -362,7 +362,7 @@
|
||||||
dlg.classList.add('background-theme-b');
|
dlg.classList.add('background-theme-b');
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
html += '<div class="dialogHeader">';
|
html += '<div class="dialogHeader" style="margin:0 0 2em;">';
|
||||||
html += '<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>';
|
html += '<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>';
|
||||||
html += '<div class="dialogHeaderTitle">';
|
html += '<div class="dialogHeaderTitle">';
|
||||||
html += item.Name;
|
html += item.Name;
|
||||||
|
|
|
@ -258,13 +258,6 @@ iron-list .card {
|
||||||
padding-top: 7px;
|
padding-top: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 600px) {
|
|
||||||
|
|
||||||
.packageReviewText {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.cardImage {
|
.cardImage {
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
|
@ -541,7 +541,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
|
|
||||||
.itemName {
|
.itemName {
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
margin: 0;
|
margin: .5em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty {
|
.empty {
|
||||||
|
@ -818,6 +818,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mediaInfoItem {
|
.mediaInfoItem {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<div class="primaryDetailsContainer">
|
<div class="primaryDetailsContainer">
|
||||||
<div class="detailNameContainer">
|
<div class="detailNameContainer">
|
||||||
<div class="parentName"></div>
|
<div class="parentName"></div>
|
||||||
<h1 class="itemName" style="margin:0;"></h1>
|
<h1 class="itemName"></h1>
|
||||||
<div class="desktopDetails itemMiscInfo" style="margin-top:.5em;">
|
<div class="desktopDetails itemMiscInfo" style="margin-top:.5em;">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
|
|
||||||
<div class="readOnlyContent" style="margin:auto; max-width: 720px;">
|
<div class="readOnlyContent" style="margin:auto; max-width: 720px;">
|
||||||
<h1 class="itemName" style="margin:0;"></h1>
|
<h1 class="itemName"></h1>
|
||||||
|
|
||||||
<p class="channel" style="margin-top: 2em;"></p>
|
<p class="channel" style="margin-top: 2em;"></p>
|
||||||
<p class="time"></p>
|
<p class="time"></p>
|
||||||
|
|
|
@ -75,7 +75,10 @@
|
||||||
html += "<div>";
|
html += "<div>";
|
||||||
html += "<span class='storeItemReviewText'>";
|
html += "<span class='storeItemReviewText'>";
|
||||||
html += new Date(review.timestamp).toDateString();
|
html += new Date(review.timestamp).toDateString();
|
||||||
html += " " + RatingHelpers.getStoreRatingHtml(review.rating, review.id, review.name, true);
|
if (review.rating) {
|
||||||
|
html += '<iron-icon icon="star" style="color:#666;height:20px;width:20px;min-height:20px;min-width:20px;margin-right:.25em;"></iron-icon>';
|
||||||
|
html += review.rating.toFixed(1);
|
||||||
|
}
|
||||||
html += " " + review.title;
|
html += " " + review.title;
|
||||||
html += "</span>";
|
html += "</span>";
|
||||||
if (review.review) {
|
if (review.review) {
|
||||||
|
@ -133,8 +136,12 @@
|
||||||
RegistrationServices.renderPluginInfo(page, pkg, pluginSecurityInfo);
|
RegistrationServices.renderPluginInfo(page, pkg, pluginSecurityInfo);
|
||||||
|
|
||||||
//Ratings and Reviews
|
//Ratings and Reviews
|
||||||
var ratingHtml = RatingHelpers.getStoreRatingHtml(pkg.avgRating, pkg.id, pkg.name);
|
var ratingHtml = '';
|
||||||
ratingHtml += "<span class='storeReviewCount'>";
|
if (pkg.avgRating) {
|
||||||
|
ratingHtml += '<iron-icon icon="star" style="color:#666;height:20px;width:20px;min-height:20px;min-width:20px;margin-right:.25em;"></iron-icon>';
|
||||||
|
ratingHtml += pkg.avgRating.toFixed(1);
|
||||||
|
}
|
||||||
|
ratingHtml += "<span>";
|
||||||
ratingHtml += " " + Globalize.translate('ValueReviewCount').replace('{0}', pkg.totalRatings);
|
ratingHtml += " " + Globalize.translate('ValueReviewCount').replace('{0}', pkg.totalRatings);
|
||||||
ratingHtml += "</span>";
|
ratingHtml += "</span>";
|
||||||
|
|
||||||
|
|
|
@ -212,28 +212,24 @@
|
||||||
|
|
||||||
function loadHomeTab(page, tabContent) {
|
function loadHomeTab(page, tabContent) {
|
||||||
|
|
||||||
if (libraryBrowser.needsRefresh(tabContent)) {
|
if (window.ApiClient) {
|
||||||
if (window.ApiClient) {
|
var userId = Dashboard.getCurrentUserId();
|
||||||
var userId = Dashboard.getCurrentUserId();
|
Dashboard.showLoadingMsg();
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
getDisplayPreferences('home', userId).then(function (result) {
|
getDisplayPreferences('home', userId).then(function (result) {
|
||||||
|
|
||||||
Dashboard.getCurrentUser().then(function (user) {
|
Dashboard.getCurrentUser().then(function (user) {
|
||||||
|
|
||||||
loadSections(tabContent, user, result).then(function () {
|
loadSections(tabContent, user, result).then(function () {
|
||||||
|
|
||||||
if (!AppInfo.isNativeApp) {
|
|
||||||
showWelcomeIfNeeded(page, result);
|
|
||||||
}
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
|
|
||||||
libraryBrowser.setLastRefreshed(tabContent);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
if (!AppInfo.isNativeApp) {
|
||||||
|
showWelcomeIfNeeded(page, result);
|
||||||
|
}
|
||||||
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1319,7 +1319,7 @@
|
||||||
IncludeItemTypes: "MusicVideo",
|
IncludeItemTypes: "MusicVideo",
|
||||||
Recursive: true,
|
Recursive: true,
|
||||||
Fields: "DateCreated,SyncInfo,CanDelete",
|
Fields: "DateCreated,SyncInfo,CanDelete",
|
||||||
AlbumNames: item.Name
|
Albums: item.Name
|
||||||
|
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
if (result.Items.length) {
|
if (result.Items.length) {
|
||||||
|
@ -2032,8 +2032,10 @@
|
||||||
$('.btnRecord,.btnFloatingRecord', page).on('click', function () {
|
$('.btnRecord,.btnFloatingRecord', page).on('click', function () {
|
||||||
|
|
||||||
var id = getParameterByName('id');
|
var id = getParameterByName('id');
|
||||||
require(['components/recordingcreator/recordingcreator'], function (recordingcreator) {
|
Dashboard.showLoadingMsg();
|
||||||
recordingcreator.show(id).then(function () {
|
|
||||||
|
require(['recordingCreator'], function (recordingCreator) {
|
||||||
|
recordingCreator.show(id, currentItem.ServerId).then(function () {
|
||||||
reload(page);
|
reload(page);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -217,7 +217,6 @@
|
||||||
bubbles: true
|
bubbles: true
|
||||||
}));
|
}));
|
||||||
|
|
||||||
libraryBrowser.setLastRefreshed(view);
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,44 +146,6 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
needsRefresh: function (elem) {
|
|
||||||
|
|
||||||
var last = parseInt(elem.getAttribute('data-lastrefresh') || '0');
|
|
||||||
|
|
||||||
if (!last) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//if (NavHelper.isBack()) {
|
|
||||||
// console.log('Not refreshing data because IsBack=true');
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
var now = new Date().getTime();
|
|
||||||
var cacheDuration;
|
|
||||||
|
|
||||||
if (AppInfo.isNativeApp) {
|
|
||||||
cacheDuration = 300000;
|
|
||||||
} else if (browserInfo.ipad || browserInfo.iphone || browserInfo.android) {
|
|
||||||
cacheDuration = 10000;
|
|
||||||
} else {
|
|
||||||
cacheDuration = 30000;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((now - last) < cacheDuration) {
|
|
||||||
console.log('Not refreshing data due to age');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
setLastRefreshed: function (elem) {
|
|
||||||
|
|
||||||
elem.setAttribute('data-lastrefresh', new Date().getTime());
|
|
||||||
elem.classList.add('hasrefreshtime');
|
|
||||||
},
|
|
||||||
|
|
||||||
allowSwipe: function (target) {
|
allowSwipe: function (target) {
|
||||||
|
|
||||||
function allowSwipeOn(elem) {
|
function allowSwipeOn(elem) {
|
||||||
|
|
|
@ -563,8 +563,8 @@
|
||||||
Dashboard.navigate('itemdetails.html?id=' + albumid);
|
Dashboard.navigate('itemdetails.html?id=' + albumid);
|
||||||
break;
|
break;
|
||||||
case 'record':
|
case 'record':
|
||||||
require(['components/recordingcreator/recordingcreator'], function (recordingcreator) {
|
require(['recordingCreator'], function (recordingCreator) {
|
||||||
recordingcreator.show(itemId);
|
recordingCreator.show(itemId, serverId);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'artist':
|
case 'artist':
|
||||||
|
|
|
@ -794,6 +794,10 @@
|
||||||
|
|
||||||
var btnCast = context.querySelector('.btnCast');
|
var btnCast = context.querySelector('.btnCast');
|
||||||
|
|
||||||
|
if (!btnCast) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var info = MediaController.getPlayerInfo();
|
var info = MediaController.getPlayerInfo();
|
||||||
|
|
||||||
if (info.isLocalPlayer) {
|
if (info.isLocalPlayer) {
|
||||||
|
|
|
@ -111,16 +111,12 @@
|
||||||
renderChannels(page, result);
|
renderChannels(page, result);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
|
|
||||||
LibraryBrowser.setLastRefreshed(page);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
window.LiveTvPage.renderChannelsTab = function (page, tabContent) {
|
window.LiveTvPage.renderChannelsTab = function (page, tabContent) {
|
||||||
|
|
||||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
reloadItems(tabContent);
|
||||||
reloadItems(tabContent);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
|
@ -108,16 +108,12 @@
|
||||||
require(['paper-fab', 'paper-item-body', 'paper-icon-item'], function () {
|
require(['paper-fab', 'paper-item-body', 'paper-icon-item'], function () {
|
||||||
renderTimers(page, result.Items);
|
renderTimers(page, result.Items);
|
||||||
});
|
});
|
||||||
|
|
||||||
LibraryBrowser.setLastRefreshed(page);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
window.LiveTvPage.renderSeriesTimersTab = function (page, tabContent) {
|
window.LiveTvPage.renderSeriesTimersTab = function (page, tabContent) {
|
||||||
|
|
||||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
reload(tabContent);
|
||||||
reload(tabContent);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
|
@ -37,7 +37,6 @@
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
|
|
||||||
renderItems(page, result.Items, 'activeProgramItems', 'play');
|
renderItems(page, result.Items, 'activeProgramItems', 'play');
|
||||||
libraryBrowser.setLastRefreshed(page);
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -137,9 +136,7 @@
|
||||||
|
|
||||||
function renderSuggestedTab(page, tabContent) {
|
function renderSuggestedTab(page, tabContent) {
|
||||||
|
|
||||||
if (libraryBrowser.needsRefresh(tabContent)) {
|
reload(tabContent);
|
||||||
reload(tabContent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadTab(page, index) {
|
function loadTab(page, index) {
|
||||||
|
|
|
@ -245,8 +245,6 @@
|
||||||
|
|
||||||
LibraryBrowser.saveQueryValues(getSavedQueryKey(context), query);
|
LibraryBrowser.saveQueryValues(getSavedQueryKey(context), query);
|
||||||
|
|
||||||
LibraryBrowser.setLastRefreshed(context);
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,6 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
LibraryBrowser.saveQueryValues(getSavedQueryKey(page), query);
|
LibraryBrowser.saveQueryValues(getSavedQueryKey(page), query);
|
||||||
LibraryBrowser.setLastRefreshed(page);
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -184,9 +183,7 @@
|
||||||
|
|
||||||
window.MusicPage.renderAlbumArtistsTab = function (page, tabContent) {
|
window.MusicPage.renderAlbumArtistsTab = function (page, tabContent) {
|
||||||
|
|
||||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
reloadItems(tabContent);
|
||||||
reloadItems(tabContent);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
|
@ -180,7 +180,6 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
LibraryBrowser.saveQueryValues(getSavedQueryKey(page), query);
|
LibraryBrowser.saveQueryValues(getSavedQueryKey(page), query);
|
||||||
LibraryBrowser.setLastRefreshed(page);
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -245,9 +244,7 @@
|
||||||
|
|
||||||
window.MusicPage.renderAlbumsTab = function (page, tabContent) {
|
window.MusicPage.renderAlbumsTab = function (page, tabContent) {
|
||||||
|
|
||||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
reloadItems(tabContent);
|
||||||
reloadItems(tabContent);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
|
@ -127,7 +127,6 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
LibraryBrowser.saveQueryValues(getSavedQueryKey(page), query);
|
LibraryBrowser.saveQueryValues(getSavedQueryKey(page), query);
|
||||||
LibraryBrowser.setLastRefreshed(page);
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -184,9 +183,7 @@
|
||||||
|
|
||||||
window.MusicPage.renderArtistsTab = function (page, tabContent) {
|
window.MusicPage.renderArtistsTab = function (page, tabContent) {
|
||||||
|
|
||||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
reloadItems(tabContent);
|
||||||
reloadItems(tabContent);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
|
@ -91,7 +91,6 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
||||||
LibraryBrowser.setLastRefreshed(page);
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -102,9 +101,7 @@
|
||||||
|
|
||||||
window.MusicPage.renderFoldersTab = function (page, tabContent) {
|
window.MusicPage.renderFoldersTab = function (page, tabContent) {
|
||||||
|
|
||||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
reloadItems(tabContent);
|
||||||
reloadItems(tabContent);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
|
@ -125,9 +125,7 @@
|
||||||
|
|
||||||
window.MusicPage.renderGenresTab = function (page, tabContent) {
|
window.MusicPage.renderGenresTab = function (page, tabContent) {
|
||||||
|
|
||||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
reloadItems(tabContent);
|
||||||
reloadItems(tabContent);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
|
@ -49,8 +49,6 @@
|
||||||
ImageLoader.lazyChildren(elem);
|
ImageLoader.lazyChildren(elem);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
|
|
||||||
libraryBrowser.setLastRefreshed(page);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,19 +201,17 @@
|
||||||
|
|
||||||
var parentId = LibraryMenu.getTopParentId();
|
var parentId = LibraryMenu.getTopParentId();
|
||||||
|
|
||||||
if (libraryBrowser.needsRefresh(tabContent)) {
|
console.log('loadSuggestionsTab');
|
||||||
console.log('loadSuggestionsTab');
|
loadLatest(tabContent, parentId);
|
||||||
loadLatest(tabContent, parentId);
|
loadPlaylists(tabContent, parentId);
|
||||||
loadPlaylists(tabContent, parentId);
|
loadRecentlyPlayed(tabContent, parentId);
|
||||||
loadRecentlyPlayed(tabContent, parentId);
|
loadFrequentlyPlayed(tabContent, parentId);
|
||||||
loadFrequentlyPlayed(tabContent, parentId);
|
|
||||||
|
|
||||||
require(['components/favoriteitems'], function (favoriteItems) {
|
require(['components/favoriteitems'], function (favoriteItems) {
|
||||||
|
|
||||||
favoriteItems.render(tabContent, Dashboard.getCurrentUserId(), parentId, ['favoriteArtists', 'favoriteAlbums', 'favoriteSongs']);
|
favoriteItems.render(tabContent, Dashboard.getCurrentUserId(), parentId, ['favoriteArtists', 'favoriteAlbums', 'favoriteSongs']);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadTab(page, index) {
|
function loadTab(page, index) {
|
||||||
|
|
|
@ -35,9 +35,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function populateList(options) {
|
function populateList(options) {
|
||||||
requirejs(['scripts/ratingdialog'], function () {
|
populateListInternal(options);
|
||||||
populateListInternal(options);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateListInternal(options) {
|
function populateListInternal(options) {
|
||||||
|
@ -207,13 +205,18 @@
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
|
|
||||||
if (!plugin.isExternal) {
|
if (!plugin.isExternal) {
|
||||||
html += "<div class='cardText packageReviewText'>";
|
html += "<div class='cardText' style='display:flex;align-items:center;'>";
|
||||||
html += plugin.price > 0 ? "$" + plugin.price.toFixed(2) : Globalize.translate('LabelFree');
|
|
||||||
html += RatingHelpers.getStoreRatingHtml(plugin.avgRating, plugin.id, plugin.name, true);
|
|
||||||
|
|
||||||
html += "<span class='storeReviewCount'>";
|
if (plugin.avgRating) {
|
||||||
html += " " + Globalize.translate('LabelNumberReviews').replace("{0}", plugin.totalRatings);
|
html += '<iron-icon icon="star" style="color:#666;height:20px;width:20px;min-height:20px;min-width:20px;margin-right:.25em;"></iron-icon>';
|
||||||
html += "</span>";
|
html += plugin.avgRating.toFixed(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (plugin.totalRatings) {
|
||||||
|
html += "<div style='margin-left:.5em;'>";
|
||||||
|
html += " " + Globalize.translate('LabelNumberReviews').replace("{0}", plugin.totalRatings);
|
||||||
|
}
|
||||||
|
html += "</div>";
|
||||||
|
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,30 +109,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
|
||||||
|
|
||||||
getStoreRatingHtml: function (rating, id, name, noLinks) {
|
|
||||||
|
|
||||||
var html = "<div style='margin-left: 5px; margin-right: 5px; display: inline-block; vertical-align:middle;'>";
|
|
||||||
if (!rating) rating = 0;
|
|
||||||
|
|
||||||
for (var i = 1; i <= 5; i++) {
|
|
||||||
var title = noLinks ? rating + " stars" : "Rate " + i + (i > 1 ? " stars" : " star");
|
|
||||||
|
|
||||||
html += noLinks ? "" : "<a href='#' data-id=" + id + " data-name='" + name + "' data-rating=" + i + " onclick='RatingHelpers.ratePackage(this);return false;' >";
|
|
||||||
if (rating <= i - 1) {
|
|
||||||
html += "<div class='storeStarRating emptyStarRating' title='" + title + "'></div>";
|
|
||||||
} else if (rating < i) {
|
|
||||||
html += "<div class='storeStarRating halfStarRating' title='" + title + "'></div>";
|
|
||||||
} else {
|
|
||||||
html += "<div class='storeStarRating' title='" + title + "'></div>";
|
|
||||||
}
|
|
||||||
html += noLinks ? "" : "</a>";
|
|
||||||
}
|
|
||||||
|
|
||||||
html += "</div>";
|
|
||||||
|
|
||||||
return html;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -161,8 +161,6 @@
|
||||||
query.StartIndex -= query.Limit;
|
query.StartIndex -= query.Limit;
|
||||||
reloadItems(parentItem);
|
reloadItems(parentItem);
|
||||||
});
|
});
|
||||||
|
|
||||||
libraryBrowser.setLastRefreshed(view);
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -174,13 +172,11 @@
|
||||||
ApiClient.getItem(Dashboard.getCurrentUserId(), params.parentId).then(function (parent) {
|
ApiClient.getItem(Dashboard.getCurrentUserId(), params.parentId).then(function (parent) {
|
||||||
LibraryMenu.setTitle(parent.Name);
|
LibraryMenu.setTitle(parent.Name);
|
||||||
|
|
||||||
if (libraryBrowser.needsRefresh(view)) {
|
reloadItems(parent);
|
||||||
reloadItems(parent);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (libraryBrowser.needsRefresh(view)) {
|
else {
|
||||||
reloadItems();
|
reloadItems();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1797,7 +1797,7 @@ var AppInfo = {};
|
||||||
|
|
||||||
if (navigator.webkitPersistentStorage) {
|
if (navigator.webkitPersistentStorage) {
|
||||||
paths.imageFetcher = embyWebComponentsBowerPath + "/images/persistentimagefetcher";
|
paths.imageFetcher = embyWebComponentsBowerPath + "/images/persistentimagefetcher";
|
||||||
//paths.imageFetcher = embyWebComponentsBowerPath + "/images/basicimagefetcher";
|
paths.imageFetcher = embyWebComponentsBowerPath + "/images/basicimagefetcher";
|
||||||
} else if (Dashboard.isRunningInCordova()) {
|
} else if (Dashboard.isRunningInCordova()) {
|
||||||
paths.imageFetcher = 'cordova/imagestore';
|
paths.imageFetcher = 'cordova/imagestore';
|
||||||
} else {
|
} else {
|
||||||
|
@ -1821,20 +1821,24 @@ var AppInfo = {};
|
||||||
|
|
||||||
define("libjass", [bowerPath + "/libjass/libjass", "css!" + bowerPath + "/libjass/libjass"], returnFirstDependency);
|
define("libjass", [bowerPath + "/libjass/libjass", "css!" + bowerPath + "/libjass/libjass"], returnFirstDependency);
|
||||||
|
|
||||||
|
define("recordingCreator", [embyWebComponentsBowerPath + "/recordingcreator/recordingcreator"], returnFirstDependency);
|
||||||
define("mediaInfo", [embyWebComponentsBowerPath + "/mediainfo/mediainfo"], returnFirstDependency);
|
define("mediaInfo", [embyWebComponentsBowerPath + "/mediainfo/mediainfo"], returnFirstDependency);
|
||||||
define("backdrop", [embyWebComponentsBowerPath + "/backdrop/backdrop"], returnFirstDependency);
|
define("backdrop", [embyWebComponentsBowerPath + "/backdrop/backdrop"], returnFirstDependency);
|
||||||
define("fetchHelper", [embyWebComponentsBowerPath + "/fetchhelper"], returnFirstDependency);
|
define("fetchHelper", [embyWebComponentsBowerPath + "/fetchhelper"], returnFirstDependency);
|
||||||
|
|
||||||
define("tvguide", [embyWebComponentsBowerPath + "/guide/guide", 'embyRouter'], function (tvGuide, embyRouter) {
|
define("tvguide", [embyWebComponentsBowerPath + "/guide/guide", 'embyRouter'], returnFirstDependency);
|
||||||
tvGuide.setBaseUrl(embyRouter.baseUrl() + '/bower_components/emby-webcomponents/guide');
|
|
||||||
return tvGuide;
|
|
||||||
});
|
|
||||||
|
|
||||||
define("viewManager", [embyWebComponentsBowerPath + "/viewmanager"], function (viewManager) {
|
define("viewManager", [embyWebComponentsBowerPath + "/viewmanager"], function (viewManager) {
|
||||||
viewManager.dispatchPageEvents(true);
|
viewManager.dispatchPageEvents(true);
|
||||||
return viewManager;
|
return viewManager;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (Dashboard.isRunningInCordova() && browserInfo.android) {
|
||||||
|
define("shell", ["cordova/android/shell"], returnFirstDependency);
|
||||||
|
} else {
|
||||||
|
define("shell", [embyWebComponentsBowerPath + "/shell"], returnFirstDependency);
|
||||||
|
}
|
||||||
|
|
||||||
define("sharingmanager", [embyWebComponentsBowerPath + "/sharing/sharingmanager"], returnFirstDependency);
|
define("sharingmanager", [embyWebComponentsBowerPath + "/sharing/sharingmanager"], returnFirstDependency);
|
||||||
|
|
||||||
if (Dashboard.isRunningInCordova()) {
|
if (Dashboard.isRunningInCordova()) {
|
||||||
|
@ -1869,8 +1873,9 @@ var AppInfo = {};
|
||||||
waitSeconds: 0,
|
waitSeconds: 0,
|
||||||
map: {
|
map: {
|
||||||
'*': {
|
'*': {
|
||||||
'css': bowerPath + '/emby-webcomponents/requirecss',
|
'css': bowerPath + '/emby-webcomponents/require/requirecss',
|
||||||
'html': bowerPath + '/emby-webcomponents/requirehtml'
|
'html': bowerPath + '/emby-webcomponents/require/requirehtml',
|
||||||
|
'text': bowerPath + '/emby-webcomponents/require/requiretext'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
urlArgs: urlArgs,
|
urlArgs: urlArgs,
|
||||||
|
@ -1926,8 +1931,6 @@ var AppInfo = {};
|
||||||
|
|
||||||
define("jstree", [bowerPath + "/jstree/dist/jstree", "css!thirdparty/jstree/themes/default/style.min.css"]);
|
define("jstree", [bowerPath + "/jstree/dist/jstree", "css!thirdparty/jstree/themes/default/style.min.css"]);
|
||||||
|
|
||||||
define('jqm', ['thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.js']);
|
|
||||||
|
|
||||||
define("jqmbase", ['css!thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.theme.css']);
|
define("jqmbase", ['css!thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.theme.css']);
|
||||||
define("jqmicons", ['jqmbase', 'css!thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.icons.css']);
|
define("jqmicons", ['jqmbase', 'css!thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.icons.css']);
|
||||||
define("jqmtable", ['jqmbase', "thirdparty/jquerymobile-1.4.5/jqm.table", 'css!thirdparty/jquerymobile-1.4.5/jqm.table.css']);
|
define("jqmtable", ['jqmbase', "thirdparty/jquerymobile-1.4.5/jqm.table", 'css!thirdparty/jquerymobile-1.4.5/jqm.table.css']);
|
||||||
|
@ -1982,7 +1985,6 @@ var AppInfo = {};
|
||||||
|
|
||||||
define("swiper", [bowerPath + "/Swiper/dist/js/swiper.min", "css!" + bowerPath + "/Swiper/dist/css/swiper.min"], returnFirstDependency);
|
define("swiper", [bowerPath + "/Swiper/dist/js/swiper.min", "css!" + bowerPath + "/Swiper/dist/css/swiper.min"], returnFirstDependency);
|
||||||
|
|
||||||
define("dialogHelper", [embyWebComponentsBowerPath + "/dialoghelper/dialoghelper"], returnFirstDependency);
|
|
||||||
define("toast", [embyWebComponentsBowerPath + "/toast/toast"], returnFirstDependency);
|
define("toast", [embyWebComponentsBowerPath + "/toast/toast"], returnFirstDependency);
|
||||||
define("scrollHelper", [embyWebComponentsBowerPath + "/scrollhelper"], returnFirstDependency);
|
define("scrollHelper", [embyWebComponentsBowerPath + "/scrollhelper"], returnFirstDependency);
|
||||||
|
|
||||||
|
@ -2012,6 +2014,12 @@ var AppInfo = {};
|
||||||
return jQuery;
|
return jQuery;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
define("dialogHelper", [embyWebComponentsBowerPath + "/dialoghelper/dialoghelper"], function (dialoghelper) {
|
||||||
|
|
||||||
|
dialoghelper.setOnOpen(onDialogOpen);
|
||||||
|
return dialoghelper;
|
||||||
|
});
|
||||||
|
|
||||||
// alias
|
// alias
|
||||||
define("historyManager", [], function () {
|
define("historyManager", [], function () {
|
||||||
return Emby.Page;
|
return Emby.Page;
|
||||||
|
@ -2060,8 +2068,6 @@ var AppInfo = {};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
define('dialogText', ['globalize'], getDialogText());
|
|
||||||
|
|
||||||
define("embyRouter", [embyWebComponentsBowerPath + '/router'], function (embyRouter) {
|
define("embyRouter", [embyWebComponentsBowerPath + '/router'], function (embyRouter) {
|
||||||
|
|
||||||
embyRouter.showLocalLogin = function (apiClient, serverId, manualLogin) {
|
embyRouter.showLocalLogin = function (apiClient, serverId, manualLogin) {
|
||||||
|
@ -2114,14 +2120,13 @@ var AppInfo = {};
|
||||||
return appSettings;
|
return appSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDialogText() {
|
function onDialogOpen(dlg) {
|
||||||
return function (globalize) {
|
if (dlg.classList.contains('formDialog')) {
|
||||||
return {
|
if (!dlg.classList.contains('background-theme-a')) {
|
||||||
get: function (text) {
|
dlg.classList.add('background-theme-b');
|
||||||
return globalize.translate('Button' + text);
|
dlg.classList.add('ui-body-b');
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function initRequireWithBrowser(browser) {
|
function initRequireWithBrowser(browser) {
|
||||||
|
@ -2266,12 +2271,31 @@ var AppInfo = {};
|
||||||
|
|
||||||
window.Globalize = globalize;
|
window.Globalize = globalize;
|
||||||
|
|
||||||
loadCoreDictionary(globalize).then(onGlobalizeInit);
|
Promise.all([loadCoreDictionary(globalize), loadSharedComponentsDictionary(globalize)]).then(onGlobalizeInit);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadSharedComponentsDictionary(globalize) {
|
||||||
|
|
||||||
|
var baseUrl = 'bower_components/emby-webcomponents/strings/';
|
||||||
|
|
||||||
|
var languages = ['en-US'];
|
||||||
|
|
||||||
|
var translations = languages.map(function (i) {
|
||||||
|
return {
|
||||||
|
lang: i,
|
||||||
|
path: baseUrl + i + '.json'
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
globalize.loadStrings({
|
||||||
|
name: 'sharedcomponents',
|
||||||
|
translations: translations
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function loadCoreDictionary(globalize) {
|
function loadCoreDictionary(globalize) {
|
||||||
|
|
||||||
var baseUrl = 'strings/';
|
var baseUrl = 'strings/';
|
||||||
|
|
|
@ -160,9 +160,7 @@
|
||||||
|
|
||||||
window.MusicPage.renderSongsTab = function (page, tabContent) {
|
window.MusicPage.renderSongsTab = function (page, tabContent) {
|
||||||
|
|
||||||
if (LibraryBrowser.needsRefresh(tabContent)) {
|
reloadItems(tabContent);
|
||||||
reloadItems(tabContent);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
|
@ -249,7 +249,7 @@
|
||||||
dlg.classList.add('popupEditor');
|
dlg.classList.add('popupEditor');
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
html += '<div class="dialogHeader">';
|
html += '<div class="dialogHeader" style="margin:0 0 2em;">';
|
||||||
html += '<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>';
|
html += '<button is="paper-icon-button-light" class="btnCancel" tabindex="-1"><iron-icon icon="arrow-back"></iron-icon></button>';
|
||||||
html += '<div class="dialogHeaderTitle">';
|
html += '<div class="dialogHeaderTitle">';
|
||||||
html += Globalize.translate('SyncMedia');
|
html += Globalize.translate('SyncMedia');
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
ApiClient.ajax({
|
ApiClient.ajax({
|
||||||
|
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: 'components/tvproviders/' + type + '.template.html'
|
url: 'components/tvproviders/' + type.toLowerCase() + '.template.html'
|
||||||
|
|
||||||
}).then(function (html) {
|
}).then(function (html) {
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<div class="primaryDetailsContainer">
|
<div class="primaryDetailsContainer">
|
||||||
<div class="detailNameContainer">
|
<div class="detailNameContainer">
|
||||||
<div class="parentName"></div>
|
<div class="parentName"></div>
|
||||||
<h1 class="itemName" style="margin:0;"></h1>
|
<h1 class="itemName"></h1>
|
||||||
<div class="desktopDetails itemMiscInfo" style="margin-top:.5em;">
|
<div class="desktopDetails itemMiscInfo" style="margin-top:.5em;">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
|
@ -525,7 +525,6 @@ paper-radio-group > * {
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dialogHeader {
|
div.dialogHeader {
|
||||||
margin: 0 0 2em !important;
|
|
||||||
padding: .35em .5em;
|
padding: .35em .5em;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -538,11 +537,6 @@ div.dialogHeader {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-body-a .pageContentPaperMaterial {
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui-body-b div.dialogHeader {
|
.ui-body-b div.dialogHeader {
|
||||||
background-color: #101010;
|
background-color: #101010;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue