commit
3993dc8b61
84 changed files with 1115 additions and 826 deletions
|
@ -1,4 +1,4 @@
|
||||||
<div id="addPluginPage" data-role="page" class="page type-interior pluginConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Plugins" data-require="jqmcollapsible,registrationservices,scripts/ratingdialog,scripts/addpluginpage">
|
<div id="addPluginPage" data-role="page" class="page type-interior pluginConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Plugins" data-require="emby-select,emby-collapse,registrationservices,scripts/ratingdialog,scripts/addpluginpage">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
@ -9,25 +9,26 @@
|
||||||
|
|
||||||
<div class="readOnlyContent">
|
<div class="readOnlyContent">
|
||||||
|
|
||||||
<h2 class="pluginName"></h2>
|
<h1 class="pluginName"></h1>
|
||||||
<p id="tagline" style="font-style: italic;"></p>
|
<p id="tagline" style="font-style: italic;"></p>
|
||||||
<p id="pPreviewImage"></p>
|
<p id="pPreviewImage"></p>
|
||||||
|
|
||||||
<p id="overview"></p>
|
<p id="overview"></p>
|
||||||
|
|
||||||
<div data-role="collapsible" data-collapsed="false" style="margin-top: 2em;">
|
<div style="margin-top: 2em;">
|
||||||
<h3>${HeaderInstall}</h3>
|
<h1>${HeaderInstall}</h1>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<form class="addPluginForm">
|
<form class="addPluginForm">
|
||||||
<p id="pCurrentVersion"></p>
|
<p id="pCurrentVersion"></p>
|
||||||
<p id="pSelectVersion" class="hide">
|
<div id="pSelectVersion" class="hide selectContainer">
|
||||||
<label for="selectVersion">${LabelSelectVersionToInstall}</label>
|
<select id="selectVersion" name="selectVersion" is="emby-select" label="${LabelSelectVersionToInstall}"></select>
|
||||||
<select id="selectVersion" name="selectVersion"></select>
|
</div>
|
||||||
</p>
|
|
||||||
|
|
||||||
<p id="btnInstallDiv" class="hide">
|
<p id="btnInstallDiv" class="hide">
|
||||||
<button id="btnInstall" type="submit" data-icon="arrow-d" data-theme="b">Install</button>
|
<button is="emby-button" type="submit" id="btnInstall" class="raised submit block">
|
||||||
|
<iron-icon icon="check"></iron-icon><span>${Install}</span>
|
||||||
|
</button>
|
||||||
</p>
|
</p>
|
||||||
<p id="nonServerMsg"></p>
|
<p id="nonServerMsg"></p>
|
||||||
</form>
|
</form>
|
||||||
|
@ -75,28 +76,29 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
<div class="readOnlyContent">
|
<div class="readOnlyContent">
|
||||||
<div data-role="collapsible" data-collapsed="false" style="margin-top: 2em;">
|
<div is="emby-collapse" title="${HeaderReviews}">
|
||||||
<h3>${HeaderReviews}</h3>
|
<div class="collapseContent">
|
||||||
<div>
|
|
||||||
<br />
|
<br />
|
||||||
<div id="ratingLine"></div>
|
<div id="ratingLine"></div>
|
||||||
<div id="latestReviews"></div>
|
<div id="latestReviews"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-role="collapsible" data-collapsed="false" style="margin-top: 2em;">
|
<div is="emby-collapse" title="${HeaderDeveloperInfo}">
|
||||||
<h3>${HeaderDeveloperInfo}</h3>
|
<div class="collapseContent">
|
||||||
<p id="developer"></p>
|
<p id="developer"></p>
|
||||||
<p id="pViewWebsite" style="display: none;">
|
<p id="pViewWebsite" style="display: none;">
|
||||||
<a href="#" data-rel="external" target="_blank">${ButtonViewWebsite}</a>
|
<a href="#" data-rel="external" target="_blank">${ButtonViewWebsite}</a>
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-role="collapsible" style="margin-top: 2em;">
|
<div is="emby-collapse" title="${HeaderRevisionHistory}">
|
||||||
<h3>${HeaderRevisionHistory}</h3>
|
<div class="collapseContent">
|
||||||
<div id="revisionHistory"></div>
|
<div id="revisionHistory"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.4.63",
|
"version": "1.4.69",
|
||||||
"_release": "1.4.63",
|
"_release": "1.4.69",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.4.63",
|
"tag": "1.4.69",
|
||||||
"commit": "c557118405664924ccb91634f8dcf9aa2667bcb1"
|
"commit": "24a5ea44282dc2e0a537c6245aedd88877ebb9ad"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.0",
|
"_target": "^1.2.0",
|
||||||
|
|
|
@ -24,8 +24,9 @@ define(['focusManager', 'css!./style.css', 'clearButtonStyle', 'paper-icon-butto
|
||||||
|
|
||||||
html += '<div class="alphaPickerRow">';
|
html += '<div class="alphaPickerRow">';
|
||||||
if (options.mode == 'keyboard') {
|
if (options.mode == 'keyboard') {
|
||||||
|
// space_bar icon
|
||||||
html += '<button data-value=" " is="paper-icon-button-light" class="alphaPickerButton autoSize">\
|
html += '<button data-value=" " is="paper-icon-button-light" class="alphaPickerButton autoSize">\
|
||||||
<i class="md-icon">space_bar</i>\
|
<i class="md-icon"></i>\
|
||||||
</button>';
|
</button>';
|
||||||
} else {
|
} else {
|
||||||
letters = ['#'];
|
letters = ['#'];
|
||||||
|
@ -36,8 +37,9 @@ define(['focusManager', 'css!./style.css', 'clearButtonStyle', 'paper-icon-butto
|
||||||
html += letters.map(getLetterButton).join('');
|
html += letters.map(getLetterButton).join('');
|
||||||
|
|
||||||
if (options.mode == 'keyboard') {
|
if (options.mode == 'keyboard') {
|
||||||
|
// backspace icon
|
||||||
html += '<button data-value="backspace" is="paper-icon-button-light" class="alphaPickerButton autoSize">\
|
html += '<button data-value="backspace" is="paper-icon-button-light" class="alphaPickerButton autoSize">\
|
||||||
<i class="md-icon">backspace</i>\
|
<i class="md-icon"></i>\
|
||||||
</button>';
|
</button>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,40 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isStyleSupported(prop, value) {
|
||||||
|
// If no value is supplied, use "inherit"
|
||||||
|
value = arguments.length === 2 ? value : 'inherit';
|
||||||
|
// Try the native standard method first
|
||||||
|
if ('CSS' in window && 'supports' in window.CSS) {
|
||||||
|
return window.CSS.supports(prop, value);
|
||||||
|
}
|
||||||
|
// Check Opera's native method
|
||||||
|
if ('supportsCSS' in window) {
|
||||||
|
return window.supportsCSS(prop, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// need try/catch because it's failing on tizen
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Convert to camel-case for DOM interactions
|
||||||
|
var camel = prop.replace(/-([a-z]|[0-9])/ig, function (all, letter) {
|
||||||
|
return (letter + '').toUpperCase();
|
||||||
|
});
|
||||||
|
// Check if the property is supported
|
||||||
|
var support = (camel in el.style);
|
||||||
|
// Create test element
|
||||||
|
var el = document.createElement('div');
|
||||||
|
// Assign the property and value to invoke
|
||||||
|
// the CSS interpreter
|
||||||
|
el.style.cssText = prop + ':' + value;
|
||||||
|
// Ensure both the property and value are
|
||||||
|
// supported and return
|
||||||
|
return support && (el.style[camel] !== '');
|
||||||
|
} catch (err) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var uaMatch = function (ua) {
|
var uaMatch = function (ua) {
|
||||||
ua = ua.toLowerCase();
|
ua = ua.toLowerCase();
|
||||||
|
|
||||||
|
@ -106,7 +140,11 @@
|
||||||
browser.tv = isTv();
|
browser.tv = isTv();
|
||||||
browser.operaTv = browser.tv && userAgent.toLowerCase().indexOf('opr/') != -1;
|
browser.operaTv = browser.tv && userAgent.toLowerCase().indexOf('opr/') != -1;
|
||||||
|
|
||||||
browser.noFlex = (browser.tv && !browser.chrome && !browser.operaTv) || browser.ps4;
|
if (!isStyleSupported('display', 'flex')) {
|
||||||
|
browser.noFlex = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//browser.noFlex = (browser.tv && !browser.chrome && !browser.operaTv) || browser.ps4;
|
||||||
|
|
||||||
return browser;
|
return browser;
|
||||||
});
|
});
|
|
@ -71,7 +71,7 @@
|
||||||
|
|
||||||
.dialog .buttons {
|
.dialog .buttons {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 8px 8px 0 24px;
|
padding: 8px 8px 8px 24px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #3f51b5;
|
color: #3f51b5;
|
||||||
display: -ms-flexbox;
|
display: -ms-flexbox;
|
||||||
|
|
|
@ -153,11 +153,13 @@ _:-ms-input-placeholder, :root .mdl-slider.mdl-slider {
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-tv .mdl-slider::-webkit-slider-thumb {
|
.layout-tv .mdl-slider::-webkit-slider-thumb {
|
||||||
display: none;
|
width: 0;
|
||||||
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-tv .mdl-slider:hover::-webkit-slider-thumb {
|
.layout-tv .mdl-slider:hover::-webkit-slider-thumb {
|
||||||
display: block;
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mdl-slider.is-lowest-value::-webkit-slider-thumb {
|
.mdl-slider.is-lowest-value::-webkit-slider-thumb {
|
||||||
|
|
|
@ -22,18 +22,20 @@
|
||||||
// range.classList.remove('is-lowest-value');
|
// range.classList.remove('is-lowest-value');
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if (backgroundLower) {
|
var value = range.value;
|
||||||
var fraction = (range.value - range.min) / (range.max - range.min);
|
requestAnimationFrame(function () {
|
||||||
|
|
||||||
backgroundLower.style.flex = fraction;
|
if (backgroundLower) {
|
||||||
backgroundLower.style.webkitFlex = fraction;
|
var fraction = (value - range.min) / (range.max - range.min);
|
||||||
backgroundUpper.style.flex = 1 - fraction;
|
|
||||||
backgroundUpper.style.webkitFlex = 1 - fraction;
|
backgroundLower.style.flex = fraction;
|
||||||
}
|
backgroundUpper.style.flex = 1 - fraction;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateBubble(range, bubble) {
|
function updateBubble(range, bubble) {
|
||||||
|
|
||||||
var value = range.value;
|
var value = range.value;
|
||||||
bubble.style.left = (value - 1) + '%';
|
bubble.style.left = (value - 1) + '%';
|
||||||
|
|
||||||
|
@ -71,15 +73,22 @@
|
||||||
var backgroundUpper = containerElement.querySelector('.mdl-slider__background-upper');
|
var backgroundUpper = containerElement.querySelector('.mdl-slider__background-upper');
|
||||||
var sliderBubble = containerElement.querySelector('.sliderBubble');
|
var sliderBubble = containerElement.querySelector('.sliderBubble');
|
||||||
|
|
||||||
|
var hasHideClass = sliderBubble.classList.contains('hide');
|
||||||
|
|
||||||
this.addEventListener('input', function (e) {
|
this.addEventListener('input', function (e) {
|
||||||
this.dragging = true;
|
this.dragging = true;
|
||||||
updateBubble(this, sliderBubble);
|
updateBubble(this, sliderBubble);
|
||||||
sliderBubble.classList.remove('hide');
|
|
||||||
|
if (hasHideClass) {
|
||||||
|
sliderBubble.classList.remove('hide');
|
||||||
|
hasHideClass = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.addEventListener('change', function () {
|
this.addEventListener('change', function () {
|
||||||
this.dragging = false;
|
this.dragging = false;
|
||||||
updateValues(this, backgroundLower, backgroundUpper);
|
updateValues(this, backgroundLower, backgroundUpper);
|
||||||
sliderBubble.classList.add('hide');
|
sliderBubble.classList.add('hide');
|
||||||
|
hasHideClass = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!supportsNativeProgressStyle) {
|
if (!supportsNativeProgressStyle) {
|
||||||
|
|
242
dashboard-ui/bower_components/emby-webcomponents/inputmanager.js
vendored
Normal file
242
dashboard-ui/bower_components/emby-webcomponents/inputmanager.js
vendored
Normal file
|
@ -0,0 +1,242 @@
|
||||||
|
define(['playbackManager', 'focusManager', 'embyRouter'], function (playbackManager, focusManager, embyRouter) {
|
||||||
|
|
||||||
|
var lastInputTime = new Date().getTime();
|
||||||
|
|
||||||
|
function notify() {
|
||||||
|
lastInputTime = new Date().getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
function idleTime() {
|
||||||
|
return new Date().getTime() - lastInputTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
function select(sourceElement) {
|
||||||
|
|
||||||
|
sourceElement.click();
|
||||||
|
}
|
||||||
|
|
||||||
|
var eventListenerCount = 0;
|
||||||
|
function on(scope, fn) {
|
||||||
|
eventListenerCount++;
|
||||||
|
scope.addEventListener('command', fn);
|
||||||
|
}
|
||||||
|
|
||||||
|
function off(scope, fn) {
|
||||||
|
|
||||||
|
if (eventListenerCount) {
|
||||||
|
eventListenerCount--;
|
||||||
|
}
|
||||||
|
|
||||||
|
scope.removeEventListener('command', fn);
|
||||||
|
}
|
||||||
|
|
||||||
|
var commandTimes = {};
|
||||||
|
|
||||||
|
function checkCommandTime(command) {
|
||||||
|
|
||||||
|
var last = commandTimes[command] || 0;
|
||||||
|
var now = new Date().getTime();
|
||||||
|
|
||||||
|
if ((now - last) < 1000) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
commandTimes[command] = now;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleCommand(name, options) {
|
||||||
|
|
||||||
|
notify();
|
||||||
|
|
||||||
|
var sourceElement = (options ? options.sourceElement : null);
|
||||||
|
|
||||||
|
if (sourceElement) {
|
||||||
|
sourceElement = focusManager.focusableParent(sourceElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceElement = sourceElement || document.activeElement || window;
|
||||||
|
|
||||||
|
if (eventListenerCount) {
|
||||||
|
var customEvent = new CustomEvent("command", {
|
||||||
|
detail: {
|
||||||
|
command: name
|
||||||
|
},
|
||||||
|
bubbles: true,
|
||||||
|
cancelable: true
|
||||||
|
});
|
||||||
|
|
||||||
|
var eventResult = sourceElement.dispatchEvent(customEvent);
|
||||||
|
if (!eventResult) {
|
||||||
|
// event cancelled
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (name) {
|
||||||
|
|
||||||
|
case 'up':
|
||||||
|
focusManager.moveUp(sourceElement);
|
||||||
|
break;
|
||||||
|
case 'down':
|
||||||
|
focusManager.moveDown(sourceElement);
|
||||||
|
break;
|
||||||
|
case 'left':
|
||||||
|
focusManager.moveLeft(sourceElement);
|
||||||
|
break;
|
||||||
|
case 'right':
|
||||||
|
focusManager.moveRight(sourceElement);
|
||||||
|
break;
|
||||||
|
case 'home':
|
||||||
|
embyRouter.goHome();
|
||||||
|
break;
|
||||||
|
case 'settings':
|
||||||
|
embyRouter.showSettings();
|
||||||
|
break;
|
||||||
|
case 'back':
|
||||||
|
embyRouter.back();
|
||||||
|
break;
|
||||||
|
case 'forward':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'select':
|
||||||
|
select(sourceElement);
|
||||||
|
break;
|
||||||
|
case 'pageup':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'pagedown':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'end':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'menu':
|
||||||
|
case 'info':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'next':
|
||||||
|
if (playbackManager.isPlayingVideo()) {
|
||||||
|
playbackManager.nextChapter();
|
||||||
|
} else if (playbackManager.isPlaying()) {
|
||||||
|
playbackManager.nextTrack();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'previous':
|
||||||
|
|
||||||
|
if (playbackManager.isPlayingVideo()) {
|
||||||
|
playbackManager.previousChapter();
|
||||||
|
} else if (playbackManager.isPlaying()) {
|
||||||
|
playbackManager.previousTrack();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'guide':
|
||||||
|
embyRouter.showGuide();
|
||||||
|
break;
|
||||||
|
case 'recordedtv':
|
||||||
|
embyRouter.showRecordedTV();
|
||||||
|
break;
|
||||||
|
case 'record':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'livetv':
|
||||||
|
embyRouter.showLiveTV();
|
||||||
|
break;
|
||||||
|
case 'mute':
|
||||||
|
playbackManager.mute();
|
||||||
|
break;
|
||||||
|
case 'unmute':
|
||||||
|
playbackManager.unMute();
|
||||||
|
break;
|
||||||
|
case 'togglemute':
|
||||||
|
playbackManager.toggleMute();
|
||||||
|
break;
|
||||||
|
case 'volumedown':
|
||||||
|
playbackManager.volumeDown();
|
||||||
|
break;
|
||||||
|
case 'volumeup':
|
||||||
|
playbackManager.volumeUp();
|
||||||
|
break;
|
||||||
|
case 'play':
|
||||||
|
playbackManager.unpause();
|
||||||
|
break;
|
||||||
|
case 'pause':
|
||||||
|
playbackManager.pause();
|
||||||
|
break;
|
||||||
|
case 'playpause':
|
||||||
|
playbackManager.playPause();
|
||||||
|
break;
|
||||||
|
case 'stop':
|
||||||
|
if (checkCommandTime('stop')) {
|
||||||
|
playbackManager.stop();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'changezoom':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'changeaudiotrack':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'changesubtitletrack':
|
||||||
|
break;
|
||||||
|
case 'search':
|
||||||
|
embyRouter.showSearch();
|
||||||
|
break;
|
||||||
|
case 'favorites':
|
||||||
|
embyRouter.showFavorites();
|
||||||
|
break;
|
||||||
|
case 'fastforward':
|
||||||
|
playbackManager.fastForward();
|
||||||
|
break;
|
||||||
|
case 'rewind':
|
||||||
|
playbackManager.rewind();
|
||||||
|
break;
|
||||||
|
case 'togglefullscreen':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'disabledisplaymirror':
|
||||||
|
playbackManager.enableDisplayMirroring(false);
|
||||||
|
break;
|
||||||
|
case 'enabledisplaymirror':
|
||||||
|
playbackManager.enableDisplayMirroring(true);
|
||||||
|
break;
|
||||||
|
case 'toggledisplaymirror':
|
||||||
|
playbackManager.toggleDisplayMirroring();
|
||||||
|
break;
|
||||||
|
case 'movies':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'music':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'tv':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'latestepisodes':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'nowplaying':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'upcomingtv':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
case 'nextup':
|
||||||
|
// TODO
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('click', notify);
|
||||||
|
|
||||||
|
return {
|
||||||
|
trigger: handleCommand,
|
||||||
|
handle: handleCommand,
|
||||||
|
notify: notify,
|
||||||
|
idleTime: idleTime,
|
||||||
|
on: on,
|
||||||
|
off: off
|
||||||
|
};
|
||||||
|
});
|
|
@ -11,7 +11,7 @@ button.listItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
.listItem {
|
.listItem {
|
||||||
display: flex;
|
display: block;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 0 1em !important;
|
padding: 0 1em !important;
|
||||||
|
@ -26,12 +26,16 @@ button.listItem {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.listItem > * {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
.listItemBody {
|
.listItemBody {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
padding: 0 1.15em;
|
padding: 0 1.15em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -128,3 +132,11 @@ button.listItem {
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@supports (display: flex) {
|
||||||
|
|
||||||
|
.listItem, .listItemBody {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -19,11 +19,20 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
||||||
showSearch: function () {
|
showSearch: function () {
|
||||||
skinManager.getCurrentSkin().search();
|
skinManager.getCurrentSkin().search();
|
||||||
},
|
},
|
||||||
|
showGenre: function (options) {
|
||||||
|
skinManager.getCurrentSkin().showGenre(options);
|
||||||
|
},
|
||||||
showGuide: function () {
|
showGuide: function () {
|
||||||
skinManager.getCurrentSkin().showGuide();
|
skinManager.getCurrentSkin().showGuide();
|
||||||
},
|
},
|
||||||
showLiveTV: function () {
|
showLiveTV: function () {
|
||||||
skinManager.getCurrentSkin().showLiveTV();
|
skinManager.getCurrentSkin().showLiveTV();
|
||||||
|
},
|
||||||
|
showRecordedTV: function () {
|
||||||
|
skinManager.getCurrentSkin().showRecordedTV();
|
||||||
|
},
|
||||||
|
showFavorites: function () {
|
||||||
|
skinManager.getCurrentSkin().showFavorites();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,26 +21,6 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
|
||||||
options.tag = item.AlbumPrimaryImageTag;
|
options.tag = item.AlbumPrimaryImageTag;
|
||||||
return apiClient.getScaledImageUrl(item.AlbumId, options);
|
return apiClient.getScaledImageUrl(item.AlbumId, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
//else if (item.AlbumId && item.SeriesPrimaryImageTag) {
|
|
||||||
|
|
||||||
// imgUrl = ApiClient.getScaledImageUrl(item.SeriesId, {
|
|
||||||
// type: "Primary",
|
|
||||||
// width: downloadWidth,
|
|
||||||
// tag: item.SeriesPrimaryImageTag,
|
|
||||||
// minScale: minScale
|
|
||||||
// });
|
|
||||||
|
|
||||||
//}
|
|
||||||
//else if (item.ParentPrimaryImageTag) {
|
|
||||||
|
|
||||||
// imgUrl = ApiClient.getImageUrl(item.ParentPrimaryImageItemId, {
|
|
||||||
// type: "Primary",
|
|
||||||
// width: downloadWidth,
|
|
||||||
// tag: item.ParentPrimaryImageTag,
|
|
||||||
// minScale: minScale
|
|
||||||
// });
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -86,5 +86,11 @@
|
||||||
"ReplaceAllMetadata": "Replace all metadata",
|
"ReplaceAllMetadata": "Replace all metadata",
|
||||||
"SearchForMissingMetadata": "Search for missing metadata",
|
"SearchForMissingMetadata": "Search for missing metadata",
|
||||||
"LabelRefreshMode": "Refresh mode:",
|
"LabelRefreshMode": "Refresh mode:",
|
||||||
|
"NoItemsFound": "No items found.",
|
||||||
|
"HeaderSaySomethingLike": "Say Something Like...",
|
||||||
|
"ButtonTryAgain": "Try Again",
|
||||||
|
"HeaderYouSaid": "You Said...",
|
||||||
|
"MessageWeDidntRecognizeCommand": "We're sorry, we didn't recognize that command.",
|
||||||
|
"MessageIfYouBlockedVoice": "If you denied voice access to the app you'll need to reconfigure before trying again.",
|
||||||
"RefreshDialogHelp": "Metadata is refreshed based on settings and internet services that are enabled in the Emby Server dashboard."
|
"RefreshDialogHelp": "Metadata is refreshed based on settings and internet services that are enabled in the Emby Server dashboard."
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
define(['viewcontainer', 'focusManager', 'queryString', 'connectionManager', 'events'], function (viewcontainer, focusManager, queryString, connectionManager, events) {
|
define(['viewcontainer', 'focusManager', 'queryString', 'layoutManager'], function (viewcontainer, focusManager, queryString, layoutManager) {
|
||||||
|
|
||||||
var currentView;
|
var currentView;
|
||||||
var dispatchPageEvents;
|
var dispatchPageEvents;
|
||||||
|
@ -51,7 +51,7 @@ define(['viewcontainer', 'focusManager', 'queryString', 'connectionManager', 'ev
|
||||||
focusManager.autoFocus(view);
|
focusManager.autoFocus(view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else if (!layoutManager.mobile) {
|
||||||
if (view.activeElement && document.body.contains(view.activeElement) && focusManager.isCurrentlyFocusable(view.activeElement)) {
|
if (view.activeElement && document.body.contains(view.activeElement) && focusManager.isCurrentlyFocusable(view.activeElement)) {
|
||||||
focusManager.focus(view.activeElement);
|
focusManager.focus(view.activeElement);
|
||||||
} else {
|
} else {
|
||||||
|
|
10
dashboard-ui/bower_components/emby-webcomponents/voice/commands/controlcommands.js
vendored
Normal file
10
dashboard-ui/bower_components/emby-webcomponents/voice/commands/controlcommands.js
vendored
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
define(['playbackManager'], function (playbackManager) {
|
||||||
|
|
||||||
|
return function (result) {
|
||||||
|
result.success = true;
|
||||||
|
if (result.properties.devicename) {
|
||||||
|
playbackManager.trySetActiveDeviceName(result.properties.devicename);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
|
@ -1,11 +1,10 @@
|
||||||
|
define(['inputManager'], function (inputManager) {
|
||||||
define([], function () {
|
|
||||||
|
|
||||||
return function (result) {
|
return function (result) {
|
||||||
result.success = true;
|
result.success = true;
|
||||||
switch (result.item.deviceid) {
|
switch (result.item.deviceid) {
|
||||||
case 'displaymirroring':
|
case 'displaymirroring':
|
||||||
MediaController.enableDisplayMirroring(false);
|
inputManager.trigger('disabledisplaymirror');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result.success = false;
|
result.success = false;
|
|
@ -1,11 +1,10 @@
|
||||||
|
define(['inputManager'], function (inputManager) {
|
||||||
define([], function () {
|
|
||||||
|
|
||||||
return function (result) {
|
return function (result) {
|
||||||
result.success = true;
|
result.success = true;
|
||||||
switch (result.item.deviceid) {
|
switch (result.item.deviceid) {
|
||||||
case 'displaymirroring':
|
case 'displaymirroring':
|
||||||
MediaController.enableDisplayMirroring(true);
|
inputManager.trigger('enabledisplaymirror');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result.success = false;
|
result.success = false;
|
|
@ -1,5 +1,4 @@
|
||||||
|
define(['connectionManager', 'playbackManager', 'globalize'], function (connectionManager, playbackManager, globalize) {
|
||||||
define([], function () {
|
|
||||||
|
|
||||||
/// <summary> Play items. </summary>
|
/// <summary> Play items. </summary>
|
||||||
/// <param name="items"> The items. </param>
|
/// <param name="items"> The items. </param>
|
||||||
|
@ -16,13 +15,13 @@ define([], function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (items.length) {
|
if (items.length) {
|
||||||
MediaController.play({
|
playbackManager.play({
|
||||||
ids: items
|
ids: items
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
require(['toast'], function (toast) {
|
require(['toast'], function (toast) {
|
||||||
toast(Globalize.translate('MessageNoItemsFound'));
|
toast(globalize.translate('sharedcomponents#NoItemsFound'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,9 +62,10 @@ define([], function () {
|
||||||
query.IncludeItemTypes = result.item.itemType;
|
query.IncludeItemTypes = result.item.itemType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var apiClient = connectionManager.currentApiClient();
|
||||||
if (result.item.sourceid === 'nextup') {
|
if (result.item.sourceid === 'nextup') {
|
||||||
|
|
||||||
ApiClient.getNextUpEpisodes(query).then(function (queryResult) {
|
apiClient.getNextUpEpisodes(query).then(function (queryResult) {
|
||||||
|
|
||||||
playItems(queryResult.Items, result.item.shuffle);
|
playItems(queryResult.Items, result.item.shuffle);
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ define([], function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ApiClient.getItems(Dashboard.getCurrentUserId(), query).then(function (queryResult) {
|
apiClient.getItems(apiClient.getCurrentUserId(), query).then(function (queryResult) {
|
||||||
|
|
||||||
playItems(queryResult.Items, result.item.shuffle);
|
playItems(queryResult.Items, result.item.shuffle);
|
||||||
});
|
});
|
11
dashboard-ui/bower_components/emby-webcomponents/voice/commands/searchcommands.js
vendored
Normal file
11
dashboard-ui/bower_components/emby-webcomponents/voice/commands/searchcommands.js
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
define(['inputManager'], function (inputManager) {
|
||||||
|
|
||||||
|
return function (result) {
|
||||||
|
switch (result.item.deviceid) {
|
||||||
|
default:
|
||||||
|
result.success = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
98
dashboard-ui/bower_components/emby-webcomponents/voice/commands/showcommands.js
vendored
Normal file
98
dashboard-ui/bower_components/emby-webcomponents/voice/commands/showcommands.js
vendored
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
define(['inputManager', 'connectionManager', 'embyRouter'], function (inputManager, connectionManager, embyRouter) {
|
||||||
|
|
||||||
|
return function (result) {
|
||||||
|
result.success = true;
|
||||||
|
switch (result.item.sourceid) {
|
||||||
|
case 'music':
|
||||||
|
inputManager.trigger('music');
|
||||||
|
break;
|
||||||
|
case 'movies':
|
||||||
|
if (result.properties.movieName) {
|
||||||
|
|
||||||
|
//TODO: Find a way to display movie
|
||||||
|
var query = {
|
||||||
|
Limit: 1,
|
||||||
|
UserId: result.userId,
|
||||||
|
ExcludeLocationTypes: "Virtual",
|
||||||
|
NameStartsWith: result.item.itemType
|
||||||
|
};
|
||||||
|
|
||||||
|
if (result.item.itemType) {
|
||||||
|
query.IncludeItemTypes = result.item.itemType;
|
||||||
|
}
|
||||||
|
|
||||||
|
var apiClient = connectionManager.currentApiClient();
|
||||||
|
apiClient.getItems(apiClient.getCurrentUserId(), query).then(function (queryResult) {
|
||||||
|
|
||||||
|
if (queryResult.Items.length) {
|
||||||
|
embyRouter.showItem(queryResult.Items[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
inputManager.trigger('movies');
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'tvseries':
|
||||||
|
inputManager.trigger('tv');
|
||||||
|
break;
|
||||||
|
case 'livetv':
|
||||||
|
var act = result.item.menuid;
|
||||||
|
if (act) {
|
||||||
|
if (act.indexOf('livetv') != -1) {
|
||||||
|
inputManager.trigger('livetv');
|
||||||
|
} else if (act.indexOf('guide') != -1) {
|
||||||
|
inputManager.trigger('guide');
|
||||||
|
} else if (act.indexOf('channels') != -1) {
|
||||||
|
inputManager.trigger('livetv');
|
||||||
|
} else if (act.indexOf('recordings') != -1) {
|
||||||
|
inputManager.trigger('recordedtv');
|
||||||
|
} else if (act.indexOf('scheduled') != -1) {
|
||||||
|
inputManager.trigger('recordedtv');
|
||||||
|
} else if (act.indexOf('series') != -1) {
|
||||||
|
inputManager.trigger('recordedtv');
|
||||||
|
} else {
|
||||||
|
inputManager.trigger('livetv');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
inputManager.trigger('livetv');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'recordings':
|
||||||
|
inputManager.trigger('recordedtv');
|
||||||
|
break;
|
||||||
|
case 'latestepisodes':
|
||||||
|
inputManager.trigger('latestepisodes');
|
||||||
|
case 'home':
|
||||||
|
var act = result.item.menuid;
|
||||||
|
if (act) {
|
||||||
|
if (act.indexOf('home') != -1) {
|
||||||
|
inputManager.trigger('home');
|
||||||
|
}
|
||||||
|
else if (act.indexOf('nextup') != -1) {
|
||||||
|
inputManager.trigger('nextup');
|
||||||
|
}
|
||||||
|
else if (act.indexOf('favorites') != -1) {
|
||||||
|
inputManager.trigger('favorites');
|
||||||
|
} else if (act.indexOf('upcoming') != -1) {
|
||||||
|
inputManager.trigger('upcomingtv');
|
||||||
|
}
|
||||||
|
else if (act.indexOf('nowplaying') != -1) {
|
||||||
|
inputManager.trigger('nowplaying');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
inputManager.trigger('home');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
inputManager.trigger('home');
|
||||||
|
}
|
||||||
|
case 'group':
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
result.success = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
|
@ -1,16 +1,14 @@
|
||||||
|
define(['inputManager'], function (inputManager) {
|
||||||
define([], function () {
|
|
||||||
|
|
||||||
return function (result) {
|
return function (result) {
|
||||||
result.success = true;
|
result.success = true;
|
||||||
switch (result.item.deviceid) {
|
switch (result.item.deviceid) {
|
||||||
case 'displaymirroring':
|
case 'displaymirroring':
|
||||||
MediaController.toggleDisplayMirroring();
|
inputManager.trigger('toggledisplaymirror');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result.success = false;
|
result.success = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
|
@ -139,7 +139,7 @@
|
||||||
"commandtemplates": [
|
"commandtemplates": [
|
||||||
"Play music",
|
"Play music",
|
||||||
"Play my music",
|
"Play my music",
|
||||||
"Listen to my music "
|
"Listen to my music"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
"commandtemplates": [
|
"commandtemplates": [
|
||||||
"Play music",
|
"Play music",
|
||||||
"Play my music",
|
"Play my music",
|
||||||
"Listen to my music "
|
"Listen to my music"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
"commandtemplates": [
|
"commandtemplates": [
|
||||||
"Play music",
|
"Play music",
|
||||||
"Play my music",
|
"Play my music",
|
||||||
"Listen to my music ",
|
"Listen to my music",
|
||||||
"shuffle my favorite songs"
|
"shuffle my favorite songs"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
.voiceHelpContent {
|
.voiceHelpContent {
|
||||||
max-width: 600px;
|
max-width: 700px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// <date>09.10.2015</date>
|
// <date>09.10.2015</date>
|
||||||
// <summary>voicecommands class</summary>
|
// <summary>voicecommands class</summary>
|
||||||
define([], function () {
|
define(['require'], function (require) {
|
||||||
|
|
||||||
/// <summary> Process the command. </summary>
|
/// <summary> Process the command. </summary>
|
||||||
/// <param name="commandPath"> Full pathname of the command file. </param>
|
/// <param name="commandPath"> Full pathname of the command file. </param>
|
||||||
|
@ -28,28 +28,28 @@ define([], function () {
|
||||||
switch (result.item.actionid) {
|
switch (result.item.actionid) {
|
||||||
|
|
||||||
case 'show':
|
case 'show':
|
||||||
processCommand('voice/commands/showcommands.js', result).then(function (result) { resolve(result); });
|
processCommand('./commands/showcommands.js', result).then(function (result) { resolve(result); });
|
||||||
break;
|
break;
|
||||||
case 'play':
|
case 'play':
|
||||||
processCommand('voice/commands/playcommands.js', result).then(function (result) { resolve(result); });
|
processCommand('./commands/playcommands.js', result).then(function (result) { resolve(result); });
|
||||||
break;
|
break;
|
||||||
case 'shuffle':
|
case 'shuffle':
|
||||||
processCommand('voice/commands/playcommands.js', result).then(function (result) { resolve(result); });
|
processCommand('./commands/playcommands.js', result).then(function (result) { resolve(result); });
|
||||||
break;
|
break;
|
||||||
case 'search':
|
case 'search':
|
||||||
processCommand('voice/commands/searchcommands.js', result).then(function (result) { resolve(result); });
|
processCommand('./commands/searchcommands.js', result).then(function (result) { resolve(result); });
|
||||||
break;
|
break;
|
||||||
case 'control':
|
case 'control':
|
||||||
processCommand('voice/commands/controlcommands.js', result).then(function (result) { resolve(result); });
|
processCommand('./commands/controlcommands.js', result).then(function (result) { resolve(result); });
|
||||||
break;
|
break;
|
||||||
case 'enable':
|
case 'enable':
|
||||||
processCommand('voice/commands/enablecommands.js', result).then(function (result) { resolve(result); });
|
processCommand('./commands/enablecommands.js', result).then(function (result) { resolve(result); });
|
||||||
break;
|
break;
|
||||||
case 'disable':
|
case 'disable':
|
||||||
processCommand('voice/commands/disablecommands.js', result).then(function (result) { resolve(result); });
|
processCommand('./commands/disablecommands.js', result).then(function (result) { resolve(result); });
|
||||||
break;
|
break;
|
||||||
case 'toggle':
|
case 'toggle':
|
||||||
processCommand('voice/commands/togglecommands.js', result).then(function (result) { resolve(result); });
|
processCommand('./commands/togglecommands.js', result).then(function (result) { resolve(result); });
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
reject();
|
reject();
|
272
dashboard-ui/bower_components/emby-webcomponents/voice/voicedialog.js
vendored
Normal file
272
dashboard-ui/bower_components/emby-webcomponents/voice/voicedialog.js
vendored
Normal file
|
@ -0,0 +1,272 @@
|
||||||
|
define(['dialogHelper', './voicereceiver', './voiceprocessor', 'globalize', 'emby-button', 'css!./voice.css', 'material-icons', 'css!./../formdialog'], function (dialogHelper, voicereceiver, voiceprocessor, globalize) {
|
||||||
|
|
||||||
|
var lang = 'en-US';
|
||||||
|
|
||||||
|
/// <summary> Shuffle array. </summary>
|
||||||
|
/// <param name="array"> The array. </param>
|
||||||
|
/// <returns> array </returns>
|
||||||
|
function shuffleArray(array) {
|
||||||
|
var currentIndex = array.length, temporaryValue, randomIndex;
|
||||||
|
|
||||||
|
// While there remain elements to shuffle...
|
||||||
|
while (0 !== currentIndex) {
|
||||||
|
|
||||||
|
// Pick a remaining element...
|
||||||
|
randomIndex = Math.floor(Math.random() * currentIndex);
|
||||||
|
currentIndex -= 1;
|
||||||
|
|
||||||
|
// And swap it with the current element.
|
||||||
|
temporaryValue = array[currentIndex];
|
||||||
|
array[currentIndex] = array[randomIndex];
|
||||||
|
array[randomIndex] = temporaryValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary> Gets sample commands. </summary>
|
||||||
|
/// <returns> The sample commands. </returns>
|
||||||
|
function getSampleCommands(groupid) {
|
||||||
|
|
||||||
|
return voiceprocessor.getCommandGroups().then(function (commandGroups) {
|
||||||
|
groupid = typeof (groupid) !== 'undefined' ? groupid : '';
|
||||||
|
|
||||||
|
var commands = [];
|
||||||
|
commandGroups.map(function (group) {
|
||||||
|
if ((group.items && group.items.length > 0) && (groupid == group.groupid || groupid == '')) {
|
||||||
|
|
||||||
|
group.items.map(function (item) {
|
||||||
|
|
||||||
|
if (item.commandtemplates && item.commandtemplates.length > 0) {
|
||||||
|
|
||||||
|
item.commandtemplates.map(function (templates) {
|
||||||
|
commands.push(templates);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return shuffleArray(commands);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary> Gets command group. </summary>
|
||||||
|
/// <param name="groupid"> The groupid. </param>
|
||||||
|
/// <returns> The command group. </returns>
|
||||||
|
function getCommandGroup(groupid) {
|
||||||
|
return voicereceiver.getCommandGroups()
|
||||||
|
.then(function (commandgroups) {
|
||||||
|
if (commandgroups) {
|
||||||
|
var idx = -1;
|
||||||
|
|
||||||
|
idx = commandgroups.map(function (e) { return e.groupid; }).indexOf(groupid);
|
||||||
|
|
||||||
|
if (idx > -1)
|
||||||
|
return commandgroups[idx];
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
} else
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary> Renders the sample commands. </summary>
|
||||||
|
/// <param name="elem"> The element. </param>
|
||||||
|
/// <param name="commands"> The commands. </param>
|
||||||
|
/// <returns> . </returns>
|
||||||
|
function renderSampleCommands(elem, commands) {
|
||||||
|
|
||||||
|
commands.length = Math.min(commands.length, 4);
|
||||||
|
|
||||||
|
commands = commands.map(function (c) {
|
||||||
|
|
||||||
|
return '<div class="exampleCommand"><span class="exampleCommandText">"' + c + '"</span></div>';
|
||||||
|
|
||||||
|
}).join('');
|
||||||
|
|
||||||
|
elem.querySelector('.exampleCommands').innerHTML = commands;
|
||||||
|
}
|
||||||
|
|
||||||
|
var currentDialog;
|
||||||
|
/// <summary> Shows the voice help. </summary>
|
||||||
|
/// <returns> . </returns>
|
||||||
|
function showVoiceHelp(groupid, title) {
|
||||||
|
|
||||||
|
console.log("Showing Voice Help", groupid, title);
|
||||||
|
|
||||||
|
var isNewDialog = false;
|
||||||
|
var dlg;
|
||||||
|
|
||||||
|
if (!currentDialog) {
|
||||||
|
|
||||||
|
isNewDialog = true;
|
||||||
|
|
||||||
|
dlg = dialogHelper.createDialog({
|
||||||
|
size: 'medium',
|
||||||
|
removeOnClose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
dlg.classList.add('ui-body-b');
|
||||||
|
dlg.classList.add('background-theme-b');
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
html += '<div class="dialogHeader" style="margin:0 0 1em;">';
|
||||||
|
html += '<button is="paper-icon-button-light" class="btnCancel autoSize btnCancelVoiceInput" tabindex="-1"><i class="md-icon">arrow_back</i></button>';
|
||||||
|
html += '<div class="dialogHeaderTitle" id="voiceDialogGroupName">';
|
||||||
|
html += '</div>';
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
|
html += '<div>';
|
||||||
|
|
||||||
|
html += '<div class="dialogContent smoothScrollY">';
|
||||||
|
html += '<div class="dialogContentInner centeredContent">';
|
||||||
|
html += '<div class="voiceHelpContent">';
|
||||||
|
|
||||||
|
html += '<div class="defaultVoiceHelp">';
|
||||||
|
|
||||||
|
html += '<h1 style="margin-bottom:1.25em;">' + globalize.translate('sharedcomponents#HeaderSaySomethingLike') + '</h1>';
|
||||||
|
|
||||||
|
html += '<div class="exampleCommands">';
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
|
// defaultVoiceHelp
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
|
html += '<div class="unrecognizedCommand hide">';
|
||||||
|
html += '<h1>' + globalize.translate('sharedcomponents#HeaderYouSaid') + '</h1>';
|
||||||
|
html +=
|
||||||
|
'<p class="exampleCommand voiceInputContainer"><i class="fa fa-quote-left"></i><span class="voiceInputText exampleCommandText"></span><i class="fa fa-quote-right"></i></p>';
|
||||||
|
html += '<p>' + globalize.translate('sharedcomponents#MessageWeDidntRecognizeCommand') + '</p>';
|
||||||
|
|
||||||
|
html += '<br/>';
|
||||||
|
html += '<button is="emby-button" type="button" class="submit block btnRetry raised"><i class="md-icon">mic</i><span>' +
|
||||||
|
globalize.translate('sharedcomponents#ButtonTryAgain') +
|
||||||
|
'</span></button>';
|
||||||
|
html += '<p class="blockedMessage hide">' +
|
||||||
|
globalize.translate('sharedcomponents#MessageIfYouBlockedVoice') +
|
||||||
|
'<br/><br/></p>';
|
||||||
|
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
|
html +=
|
||||||
|
'<button is="emby-button" type="button" class="raised block btnCancelVoiceInput cancel"><i class="md-icon">close</i><span>' + globalize.translate('sharedcomponents#ButtonCancel') + '</span></button>';
|
||||||
|
|
||||||
|
html += '</div>';
|
||||||
|
html += '</div>';
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
|
dlg.innerHTML = html;
|
||||||
|
document.body.appendChild(dlg);
|
||||||
|
|
||||||
|
dialogHelper.open(dlg);
|
||||||
|
currentDialog = dlg;
|
||||||
|
|
||||||
|
dlg.addEventListener('close', function () {
|
||||||
|
currentDialog = null;
|
||||||
|
});
|
||||||
|
|
||||||
|
function onCancelClick() {
|
||||||
|
voicereceiver.cancel();
|
||||||
|
dialogHelper.close(dlg);
|
||||||
|
}
|
||||||
|
|
||||||
|
var closeButtons = dlg.querySelectorAll('.btnCancelVoiceInput');
|
||||||
|
for (var i = 0, length = closeButtons.length; i < length; i++) {
|
||||||
|
closeButtons[i].addEventListener('click', onCancelClick);
|
||||||
|
}
|
||||||
|
|
||||||
|
dlg.querySelector('.btnRetry').addEventListener('click', function () {
|
||||||
|
dlg.querySelector('.unrecognizedCommand').classList.add('hide');
|
||||||
|
dlg.querySelector('.defaultVoiceHelp').classList.remove('hide');
|
||||||
|
listen();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
dlg = currentDialog;
|
||||||
|
|
||||||
|
if (groupid) {
|
||||||
|
getCommandGroup(groupid)
|
||||||
|
.then(
|
||||||
|
function (grp) {
|
||||||
|
dlg.querySelector('#voiceDialogGroupName').innerText = ' ' + grp.name;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
getSampleCommands(groupid)
|
||||||
|
.then(function (commands) {
|
||||||
|
renderSampleCommands(currentDialog, commands);
|
||||||
|
listen();
|
||||||
|
})
|
||||||
|
.catch(function (e) { console.log("Error", e); });
|
||||||
|
} else if (isNewDialog) {
|
||||||
|
getSampleCommands()
|
||||||
|
.then(function (commands) {
|
||||||
|
renderSampleCommands(currentDialog, commands);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function processInput(input) {
|
||||||
|
return voiceprocessor.processTranscript(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary> Shows the unrecognized command help. </summary>
|
||||||
|
/// <returns> . </returns>
|
||||||
|
function showUnrecognizedCommandHelp(command) {
|
||||||
|
//speak("I don't understend this command");
|
||||||
|
if (command)
|
||||||
|
currentDialog.querySelector('.voiceInputText').innerText = command;
|
||||||
|
currentDialog.querySelector('.unrecognizedCommand').classList.remove('hide');
|
||||||
|
currentDialog.querySelector('.defaultVoiceHelp').classList.add('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary> Shows the commands. </summary>
|
||||||
|
/// <param name="createUI"> The create user interface. </param>
|
||||||
|
/// <returns> . </returns>
|
||||||
|
function showCommands(result) {
|
||||||
|
//speak('Hello, what can I do for you?');
|
||||||
|
if (result)
|
||||||
|
showVoiceHelp(result.groupid, result.name);
|
||||||
|
else
|
||||||
|
showVoiceHelp();
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetDialog() {
|
||||||
|
if (currentDialog) {
|
||||||
|
currentDialog.querySelector('.unrecognizedCommand').classList.add('hide');
|
||||||
|
currentDialog.querySelector('.defaultVoiceHelp').classList.remove('hide');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function showDialog() {
|
||||||
|
resetDialog();
|
||||||
|
showCommands();
|
||||||
|
listen();
|
||||||
|
}
|
||||||
|
function listen() {
|
||||||
|
voicereceiver.listenForCommand(lang || "en-US").then(processInput).then(function (data) {
|
||||||
|
|
||||||
|
closeDialog();
|
||||||
|
|
||||||
|
}, function (result) {
|
||||||
|
if (result.error == 'group') {
|
||||||
|
showVoiceHelp(result.item.groupid, result.groupName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
showUnrecognizedCommandHelp(result.text || '');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function closeDialog() {
|
||||||
|
dialogHelper.close(currentDialog);
|
||||||
|
voicereceiver.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary> An enum constant representing the window. voice input manager option. </summary>
|
||||||
|
return {
|
||||||
|
showDialog: showDialog
|
||||||
|
};
|
||||||
|
|
||||||
|
});
|
55
dashboard-ui/bower_components/emby-webcomponents/voice/voiceprocessor.js
vendored
Normal file
55
dashboard-ui/bower_components/emby-webcomponents/voice/voiceprocessor.js
vendored
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
define(['./voicecommands.js', './grammarprocessor.js', 'require'], function (voicecommands, grammarprocessor, require) {
|
||||||
|
|
||||||
|
var commandgroups;
|
||||||
|
|
||||||
|
function getCommandGroups() {
|
||||||
|
|
||||||
|
if (commandgroups) {
|
||||||
|
return Promise.resolve(commandgroups);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
|
var file = "grammar";
|
||||||
|
|
||||||
|
require(['text!./grammar/' + file + '.json'], function (response) {
|
||||||
|
commandgroups = JSON.parse(response);
|
||||||
|
resolve(commandgroups);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/// <summary> Process the transcript described by text. </summary>
|
||||||
|
/// <param name="text"> The text. </param>
|
||||||
|
/// <returns> . </returns>
|
||||||
|
function processTranscript(text) {
|
||||||
|
if (text) {
|
||||||
|
var processor = grammarprocessor(commandgroups, text);
|
||||||
|
if (processor && processor.command) {
|
||||||
|
console.log("Command from Grammar Processor", processor);
|
||||||
|
return voicecommands(processor)
|
||||||
|
.then(function (result) {
|
||||||
|
console.log("Result of executed command", result);
|
||||||
|
if (result.item.actionid === 'show' && result.item.sourceid === 'group') {
|
||||||
|
return Promise.resolve({ error: "group", item: result.item, groupName: result.name });
|
||||||
|
} else {
|
||||||
|
return Promise.resolve({ item: result.item });
|
||||||
|
}
|
||||||
|
}, function () {
|
||||||
|
return Promise.reject({ error: "unrecognized-command", text: text });
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return Promise.reject({ error: "unrecognized-command", text: text });
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return Promise.reject({ error: "empty" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary> An enum constant representing the window. voice input manager option. </summary>
|
||||||
|
return {
|
||||||
|
processTranscript: processTranscript,
|
||||||
|
getCommandGroups: getCommandGroups
|
||||||
|
};
|
||||||
|
|
||||||
|
});
|
57
dashboard-ui/bower_components/emby-webcomponents/voice/voicereceiver.js
vendored
Normal file
57
dashboard-ui/bower_components/emby-webcomponents/voice/voicereceiver.js
vendored
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
define([], function () {
|
||||||
|
var currentRecognition = null;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary> Starts listening for voice commands </summary>
|
||||||
|
/// <returns> . </returns>
|
||||||
|
function listenForCommand(lang) {
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
cancelListener();
|
||||||
|
|
||||||
|
var recognition = new (window.SpeechRecognition ||
|
||||||
|
window.webkitSpeechRecognition ||
|
||||||
|
window.mozSpeechRecognition ||
|
||||||
|
window.oSpeechRecognition ||
|
||||||
|
window.msSpeechRecognition)();
|
||||||
|
recognition.lang = lang;
|
||||||
|
|
||||||
|
recognition.onresult = function (event) {
|
||||||
|
console.log(event);
|
||||||
|
if (event.results.length > 0) {
|
||||||
|
var resultInput = event.results[0][0].transcript || '';
|
||||||
|
resolve(resultInput);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
recognition.onerror = function () {
|
||||||
|
reject({ error: event.error, message: event.message });
|
||||||
|
};
|
||||||
|
|
||||||
|
recognition.onnomatch = function () {
|
||||||
|
reject({ error: "no-match" });
|
||||||
|
};
|
||||||
|
currentRecognition = recognition;
|
||||||
|
|
||||||
|
currentRecognition.start();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary> Cancel listener. </summary>
|
||||||
|
/// <returns> . </returns>
|
||||||
|
function cancelListener() {
|
||||||
|
|
||||||
|
if (currentRecognition) {
|
||||||
|
currentRecognition.abort();
|
||||||
|
currentRecognition = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary> An enum constant representing the window. voice input manager option. </summary>
|
||||||
|
return {
|
||||||
|
listenForCommand: listenForCommand,
|
||||||
|
cancel: cancelListener
|
||||||
|
};
|
||||||
|
|
||||||
|
});
|
|
@ -32,14 +32,14 @@
|
||||||
"web-component-tester": "^4.0.0",
|
"web-component-tester": "^4.0.0",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polymerelements/iron-icon",
|
"homepage": "https://github.com/PolymerElements/iron-icon",
|
||||||
"_release": "1.0.8",
|
"_release": "1.0.8",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.8",
|
"tag": "v1.0.8",
|
||||||
"commit": "f36b38928849ef3853db727faa8c9ef104d611eb"
|
"commit": "f36b38928849ef3853db727faa8c9ef104d611eb"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-icon.git",
|
"_source": "git://github.com/PolymerElements/iron-icon.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-icon"
|
"_originalSource": "PolymerElements/iron-icon"
|
||||||
}
|
}
|
|
@ -36,7 +36,7 @@
|
||||||
"tag": "v1.5.2",
|
"tag": "v1.5.2",
|
||||||
"commit": "18e8e12dcd9a4560de480562f65935feed334b86"
|
"commit": "18e8e12dcd9a4560de480562f65935feed334b86"
|
||||||
},
|
},
|
||||||
"_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"
|
||||||
}
|
}
|
|
@ -768,7 +768,7 @@ prevent = dy > dx;
|
||||||
prevent = dx > dy;
|
prevent = dx > dy;
|
||||||
}
|
}
|
||||||
if (prevent) {
|
if (prevent) {
|
||||||
//ev.preventDefault();
|
ev.preventDefault();
|
||||||
} else {
|
} else {
|
||||||
Gestures.prevent('track');
|
Gestures.prevent('track');
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,6 +75,14 @@ define(['appStorage', 'browser'], function (appStorage, browser) {
|
||||||
return deviceName;
|
return deviceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function supportsVoiceInput() {
|
||||||
|
return window.SpeechRecognition ||
|
||||||
|
window.webkitSpeechRecognition ||
|
||||||
|
window.mozSpeechRecognition ||
|
||||||
|
window.oSpeechRecognition ||
|
||||||
|
window.msSpeechRecognition;
|
||||||
|
}
|
||||||
|
|
||||||
var appInfo;
|
var appInfo;
|
||||||
var version = window.dashboardVersion || '3.0';
|
var version = window.dashboardVersion || '3.0';
|
||||||
|
|
||||||
|
@ -96,6 +104,12 @@ define(['appStorage', 'browser'], function (appStorage, browser) {
|
||||||
'sharing'
|
'sharing'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
features.push('externallinks');
|
||||||
|
|
||||||
|
if (supportsVoiceInput()) {
|
||||||
|
features.push('voiceinput');
|
||||||
|
}
|
||||||
|
|
||||||
return features.indexOf(command.toLowerCase()) != -1;
|
return features.indexOf(command.toLowerCase()) != -1;
|
||||||
},
|
},
|
||||||
appInfo: function () {
|
appInfo: function () {
|
||||||
|
|
|
@ -159,7 +159,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
self.submit = function () {
|
self.submit = function () {
|
||||||
page.querySelector('.btnSubmitListingsContainer').click();
|
page.querySelector('.btnSubmitListings').click();
|
||||||
};
|
};
|
||||||
|
|
||||||
function onSelectPathClick(e) {
|
function onSelectPathClick(e) {
|
||||||
|
|
|
@ -50,13 +50,12 @@ define(['browser'], function (browser) {
|
||||||
dependencies.push('legacy/dashboard');
|
dependencies.push('legacy/dashboard');
|
||||||
dependencies.push('legacy/selectmenu');
|
dependencies.push('legacy/selectmenu');
|
||||||
dependencies.push('jqmcontrolgroup');
|
dependencies.push('jqmcontrolgroup');
|
||||||
|
dependencies.push('jqmlistview');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isPluginpage || (newView.classList && newView.classList.contains('type-interior'))) {
|
if (isPluginpage || (newView.classList && newView.classList.contains('type-interior'))) {
|
||||||
dependencies.push('jqmlistview');
|
|
||||||
dependencies.push('scripts/notifications');
|
dependencies.push('scripts/notifications');
|
||||||
dependencies.push('dashboardcss');
|
dependencies.push('dashboardcss');
|
||||||
dependencies.push('emby-icons');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
|
@ -1200,7 +1200,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
@media all and (max-width: 1200px) {
|
@media all and (max-width: 1200px) {
|
||||||
|
|
||||||
.listViewUserDataButtons {
|
.listViewUserDataButtons {
|
||||||
display: none;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -135,25 +135,11 @@
|
||||||
|
|
||||||
.libraryViewNav {
|
.libraryViewNav {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: fixed;
|
|
||||||
right: 0;
|
|
||||||
left: 0;
|
|
||||||
top: 50px;
|
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
padding: 0 0 0;
|
padding: 0 0 0;
|
||||||
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),1px 5px 1px rgba(0,0,0,.12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.libraryViewNav.bottom {
|
|
||||||
top: auto !important;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.libraryViewNav {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -161,32 +147,45 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryViewNav .pageTabButton {
|
.ui-body-b .libraryViewNav {
|
||||||
background: transparent;
|
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),1px 5px 1px rgba(0,0,0,.12);
|
||||||
border: 0 !important;
|
position: fixed;
|
||||||
cursor: pointer;
|
right: 0;
|
||||||
outline: none !important;
|
left: 0;
|
||||||
width: auto;
|
top: 50px;
|
||||||
font-family: inherit;
|
}
|
||||||
font-size: inherit;
|
|
||||||
color: #aaa !important;
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
flex-shrink: 0;
|
|
||||||
margin: 0;
|
|
||||||
padding: 1.2em .9em;
|
|
||||||
transition: none !important;
|
|
||||||
position: relative;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: bold !important;
|
|
||||||
height: auto;
|
|
||||||
min-width: initial;
|
|
||||||
line-height: initial;
|
|
||||||
border-radius: 0 !important;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*.libraryViewNav .pageTabButton:hover {
|
.libraryViewNav.bottom {
|
||||||
|
top: auto !important;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pageTabButton {
|
||||||
|
background: transparent;
|
||||||
|
border: 0 !important;
|
||||||
|
cursor: pointer;
|
||||||
|
outline: none !important;
|
||||||
|
width: auto;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
color: #aaa !important;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 1.2em .9em;
|
||||||
|
transition: none !important;
|
||||||
|
position: relative;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: bold !important;
|
||||||
|
height: auto;
|
||||||
|
min-width: initial;
|
||||||
|
line-height: initial;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*.libraryViewNav .pageTabButton:hover {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,13 +193,13 @@
|
||||||
background-color: rgba(100,100,100, 0.20);
|
background-color: rgba(100,100,100, 0.20);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
.libraryViewNav .pageTabButton:focus {
|
.pageTabButton:focus {
|
||||||
font-weight: bold !important;
|
font-weight: bold !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryViewNav .pageTabButton.is-active {
|
.pageTabButton.is-active {
|
||||||
color: #52B54B !important;
|
color: #52B54B !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pageTabButtonSelectionBar {
|
.pageTabButtonSelectionBar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -218,7 +217,7 @@
|
||||||
background: #52B54B;
|
background: #52B54B;
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewMenuBar, .libraryViewNav {
|
.viewMenuBar, .ui-body-b .libraryViewNav {
|
||||||
background-color: #2b2b2b;
|
background-color: #2b2b2b;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
@ -252,63 +251,15 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewMenuBarTabs paper-tabs {
|
|
||||||
background: none;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.viewMenuBarTabs .paperTabLink {
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.viewMenuBarTabs #tabsContent {
|
|
||||||
display: block !important;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.viewMenuBarTabs #tabsContainer {
|
|
||||||
margin: auto;
|
|
||||||
-ms-flex: none;
|
|
||||||
-webkit-flex: none;
|
|
||||||
flex: none;
|
|
||||||
flex-shrink: 0;
|
|
||||||
flex-grow: 1;
|
|
||||||
touch-action: auto !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.viewMenuBarTabs paper-tabs {
|
|
||||||
overflow: visible !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.viewMenuBarTabs .paperTabLink {
|
.viewMenuBarTabs .paperTabLink {
|
||||||
padding-left: 1.5em;
|
padding-left: 1.5em;
|
||||||
padding-right: 1.5em;
|
padding-right: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewMenuBar paper-icon-button.paper-tabs {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.viewMenuBar.semiTransparent {
|
.viewMenuBar.semiTransparent {
|
||||||
background-color: rgba(15, 15, 15, .3);
|
background-color: rgba(15, 15, 15, .3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.paperLibraryViewNav {
|
|
||||||
background-color: transparent !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.libraryViewNav iron-icon {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.libraryViewNav::-webkit-scrollbar {
|
|
||||||
height: 0 !important;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.viewMenuLink {
|
.viewMenuLink {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #eee !important;
|
color: #eee !important;
|
||||||
|
@ -469,13 +420,9 @@ body:not(.dashboardDocument) .headerAppsButton {
|
||||||
padding-left: 272px;
|
padding-left: 272px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainDrawerPanel .viewMenuBarTabs paper-tab {
|
.viewMenuBarTabs .libraryViewNav {
|
||||||
width: auto !important;
|
text-align: left !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainDrawerPanel .viewMenuBarTabs .tab-content {
|
|
||||||
display: block !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboardDocument .mainDrawer {
|
.dashboardDocument .mainDrawer {
|
||||||
z-index: 998 !important;
|
z-index: 998 !important;
|
||||||
|
|
|
@ -226,16 +226,11 @@ div[data-role='page'] {
|
||||||
transform: translateY(-100%);
|
transform: translateY(-100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryViewNav:not(.paperLibraryViewNav).headroom--unpinned:not(.headroomDisabled) {
|
.libraryViewNav.headroom--unpinned:not(.headroomDisabled) {
|
||||||
-webkit-transform: translateY(-210%);
|
-webkit-transform: translateY(-210%);
|
||||||
transform: translateY(-210%);
|
transform: translateY(-210%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.paperLibraryViewNav.headroom--unpinned:not(.headroomDisabled) {
|
|
||||||
-webkit-transform: translateY(-240%);
|
|
||||||
transform: translateY(-240%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.checkboxContainer {
|
.checkboxContainer {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="devicePage" data-role="page" class="page type-interior devicesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Devices" data-require="scripts/device,paper-input,emby-button">
|
<div id="devicePage" data-role="page" class="page type-interior devicesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Devices" data-require="jqmlistview,scripts/device,paper-input,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
|
@ -40,7 +40,7 @@ body:not(.dashboardDocument) .mainDrawerButton {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewMenuBar, .libraryViewNav, paper-tabs {
|
.viewMenuBar, .libraryViewNav {
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="devicesUploadPage" data-role="page" class="page type-interior devicesPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Camera%20upload" data-require="scripts/devicesupload,paper-input,paper-checkbox,emby-button">
|
<div id="devicesUploadPage" data-role="page" class="page type-interior devicesPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Camera%20upload" data-require="jqmlistview,scripts/devicesupload,paper-input,paper-checkbox,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="dlnaProfilePage" data-role="page" class="page type-interior dlnaPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Dlna%20profiles" data-require="jqmcollapsible,jqmpopup,scripts/dlnaprofile,jqmcheckbox,emby-button">
|
<div id="dlnaProfilePage" data-role="page" class="page type-interior dlnaPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Dlna%20profiles" data-require="jqmlistview,jqmcollapsible,jqmpopup,scripts/dlnaprofile,jqmcheckbox,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="dlnaSettingsPage" data-role="page" class="page type-interior withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Play%20to" data-require="scripts/dlnasettings,paper-input,paper-checkbox,emby-button">
|
<div id="dlnaSettingsPage" data-role="page" class="page type-interior withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Play%20to" data-require="jqmlistview,scripts/dlnasettings,paper-input,paper-checkbox,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<select is="emby-select" id="selectVideoDecoder" label="${LabelHardwareAccelerationType}">
|
<select is="emby-select" id="selectVideoDecoder" label="${LabelHardwareAccelerationType}">
|
||||||
<option value="">${OptionNone}</option>
|
<option value="">${OptionNone}</option>
|
||||||
<option value="qsv">Intel Quick Sync</option>
|
<option value="qsv">Intel Quick Sync</option>
|
||||||
<option value="h264_omx">h264_omx (experimental)</option>
|
<option value="h264_omx">OpenMAX OMX (experimental)</option>
|
||||||
<option value="nvenc">Nvidia NVENC (experimental)</option>
|
<option value="nvenc">Nvidia NVENC (experimental)</option>
|
||||||
</select>
|
</select>
|
||||||
<div class="fieldDescription">${LabelHardwareAccelerationTypeHelp}</div>
|
<div class="fieldDescription">${LabelHardwareAccelerationTypeHelp}</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="liveTvSeriesTimerPage" data-role="page" class="page libraryPage liveTvPage noSecondaryNavPage" data-contextname="${HeaderLiveTv}" data-require="jqmcheckbox,jqmcontrolgroup,emby-button,jqmcollapsible,scripts/livetvcomponents,scripts/livetvseriestimer,livetvcss,paper-checkbox,paper-input" data-backbutton="true" data-menubutton="false">
|
<div id="liveTvSeriesTimerPage" data-role="page" class="page libraryPage liveTvPage noSecondaryNavPage" data-contextname="${HeaderLiveTv}" data-require="jqmcheckbox,jqmcontrolgroup,emby-button,emby-collapse,scripts/livetvcomponents,scripts/livetvseriestimer,livetvcss,paper-checkbox,paper-input" data-backbutton="true" data-menubutton="false">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
|
|
||||||
|
@ -42,9 +42,8 @@
|
||||||
<paper-checkbox id="chkAllChannels">${OptionRecordOnAllChannels}</paper-checkbox>
|
<paper-checkbox id="chkAllChannels">${OptionRecordOnAllChannels}</paper-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div data-role="collapsible" data-mini="true">
|
<div is="emby-collapse" title="${HeaderAdvanced}">
|
||||||
<h3>${HeaderAdvanced}</h3>
|
<div class="collapseContent">
|
||||||
<div>
|
|
||||||
<br />
|
<br />
|
||||||
<div>
|
<div>
|
||||||
<paper-input type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPrePaddingMinutes}"></paper-input>
|
<paper-input type="number" id="txtPrePaddingMinutes" pattern="[0-9]*" required="required" min="0" step="1" label="${LabelPrePaddingMinutes}"></paper-input>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="liveTvSettingsPage" data-role="page" class="page type-interior liveTvPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Live%20TV" data-require="scripts/livetvsettings,paper-checkbox,paper-input,emby-collapsible,emby-button">
|
<div id="liveTvSettingsPage" data-role="page" class="page type-interior liveTvPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Live%20TV" data-require="jqmlistview,scripts/livetvsettings,paper-checkbox,paper-input,emby-collapsible,emby-button">
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
<form class="liveTvSettingsForm">
|
<form class="liveTvSettingsForm">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="metadataConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage withTabs" data-require="scripts/metadataconfigurationpage,paper-checkbox,emby-button">
|
<div id="metadataConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage withTabs" data-require="jqmlistview,scripts/metadataconfigurationpage,paper-checkbox,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="metadataImagesConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage withTabs" data-require="emby-collapsible,scripts/metadataimagespage,paper-checkbox,paper-input,paper-fab,paper-icon-item,paper-item-body,emby-button">
|
<div id="metadataImagesConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage withTabs" data-require="jqmlistview,emby-collapsible,scripts/metadataimagespage,paper-checkbox,paper-input,paper-fab,paper-icon-item,paper-item-body,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="metadataNfoPage" data-role="page" class="page type-interior metadataConfigurationPage withTabs" data-require="scripts/metadatanfo,paper-checkbox,emby-button">
|
<div id="metadataNfoPage" data-role="page" class="page type-interior metadataConfigurationPage withTabs" data-require="jqmlistview,scripts/metadatanfo,paper-checkbox,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="metadataSubtitlesPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadatasubtitles,paper-input,paper-checkbox,emby-button">
|
<div id="metadataSubtitlesPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="jqmlistview,scripts/metadatasubtitles,paper-input,paper-checkbox,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="notificationSettingPage" data-role="page" class="page type-interior notificationConfigurationPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Notifications" data-require="scripts/notificationsetting,paper-input,paper-checkbox,emby-button">
|
<div id="notificationSettingPage" data-role="page" class="page type-interior notificationConfigurationPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Notifications" data-require="jqmlistview,scripts/notificationsetting,paper-input,paper-checkbox,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="playbackConfigurationPage" data-role="page" class="page type-interior playbackConfigurationPage withTabs" data-require="scripts/playbackconfiguration,emby-input,emby-button">
|
<div id="playbackConfigurationPage" data-role="page" class="page type-interior playbackConfigurationPage withTabs" data-require="jqmlistview,scripts/playbackconfiguration,emby-input,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="scheduledTaskPage" data-role="page" class="page type-interior scheduledTasksConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Scheduled%20tasks" data-require="jqmpopup,scripts/scheduledtaskpage,paper-input,emby-button">
|
<div id="scheduledTaskPage" data-role="page" class="page type-interior scheduledTasksConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Scheduled%20tasks" data-require="jQuery,jqmpopup,scripts/scheduledtaskpage,paper-input,emby-button,jqmlistview">
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
IsMissing: false,
|
IsMissing: false,
|
||||||
IsVirtualUnaired: false,
|
IsVirtualUnaired: false,
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
EnableImageTypes: "Primary,Backdrop,Thumb",
|
||||||
StartIndex: 0,
|
StartIndex: 0,
|
||||||
Limit: pageSize
|
Limit: pageSize
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo",
|
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo",
|
||||||
UserId: Dashboard.getCurrentUserId(),
|
UserId: Dashboard.getCurrentUserId(),
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
EnableImageTypes: "Primary,Backdrop,Thumb"
|
||||||
};
|
};
|
||||||
|
|
||||||
return ApiClient.getNextUpEpisodes(query);
|
return ApiClient.getNextUpEpisodes(query);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
var query = {
|
var query = {
|
||||||
|
|
||||||
Limit: 40,
|
Limit: 40,
|
||||||
Fields: "AirTime,UserData,SeriesStudio,SyncInfo",
|
Fields: "AirTime,UserData,SyncInfo",
|
||||||
UserId: Dashboard.getCurrentUserId(),
|
UserId: Dashboard.getCurrentUserId(),
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
||||||
|
@ -110,7 +110,6 @@
|
||||||
showLocationTypeIndicator: false,
|
showLocationTypeIndicator: false,
|
||||||
shape: getThumbShape(),
|
shape: getThumbShape(),
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
showPremiereDate: true,
|
|
||||||
preferThumb: true,
|
preferThumb: true,
|
||||||
lazy: true,
|
lazy: true,
|
||||||
showDetailsMenu: true,
|
showDetailsMenu: true,
|
||||||
|
|
|
@ -298,9 +298,7 @@
|
||||||
|
|
||||||
var section = page.querySelector('.nextUpSection');
|
var section = page.querySelector('.nextUpSection');
|
||||||
|
|
||||||
var userData = item.UserData || {};
|
if (item.Type != 'Series') {
|
||||||
|
|
||||||
if (item.Type != 'Series' || !userData.PlayedPercentage) {
|
|
||||||
section.classList.add('hide');
|
section.classList.add('hide');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1330,7 +1330,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (item.AlbumId && item.SeriesPrimaryImageTag) {
|
else if (item.SeriesId && item.SeriesPrimaryImageTag) {
|
||||||
|
|
||||||
imgUrl = ApiClient.getScaledImageUrl(item.SeriesId, {
|
imgUrl = ApiClient.getScaledImageUrl(item.SeriesId, {
|
||||||
type: "Primary",
|
type: "Primary",
|
||||||
|
@ -2004,7 +2004,7 @@
|
||||||
|
|
||||||
} else if (options.preferThumb && imageItem.ParentThumbItemId && options.inheritThumb !== false) {
|
} else if (options.preferThumb && imageItem.ParentThumbItemId && options.inheritThumb !== false) {
|
||||||
|
|
||||||
imgUrl = ApiClient.getThumbImageUrl(imageItem.ParentThumbItemId, {
|
imgUrl = ApiClient.getScaledImageUrl(imageItem.ParentThumbItemId, {
|
||||||
type: "Thumb",
|
type: "Thumb",
|
||||||
maxWidth: thumbWidth,
|
maxWidth: thumbWidth,
|
||||||
enableImageEnhancers: enableImageEnhancers
|
enableImageEnhancers: enableImageEnhancers
|
||||||
|
@ -2100,15 +2100,6 @@
|
||||||
enableImageEnhancers: enableImageEnhancers
|
enableImageEnhancers: enableImageEnhancers
|
||||||
});
|
});
|
||||||
|
|
||||||
} else if (imageItem.SeriesThumbImageTag) {
|
|
||||||
|
|
||||||
imgUrl = ApiClient.getScaledImageUrl(imageItem.SeriesId, {
|
|
||||||
type: "Thumb",
|
|
||||||
maxWidth: thumbWidth,
|
|
||||||
tag: imageItem.SeriesThumbImageTag,
|
|
||||||
enableImageEnhancers: enableImageEnhancers
|
|
||||||
});
|
|
||||||
|
|
||||||
} else if (imageItem.ParentThumbItemId) {
|
} else if (imageItem.ParentThumbItemId) {
|
||||||
|
|
||||||
imgUrl = ApiClient.getThumbImageUrl(imageItem, {
|
imgUrl = ApiClient.getThumbImageUrl(imageItem, {
|
||||||
|
@ -2539,6 +2530,8 @@
|
||||||
|
|
||||||
getPremiereDateText: function (item, date) {
|
getPremiereDateText: function (item, date) {
|
||||||
|
|
||||||
|
var studio = (item.Studios || [])[0];
|
||||||
|
|
||||||
if (!date) {
|
if (!date) {
|
||||||
|
|
||||||
var text = '';
|
var text = '';
|
||||||
|
@ -2547,12 +2540,12 @@
|
||||||
text += item.AirTime;
|
text += item.AirTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.SeriesStudio) {
|
if (studio) {
|
||||||
|
|
||||||
if (text) {
|
if (text) {
|
||||||
text += " on " + item.SeriesStudio;
|
text += " on " + studio;
|
||||||
} else {
|
} else {
|
||||||
text += item.SeriesStudio;
|
text += studio;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2565,8 +2558,8 @@
|
||||||
day += " at " + item.AirTime;
|
day += " at " + item.AirTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.SeriesStudio) {
|
if (studio) {
|
||||||
day += " on " + item.SeriesStudio;
|
day += " on " + studio;
|
||||||
}
|
}
|
||||||
|
|
||||||
return day;
|
return day;
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<div class="viewMenuBarTabs hiddenScrollX">';
|
html += '<div class="viewMenuBarTabs">';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
var viewMenuBar = document.createElement('div');
|
var viewMenuBar = document.createElement('div');
|
||||||
|
@ -140,9 +140,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require(['voice/voice'], function (voice) {
|
require(['apphost'], function (apphost) {
|
||||||
|
|
||||||
if (voice.isSupported()) {
|
if (apphost.supports('voiceinput')) {
|
||||||
header.querySelector('.headerVoiceButton').classList.remove('hide');
|
header.querySelector('.headerVoiceButton').classList.remove('hide');
|
||||||
} else {
|
} else {
|
||||||
header.querySelector('.headerVoiceButton').classList.add('hide');
|
header.querySelector('.headerVoiceButton').classList.add('hide');
|
||||||
|
@ -164,8 +164,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function showVoice() {
|
function showVoice() {
|
||||||
require(['voice/voice'], function (voice) {
|
require(['voiceDialog'], function (voiceDialog) {
|
||||||
voice.startListening();
|
voiceDialog.showDialog();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -710,22 +710,29 @@
|
||||||
|
|
||||||
if (LibraryMenu.tabType != type) {
|
if (LibraryMenu.tabType != type) {
|
||||||
|
|
||||||
require(['paper-tabs'], function () {
|
var index = 0;
|
||||||
|
|
||||||
var noInk = browserInfo.animate ? '' : ' noink';
|
viewMenuBarTabs.innerHTML = '<div class="libraryViewNav hiddenScrollX">' + builder().map(function (t) {
|
||||||
|
|
||||||
viewMenuBarTabs.innerHTML = '<paper-tabs selected="' + selectedIndex + '" hidescrollbuttons ' + noInk + '>' + builder().map(function (t) {
|
var tabClass = selectedIndex == index ? 'pageTabButton is-active' : 'pageTabButton';
|
||||||
|
|
||||||
return '<paper-tab link><a class="clearLink paperTabLink" href="' + t.href + '"><div>' + t.name + '</div></a></paper-tab>';
|
var tabHtml = '<a class="' + tabClass + '" href="' + t.href + '" data-index="' + index + '">' + t.name + '<div class="pageTabButtonSelectionBar"></div></a>';
|
||||||
|
index++;
|
||||||
|
return tabHtml;
|
||||||
|
|
||||||
}).join('') + '</paper-tabs>';
|
}).join('') + '</div>';
|
||||||
document.body.classList.add('withTallToolbar');
|
|
||||||
LibraryMenu.tabType = type;
|
document.body.classList.add('withTallToolbar');
|
||||||
});
|
LibraryMenu.tabType = type;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
viewMenuBarTabs.querySelector('paper-tabs').selected = selectedIndex;
|
var activeTab = viewMenuBarTabs.querySelector('.is-active');
|
||||||
|
var newTab = viewMenuBarTabs.querySelector('.pageTabButton[data-index="' + selectedIndex + '"]');
|
||||||
|
newTab.classList.add('is-active');
|
||||||
|
if (newTab != activeTab && activeTab) {
|
||||||
|
activeTab.classList.remove('is-active');
|
||||||
|
}
|
||||||
LibraryMenu.tabType = type;
|
LibraryMenu.tabType = type;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@
|
||||||
elems[i].addEventListener('click', onPreviousPageClick);
|
elems[i].addEventListener('click', onPreviousPageClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!items.length) {
|
if (!result.Items.length) {
|
||||||
html = '<p style="text-align:center;">' + Globalize.translate('MessageNoCollectionsAvailable') + '</p>';
|
html = '<p style="text-align:center;">' + Globalize.translate('MessageNoCollectionsAvailable') + '</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,18 +45,18 @@
|
||||||
return context.savedQueryKey;
|
return context.savedQueryKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
function reloadItems(page) {
|
function reloadItems() {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
var query = getQuery(page);
|
var query = getQuery(tabContent);
|
||||||
|
|
||||||
ApiClient.getItems(Dashboard.getCurrentUserId(), query).then(function (result) {
|
ApiClient.getItems(Dashboard.getCurrentUserId(), query).then(function (result) {
|
||||||
|
|
||||||
// Scroll back up so they can see the results from the beginning
|
// Scroll back up so they can see the results from the beginning
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
|
|
||||||
updateFilterControls(page);
|
updateFilterControls(tabContent);
|
||||||
|
|
||||||
var pagingHtml = LibraryBrowser.getQueryPagingHtml({
|
var pagingHtml = LibraryBrowser.getQueryPagingHtml({
|
||||||
startIndex: query.StartIndex,
|
startIndex: query.StartIndex,
|
||||||
|
@ -147,12 +147,12 @@
|
||||||
|
|
||||||
function onNextPageClick() {
|
function onNextPageClick() {
|
||||||
query.StartIndex += query.Limit;
|
query.StartIndex += query.Limit;
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPreviousPageClick() {
|
function onPreviousPageClick() {
|
||||||
query.StartIndex -= query.Limit;
|
query.StartIndex -= query.Limit;
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
elems = tabContent.querySelectorAll('.btnNextPage');
|
elems = tabContent.querySelectorAll('.btnNextPage');
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
elems[i].addEventListener('click', onPreviousPageClick);
|
elems[i].addEventListener('click', onPreviousPageClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!items.length) {
|
if (!result.Items.length) {
|
||||||
html = '<p style="text-align:center;">' + Globalize.translate('MessageNoTrailersFound') + '</p>';
|
html = '<p style="text-align:center;">' + Globalize.translate('MessageNoTrailersFound') + '</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
itemsContainer.innerHTML = html;
|
itemsContainer.innerHTML = html;
|
||||||
imageLoader.lazyChildren(itemsContainer);
|
imageLoader.lazyChildren(itemsContainer);
|
||||||
|
|
||||||
libraryBrowser.saveQueryValues(getSavedQueryKey(page), query);
|
libraryBrowser.saveQueryValues(getSavedQueryKey(tabContent), query);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
|
|
||||||
Events.on(filterDialog, 'filterchange', function () {
|
Events.on(filterDialog, 'filterchange', function () {
|
||||||
getQuery(tabContent).StartIndex = 0;
|
getQuery(tabContent).StartIndex = 0;
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
});
|
});
|
||||||
|
|
||||||
filterDialog.show();
|
filterDialog.show();
|
||||||
|
@ -211,7 +211,7 @@
|
||||||
var query = getQuery(tabContent);
|
var query = getQuery(tabContent);
|
||||||
query.NameStartsWithOrGreater = newValue;
|
query.NameStartsWithOrGreater = newValue;
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
});
|
});
|
||||||
|
|
||||||
self.alphaPicker = new alphaPicker({
|
self.alphaPicker = new alphaPicker({
|
||||||
|
@ -255,7 +255,7 @@
|
||||||
}],
|
}],
|
||||||
callback: function () {
|
callback: function () {
|
||||||
getQuery(tabContent).StartIndex = 0;
|
getQuery(tabContent).StartIndex = 0;
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
},
|
},
|
||||||
query: getQuery(tabContent),
|
query: getQuery(tabContent),
|
||||||
button: e.target
|
button: e.target
|
||||||
|
@ -271,7 +271,7 @@
|
||||||
|
|
||||||
self.renderTab = function () {
|
self.renderTab = function () {
|
||||||
|
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
updateFilterControls(tabContent);
|
updateFilterControls(tabContent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -187,10 +187,15 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
view.addEventListener('viewbeforeshow', function (e) {
|
view.addEventListener('viewbeforeshow', function (e) {
|
||||||
|
document.body.classList.add('hiddenViewMenuBar');
|
||||||
|
document.body.classList.add('hiddenNowPlayingBar');
|
||||||
LibraryMenu.setMenuButtonVisible(false);
|
LibraryMenu.setMenuButtonVisible(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
view.addEventListener('viewbeforehide', function (e) {
|
view.addEventListener('viewbeforehide', function (e) {
|
||||||
|
|
||||||
|
document.body.classList.remove('hiddenViewMenuBar');
|
||||||
|
document.body.classList.remove('hiddenNowPlayingBar');
|
||||||
LibraryMenu.setMenuButtonVisible(true);
|
LibraryMenu.setMenuButtonVisible(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1752,6 +1752,7 @@ var AppInfo = {};
|
||||||
visibleinviewport: embyWebComponentsBowerPath + "/visibleinviewport",
|
visibleinviewport: embyWebComponentsBowerPath + "/visibleinviewport",
|
||||||
browserdeviceprofile: embyWebComponentsBowerPath + "/browserdeviceprofile",
|
browserdeviceprofile: embyWebComponentsBowerPath + "/browserdeviceprofile",
|
||||||
browser: embyWebComponentsBowerPath + "/browser",
|
browser: embyWebComponentsBowerPath + "/browser",
|
||||||
|
inputManager: embyWebComponentsBowerPath + "/inputmanager",
|
||||||
qualityoptions: embyWebComponentsBowerPath + "/qualityoptions",
|
qualityoptions: embyWebComponentsBowerPath + "/qualityoptions",
|
||||||
connectservice: apiClientBowerPath + '/connectservice',
|
connectservice: apiClientBowerPath + '/connectservice',
|
||||||
hammer: bowerPath + "/hammerjs/hammer.min",
|
hammer: bowerPath + "/hammerjs/hammer.min",
|
||||||
|
@ -1814,6 +1815,7 @@ var AppInfo = {};
|
||||||
define("fetchHelper", [embyWebComponentsBowerPath + "/fetchhelper"], returnFirstDependency);
|
define("fetchHelper", [embyWebComponentsBowerPath + "/fetchhelper"], returnFirstDependency);
|
||||||
|
|
||||||
define("tvguide", [embyWebComponentsBowerPath + "/guide/guide", 'embyRouter'], returnFirstDependency);
|
define("tvguide", [embyWebComponentsBowerPath + "/guide/guide", 'embyRouter'], returnFirstDependency);
|
||||||
|
define("voiceDialog", [embyWebComponentsBowerPath + "/voice/voicedialog"], returnFirstDependency);
|
||||||
|
|
||||||
define("viewManager", [embyWebComponentsBowerPath + "/viewmanager/viewmanager"], function (viewManager) {
|
define("viewManager", [embyWebComponentsBowerPath + "/viewmanager/viewmanager"], function (viewManager) {
|
||||||
window.ViewManager = viewManager;
|
window.ViewManager = viewManager;
|
||||||
|
@ -1879,7 +1881,6 @@ var AppInfo = {};
|
||||||
define("emby-icons", ['webcomponentsjs', "html!" + bowerPath + "/emby-icons/emby-icons.html"]);
|
define("emby-icons", ['webcomponentsjs', "html!" + bowerPath + "/emby-icons/emby-icons.html"]);
|
||||||
|
|
||||||
define("paper-spinner", ['webcomponentsjs', "html!" + bowerPath + "/paper-spinner/paper-spinner.html"]);
|
define("paper-spinner", ['webcomponentsjs', "html!" + bowerPath + "/paper-spinner/paper-spinner.html"]);
|
||||||
define("paper-tabs", ['webcomponentsjs', "html!" + bowerPath + "/paper-tabs/paper-tabs.html"]);
|
|
||||||
define("paper-button", ["html!" + bowerPath + "/paper-button/paper-button.html"]);
|
define("paper-button", ["html!" + bowerPath + "/paper-button/paper-button.html"]);
|
||||||
define("paper-icon-button", ["html!" + bowerPath + "/paper-icon-button/paper-icon-button.html"]);
|
define("paper-icon-button", ["html!" + bowerPath + "/paper-icon-button/paper-icon-button.html"]);
|
||||||
define("paper-radio-group", ["html!" + bowerPath + "/paper-radio-group/paper-radio-group.html"]);
|
define("paper-radio-group", ["html!" + bowerPath + "/paper-radio-group/paper-radio-group.html"]);
|
||||||
|
@ -1922,7 +1923,6 @@ var AppInfo = {};
|
||||||
|
|
||||||
define("jqmpanel", ['jqmbase', "thirdparty/jquerymobile-1.4.5/jqm.panel", 'css!thirdparty/jquerymobile-1.4.5/jqm.panel.css']);
|
define("jqmpanel", ['jqmbase', "thirdparty/jquerymobile-1.4.5/jqm.panel", 'css!thirdparty/jquerymobile-1.4.5/jqm.panel.css']);
|
||||||
|
|
||||||
define("iron-icon-set", ["html!" + bowerPath + "/iron-icon/iron-icon.html", "html!" + bowerPath + "/iron-iconset-svg/iron-iconset-svg.html"]);
|
|
||||||
define("slideshow", [embyWebComponentsBowerPath + "/slideshow/slideshow"], returnFirstDependency);
|
define("slideshow", [embyWebComponentsBowerPath + "/slideshow/slideshow"], returnFirstDependency);
|
||||||
|
|
||||||
define('fetch', [bowerPath + '/fetch/fetch']);
|
define('fetch', [bowerPath + '/fetch/fetch']);
|
||||||
|
@ -2008,16 +2008,6 @@ var AppInfo = {};
|
||||||
return Emby.Page;
|
return Emby.Page;
|
||||||
});
|
});
|
||||||
|
|
||||||
// mock this for now. not used in this app
|
|
||||||
define("inputManager", [], function () {
|
|
||||||
return {
|
|
||||||
on: function () {
|
|
||||||
},
|
|
||||||
off: function () {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
// mock this for now. not used in this app
|
// mock this for now. not used in this app
|
||||||
define("playbackManager", [], function () {
|
define("playbackManager", [], function () {
|
||||||
return {
|
return {
|
||||||
|
@ -2083,6 +2073,22 @@ var AppInfo = {};
|
||||||
Dashboard.navigate('mypreferencesmenu.html?userId=' + ApiClient.getCurrentUserId());
|
Dashboard.navigate('mypreferencesmenu.html?userId=' + ApiClient.getCurrentUserId());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
embyRouter.showGuide = function () {
|
||||||
|
Dashboard.navigate('livetv.html?tab=1');
|
||||||
|
};
|
||||||
|
|
||||||
|
embyRouter.showLiveTV = function () {
|
||||||
|
Dashboard.navigate('livetv.html');
|
||||||
|
};
|
||||||
|
|
||||||
|
embyRouter.showRecordedTV = function () {
|
||||||
|
Dashboard.navigate('livetv.html?tab=3');
|
||||||
|
};
|
||||||
|
|
||||||
|
embyRouter.showFavorites = function () {
|
||||||
|
Dashboard.navigate('home.html?tab=3');
|
||||||
|
};
|
||||||
|
|
||||||
function showItem(item) {
|
function showItem(item) {
|
||||||
if (typeof (item) === 'string') {
|
if (typeof (item) === 'string') {
|
||||||
require(['connectionManager'], function (connectionManager) {
|
require(['connectionManager'], function (connectionManager) {
|
||||||
|
@ -2406,7 +2412,7 @@ var AppInfo = {};
|
||||||
|
|
||||||
defineRoute({
|
defineRoute({
|
||||||
path: '/dashboardgeneral.html',
|
path: '/dashboardgeneral.html',
|
||||||
dependencies: ['emby-collapsible', 'paper-textarea', 'paper-input', 'paper-checkbox'],
|
dependencies: ['emby-collapsible', 'paper-textarea', 'paper-input', 'paper-checkbox', 'jqmlistview'],
|
||||||
controller: 'scripts/dashboardgeneral',
|
controller: 'scripts/dashboardgeneral',
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
roles: 'admin'
|
roles: 'admin'
|
||||||
|
@ -2595,7 +2601,7 @@ var AppInfo = {};
|
||||||
|
|
||||||
defineRoute({
|
defineRoute({
|
||||||
path: '/librarysettings.html',
|
path: '/librarysettings.html',
|
||||||
dependencies: ['emby-collapsible', 'paper-input', 'paper-checkbox', 'emby-button'],
|
dependencies: ['emby-collapsible', 'paper-input', 'paper-checkbox', 'emby-button', 'jqmlistview'],
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
roles: 'admin',
|
roles: 'admin',
|
||||||
controller: 'scripts/librarysettings'
|
controller: 'scripts/librarysettings'
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
Limit: 100,
|
Limit: 100,
|
||||||
StartIndex: 0,
|
StartIndex: 0,
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
EnableImageTypes: "Primary"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['fetchHelper', 'jQuery'], function (fetchHelper, $) {
|
define(['fetchHelper', 'jQuery', 'registrationservices'], function (fetchHelper, $, registrationServices) {
|
||||||
|
|
||||||
function load(page) {
|
function load(page) {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
@ -158,6 +158,13 @@
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSupporterLinkClick(e) {
|
||||||
|
|
||||||
|
registrationServices.showPremiereInfo();
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', "#supporterKeyPage", function () {
|
$(document).on('pageinit', "#supporterKeyPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
@ -165,7 +172,9 @@
|
||||||
$('#lostKeyForm', this).on('submit', retrieveSupporterKey);
|
$('#lostKeyForm', this).on('submit', retrieveSupporterKey);
|
||||||
$('#linkKeysForm', this).on('submit', SupporterKeyPage.linkSupporterKeys);
|
$('#linkKeysForm', this).on('submit', SupporterKeyPage.linkSupporterKeys);
|
||||||
|
|
||||||
$('.benefits', page).html(Globalize.translate('HeaderSupporterBenefit', '<a href="http://emby.media/premiere" target="_blank">', '</a>'));
|
page.querySelector('.benefits').innerHTML = Globalize.translate('HeaderSupporterBenefit', '<a class="lnkPremiere" href="http://emby.media/premiere" target="_blank">', '</a>');
|
||||||
|
|
||||||
|
page.querySelector('.lnkPremiere').addEventListener('click', onSupporterLinkClick);
|
||||||
|
|
||||||
}).on('pageshow', "#supporterKeyPage", function () {
|
}).on('pageshow', "#supporterKeyPage", function () {
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||||
ParentId: parentId,
|
ParentId: parentId,
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
EnableImageTypes: "Primary,Backdrop,Thumb"
|
||||||
};
|
};
|
||||||
|
|
||||||
return ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options));
|
return ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options));
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo",
|
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo",
|
||||||
UserId: Dashboard.getCurrentUserId(),
|
UserId: Dashboard.getCurrentUserId(),
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
EnableImageTypes: "Primary,Backdrop,Thumb"
|
||||||
};
|
};
|
||||||
|
|
||||||
query.ParentId = LibraryMenu.getTopParentId();
|
query.ParentId = LibraryMenu.getTopParentId();
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
ExcludeLocationTypes: "Virtual",
|
ExcludeLocationTypes: "Virtual",
|
||||||
ParentId: parentId,
|
ParentId: parentId,
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
EnableImageTypes: "Primary,Backdrop,Thumb",
|
||||||
EnableTotalRecordCount: false
|
EnableTotalRecordCount: false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
var query = {
|
var query = {
|
||||||
|
|
||||||
Limit: 40,
|
Limit: 40,
|
||||||
Fields: "AirTime,UserData,SeriesStudio,SyncInfo",
|
Fields: "AirTime,UserData,SyncInfo",
|
||||||
UserId: Dashboard.getCurrentUserId(),
|
UserId: Dashboard.getCurrentUserId(),
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
||||||
|
@ -112,7 +112,6 @@
|
||||||
showLocationTypeIndicator: false,
|
showLocationTypeIndicator: false,
|
||||||
shape: getThumbShape(),
|
shape: getThumbShape(),
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
showPremiereDate: true,
|
|
||||||
preferThumb: true,
|
preferThumb: true,
|
||||||
lazy: true,
|
lazy: true,
|
||||||
showDetailsMenu: true,
|
showDetailsMenu: true,
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
view.querySelector('.fldSelectEncoderPathType').classList.remove('hide');
|
view.querySelector('.fldSelectEncoderPathType').classList.remove('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (systemInfo.OperatingSystem == 'Windows' && systemInfo.SystemArchitecture != 'Arm') {
|
/*if (systemInfo.OperatingSystem == 'Windows' && systemInfo.SystemArchitecture != 'Arm') {
|
||||||
|
|
||||||
view.querySelector('.suggestedLocation').innerHTML = Globalize.translate('FFmpegSuggestedDownload', '<a target="_blank" href="https://ffmpeg.zeranoe.com/builds">https://ffmpeg.zeranoe.com</a>');
|
view.querySelector('.suggestedLocation').innerHTML = Globalize.translate('FFmpegSuggestedDownload', '<a target="_blank" href="https://ffmpeg.zeranoe.com/builds">https://ffmpeg.zeranoe.com</a>');
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
instructions = 'Download FFmpeg 64-Bit Static';
|
instructions = 'Download FFmpeg 64-Bit Static';
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (systemInfo.OperatingSystem == 'Linux' && systemInfo.SystemArchitecture != 'Arm') {
|
} else*/ if (systemInfo.OperatingSystem == 'Linux' && systemInfo.SystemArchitecture != 'Arm') {
|
||||||
|
|
||||||
view.querySelector('.suggestedLocation').innerHTML = Globalize.translate('FFmpegSuggestedDownload', '<a target="_blank" href="http://johnvansickle.com/ffmpeg">http://johnvansickle.com/ffmpeg</a>');
|
view.querySelector('.suggestedLocation').innerHTML = Globalize.translate('FFmpegSuggestedDownload', '<a target="_blank" href="http://johnvansickle.com/ffmpeg">http://johnvansickle.com/ffmpeg</a>');
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
instance.init();
|
instance.init();
|
||||||
guideController = instance;
|
guideController = instance;
|
||||||
|
|
||||||
$(guideController).on('submitted', skip);
|
Events.on(guideController, 'submitted', skip);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,38 @@
|
||||||
<div id="searchPage" data-role="page" class="page libraryPage allLibraryPage noSecondaryNavPage" data-title="${ButtonSearch}" data-backbutton="true">
|
<div id="searchPage" data-role="page" class="page libraryPage allLibraryPage noSecondaryNavPage" data-title="${ButtonSearch}" data-backbutton="true" style="padding-top:0!important;">
|
||||||
|
|
||||||
<button is="paper-icon-button-light" style="position: absolute; top: .5em; left: .5em; z-index: 1;" tabindex="-1" class="btnBack autoSize">
|
<style>
|
||||||
|
@media all and (max-width: 800px) {
|
||||||
|
|
||||||
|
.txtSearch {
|
||||||
|
text-indent: 7.5%;
|
||||||
|
padding-bottom: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (max-width: 650px) {
|
||||||
|
|
||||||
|
.txtSearch {
|
||||||
|
text-indent: 10%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (max-width: 500px) {
|
||||||
|
|
||||||
|
.txtSearch {
|
||||||
|
text-indent: 12.5%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<button is="paper-icon-button-light" style="position: absolute; top: .6em; left: 0; z-index: 1;" tabindex="-1" class="btnBack autoSize">
|
||||||
<i class="md-icon">arrow_back</i>
|
<i class="md-icon">arrow_back</i>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content" style="padding-top:0!important;padding-left:0!important;padding-right:0!important;">
|
||||||
<div class="readOnlyContent" style="text-align: center;margin: 0 auto;">
|
<div class="readOnlyContent" style="text-align: center;margin: 0 auto;">
|
||||||
|
|
||||||
<div class="inputContainer" style="margin-bottom:1em;">
|
<div class="inputContainer searchInputContainer" style="margin-bottom:1em;">
|
||||||
<div style="display: flex; align-items: center;">
|
<input is="emby-input" class="txtSearch" autocomplete="off" placeholder="${ButtonSearch}" autofocus />
|
||||||
<i class="md-icon" style="width:28px;height:28px;font-size:28px;color:#aaa;">search</i>
|
|
||||||
<div style="flex-grow:1;">
|
|
||||||
<input is="emby-input" class="txtSearch" autocomplete="off" autofocus />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="textSuggestions hide">
|
<div class="textSuggestions hide">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="supporterKeyPage" data-role="page" class="page type-interior withTabs" data-require="jqmcollapsible,scripts/supporterkeypage,emby-input,emby-button">
|
<div id="supporterKeyPage" data-role="page" class="page type-interior withTabs" data-require="emby-collapse,scripts/supporterkeypage,emby-input,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
@ -48,9 +48,8 @@
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
<div data-role="collapsible">
|
<div is="emby-collapse" title="${HeaderForgotKey}">
|
||||||
<h3>${HeaderForgotKey}</h3>
|
<div class="collapseContent">
|
||||||
<div>
|
|
||||||
<form id="lostKeyForm">
|
<form id="lostKeyForm">
|
||||||
<div style="margin: 1em 0;" class="inputContainer">
|
<div style="margin: 1em 0;" class="inputContainer">
|
||||||
<input is="emby-input" type="email" required id="txtEmail" label="${LabelEmailAddress}" />
|
<input is="emby-input" type="email" required id="txtEmail" label="${LabelEmailAddress}" />
|
||||||
|
@ -63,10 +62,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-role="collapsible">
|
<div is="emby-collapse" title="${HeaderMultipleKeyLinking}">
|
||||||
<h3>${HeaderMultipleKeyLinking}</h3>
|
<div class="collapseContent">
|
||||||
<div>
|
|
||||||
|
|
||||||
<form id="linkKeysForm">
|
<form id="linkKeysForm">
|
||||||
<p>
|
<p>
|
||||||
${MultipleKeyLinkingHelp}
|
${MultipleKeyLinkingHelp}
|
||||||
|
|
|
@ -23,7 +23,7 @@ paper-button[raised].more {
|
||||||
border-right-color: #cc3333 !important;
|
border-right-color: #cc3333 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
paper-tabs #selectionBar, .playedIndicator {
|
.playedIndicator {
|
||||||
background-color: #cc3333 !important;
|
background-color: #cc3333 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
19
dashboard-ui/thirdparty/paper-button-style.css
vendored
19
dashboard-ui/thirdparty/paper-button-style.css
vendored
|
@ -157,25 +157,6 @@ paper-icon-button paper-ripple {
|
||||||
color: #444 !important;
|
color: #444 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
paper-tabs {
|
|
||||||
background-color: #020202;
|
|
||||||
color: #fff;
|
|
||||||
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
paper-tab {
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
paper-tabs #selectionBar {
|
|
||||||
background-color: #52B54B !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
paper-tabs paper-ripple {
|
|
||||||
color: #52B54B !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
paper-fab {
|
paper-fab {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
display: inline-flex !important;
|
display: inline-flex !important;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="editUserPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="scripts/useredit,emby-input,paper-checkbox,emby-button">
|
<div id="editUserPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="jqmlistview,scripts/useredit,emby-input,paper-checkbox,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="userLibraryAccessPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="scripts/userlibraryaccess,paper-checkbox,emby-button">
|
<div id="userLibraryAccessPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="jqmlistview,scripts/userlibraryaccess,paper-checkbox,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="newUserPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="scripts/usernew,emby-input,paper-checkbox,emby-button">
|
<div id="newUserPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="jqmlistview,scripts/usernew,emby-input,paper-checkbox,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="userParentalControlPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="jqmpopup,scripts/userparentalcontrol,paper-checkbox,emby-button">
|
<div id="userParentalControlPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="jqmlistview,jqmpopup,scripts/userparentalcontrol,paper-checkbox,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
|
|
||||||
return function (result) {
|
|
||||||
result.success = true;
|
|
||||||
if (result.properties.devicename)
|
|
||||||
MediaController.trySetActiveDeviceName(result.properties.devicename);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,16 +0,0 @@
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
|
|
||||||
return function (result) {
|
|
||||||
result.success = true;
|
|
||||||
switch (result.item.deviceid) {
|
|
||||||
case 'displaymirroring':
|
|
||||||
MediaController.enableDisplayMirroring(false);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
result.success = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,93 +0,0 @@
|
||||||
|
|
||||||
define([], function () {
|
|
||||||
|
|
||||||
return function (result) {
|
|
||||||
result.success = true;
|
|
||||||
switch (result.item.sourceid) {
|
|
||||||
case 'music':
|
|
||||||
Dashboard.navigate('music.html');
|
|
||||||
break;
|
|
||||||
case 'movies':
|
|
||||||
if (result.properties.movieName) {
|
|
||||||
//TODO: Find a way to display movie
|
|
||||||
var query = {
|
|
||||||
|
|
||||||
Limit: 1,
|
|
||||||
UserId: result.userId,
|
|
||||||
ExcludeLocationTypes: "Virtual"
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
if (result.item.itemType) {
|
|
||||||
query.IncludeItemTypes = result.item.itemType;
|
|
||||||
}
|
|
||||||
|
|
||||||
query.SearchTerm = result.properties.movieName;
|
|
||||||
|
|
||||||
ApiClient.getItems(Dashboard.getCurrentUserId(), query).then(function (queryResult) {
|
|
||||||
|
|
||||||
var s = queryResult[0];
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Dashboard.navigate('movies.html');
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 'tvseries':
|
|
||||||
Dashboard.navigate('tv.html');
|
|
||||||
break;
|
|
||||||
case 'livetv':
|
|
||||||
var act = result.item.menuid;
|
|
||||||
if (act) {
|
|
||||||
if (act.indexOf('livetv') != -1)
|
|
||||||
Dashboard.navigate('livetv.html?tab=0');
|
|
||||||
else if (act.indexOf('guide') != -1)
|
|
||||||
Dashboard.navigate('livetv.html?tab=1');
|
|
||||||
else if (act.indexOf('channels') != -1)
|
|
||||||
Dashboard.navigate('livetv.html?tab=2');
|
|
||||||
else if (act.indexOf('recordings') != -1)
|
|
||||||
Dashboard.navigate('livetv.html?tab=3');
|
|
||||||
else if (act.indexOf('scheduled') != -1)
|
|
||||||
Dashboard.navigate('livetv.html?tab=4');
|
|
||||||
else if (act.indexOf('series') != -1)
|
|
||||||
Dashboard.navigate('livetv.html?tab=5');
|
|
||||||
else
|
|
||||||
Dashboard.navigate('livetv.html?tab=0');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Dashboard.navigate('livetv.html?tab=0');
|
|
||||||
break;
|
|
||||||
case 'recordings':
|
|
||||||
Dashboard.navigate('livetv.html?tab=3');
|
|
||||||
break;
|
|
||||||
case 'latestepisodes':
|
|
||||||
Dashboard.navigate('tv.html?tab=1');
|
|
||||||
case 'home':
|
|
||||||
var act = result.item.menuid;
|
|
||||||
if (act) {
|
|
||||||
if (act.indexOf('home') != -1)
|
|
||||||
Dashboard.navigate('index.html');
|
|
||||||
else if (act.indexOf('nextup') != -1)
|
|
||||||
Dashboard.navigate('index.html?tab=2');
|
|
||||||
else if (act.indexOf('favorites') != -1)
|
|
||||||
Dashboard.navigate('index.html?tab=2');
|
|
||||||
else if (act.indexOf('upcoming') != -1)
|
|
||||||
Dashboard.navigate('index.html?tab=3');
|
|
||||||
else if (act.indexOf('nowplaying') != -1)
|
|
||||||
Dashboard.navigate('nowplaying.html');
|
|
||||||
else
|
|
||||||
Dashboard.navigate('index.html');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Dashboard.navigate('index.html');
|
|
||||||
case 'group':
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
result.success = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,28 +0,0 @@
|
||||||
define([], function () {
|
|
||||||
|
|
||||||
return {
|
|
||||||
|
|
||||||
isSupported: function () {
|
|
||||||
|
|
||||||
if (AppInfo.isNativeApp) {
|
|
||||||
// Crashes on some amazon devices
|
|
||||||
if (window.device && (device.platform || '').toLowerCase().indexOf('amazon') != -1) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return window.SpeechRecognition ||
|
|
||||||
window.webkitSpeechRecognition ||
|
|
||||||
window.mozSpeechRecognition ||
|
|
||||||
window.oSpeechRecognition ||
|
|
||||||
window.msSpeechRecognition;
|
|
||||||
},
|
|
||||||
|
|
||||||
startListening: function () {
|
|
||||||
require(['voice/voicedialog'], function (voicedialog) {
|
|
||||||
voicedialog.startListening();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
});
|
|
|
@ -1,332 +0,0 @@
|
||||||
define(['dialogHelper', 'jQuery', 'emby-button'], function (dialogHelper, $) {
|
|
||||||
|
|
||||||
var currentRecognition;
|
|
||||||
var lang = 'en-US';
|
|
||||||
|
|
||||||
var commandgroups;
|
|
||||||
|
|
||||||
function getCommandGroups() {
|
|
||||||
|
|
||||||
if (commandgroups) {
|
|
||||||
return Promise.resolve(commandgroups);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
|
|
||||||
var file = "grammar";
|
|
||||||
//if (language && language.length > 0)
|
|
||||||
// file = language;
|
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.open('GET', "voice/grammar/" + file + ".json", true);
|
|
||||||
|
|
||||||
xhr.onload = function (e) {
|
|
||||||
|
|
||||||
commandgroups = JSON.parse(this.response);
|
|
||||||
resolve(commandgroups);
|
|
||||||
}
|
|
||||||
|
|
||||||
xhr.onerror = reject;
|
|
||||||
|
|
||||||
xhr.send();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Shuffle array. </summary>
|
|
||||||
/// <param name="array"> The array. </param>
|
|
||||||
/// <returns> array </returns>
|
|
||||||
function shuffleArray(array) {
|
|
||||||
var currentIndex = array.length, temporaryValue, randomIndex;
|
|
||||||
|
|
||||||
// While there remain elements to shuffle...
|
|
||||||
while (0 !== currentIndex) {
|
|
||||||
|
|
||||||
// Pick a remaining element...
|
|
||||||
randomIndex = Math.floor(Math.random() * currentIndex);
|
|
||||||
currentIndex -= 1;
|
|
||||||
|
|
||||||
// And swap it with the current element.
|
|
||||||
temporaryValue = array[currentIndex];
|
|
||||||
array[currentIndex] = array[randomIndex];
|
|
||||||
array[randomIndex] = temporaryValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Gets sample commands. </summary>
|
|
||||||
/// <returns> The sample commands. </returns>
|
|
||||||
function getSampleCommands(groupid) {
|
|
||||||
|
|
||||||
return getCommandGroups().then(function (commandGroups) {
|
|
||||||
groupid = typeof (groupid) !== 'undefined' ? groupid : '';
|
|
||||||
|
|
||||||
var commands = [];
|
|
||||||
commandGroups.map(function (group) {
|
|
||||||
if ((group.items && group.items.length > 0) && (groupid == group.groupid || groupid == '')) {
|
|
||||||
|
|
||||||
group.items.map(function (item) {
|
|
||||||
|
|
||||||
if (item.commandtemplates && item.commandtemplates.length > 0) {
|
|
||||||
|
|
||||||
item.commandtemplates.map(function (templates) {
|
|
||||||
commands.push(templates);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return shuffleArray(commands);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Gets command group. </summary>
|
|
||||||
/// <param name="groupid"> The groupid. </param>
|
|
||||||
/// <returns> The command group. </returns>
|
|
||||||
function getCommandGroup(groupid) {
|
|
||||||
if (commandgroups) {
|
|
||||||
var idx = -1;
|
|
||||||
idx = commandgroups.map(function (e) { return e.groupid; }).indexOf(groupid);
|
|
||||||
|
|
||||||
if (idx > -1)
|
|
||||||
return commandgroups[idx];
|
|
||||||
else
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Renders the sample commands. </summary>
|
|
||||||
/// <param name="elem"> The element. </param>
|
|
||||||
/// <param name="commands"> The commands. </param>
|
|
||||||
/// <returns> . </returns>
|
|
||||||
function renderSampleCommands(elem, commands) {
|
|
||||||
|
|
||||||
commands.length = Math.min(commands.length, 4);
|
|
||||||
|
|
||||||
commands = commands.map(function (c) {
|
|
||||||
|
|
||||||
return '<div class="exampleCommand"><span class="exampleCommandText">"' + c + '"</span></div>';
|
|
||||||
|
|
||||||
}).join('');
|
|
||||||
|
|
||||||
$('.exampleCommands', elem).html(commands);
|
|
||||||
}
|
|
||||||
|
|
||||||
var currentDialog;
|
|
||||||
/// <summary> Shows the voice help. </summary>
|
|
||||||
/// <returns> . </returns>
|
|
||||||
function showVoiceHelp(groupid, title) {
|
|
||||||
|
|
||||||
var dlg = dialogHelper.createDialog({
|
|
||||||
size: 'medium',
|
|
||||||
removeOnClose: true
|
|
||||||
});
|
|
||||||
|
|
||||||
dlg.classList.add('ui-body-b');
|
|
||||||
dlg.classList.add('background-theme-b');
|
|
||||||
|
|
||||||
var html = '';
|
|
||||||
html += '<h2 class="dialogHeader">';
|
|
||||||
html += '<paper-fab icon="arrow-back" mini class="btnCancelVoiceInput"></paper-fab>';
|
|
||||||
if (groupid) {
|
|
||||||
var grp = getCommandGroup(groupid);
|
|
||||||
if (grp)
|
|
||||||
html += ' ' + grp.name;
|
|
||||||
}
|
|
||||||
html += '</h2>';
|
|
||||||
|
|
||||||
html += '<div>';
|
|
||||||
|
|
||||||
var getCommandsPromise = getSampleCommands(groupid);
|
|
||||||
|
|
||||||
html += '<div class="voiceHelpContent">';
|
|
||||||
|
|
||||||
html += '<div class="defaultVoiceHelp">';
|
|
||||||
|
|
||||||
html += '<h1 style="margin-bottom:1.25em;">' + Globalize.translate('HeaderSaySomethingLike') + '</h1>';
|
|
||||||
|
|
||||||
html += '<div class="exampleCommands">';
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
// defaultVoiceHelp
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
html += '<div class="unrecognizedCommand" style="display:none;">';
|
|
||||||
html += '<h1>' + Globalize.translate('HeaderYouSaid') + '</h1>';
|
|
||||||
html += '<p class="exampleCommand voiceInputContainer"><i class="fa fa-quote-left"></i><span class="voiceInputText exampleCommandText"></span><i class="fa fa-quote-right"></i></p>';
|
|
||||||
html += '<p>' + Globalize.translate('MessageWeDidntRecognizeCommand') + '</p>';
|
|
||||||
|
|
||||||
html += '<br/>';
|
|
||||||
html += '<button is="emby-button" type="button" class="raised submit block btnRetry"><iron-icon icon="mic"></iron-icon><span>' + Globalize.translate('ButtonTryAgain') + '</span></button>';
|
|
||||||
html += '<p class="blockedMessage" style="display:none;">' + Globalize.translate('MessageIfYouBlockedVoice') + '<br/><br/></p>';
|
|
||||||
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
html += '<button is="emby-button" type="button" class="raised block btnCancelVoiceInput" style="background-color:#444;"><iron-icon icon="close"></iron-icon><span>' + Globalize.translate('ButtonCancel') + '</span></button>';
|
|
||||||
|
|
||||||
// voiceHelpContent
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
dlg.innerHTML = html;
|
|
||||||
document.body.appendChild(dlg);
|
|
||||||
|
|
||||||
dialogHelper.open(dlg);
|
|
||||||
currentDialog = dlg;
|
|
||||||
|
|
||||||
dlg.addEventListener('close', function () {
|
|
||||||
currentDialog = null;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.btnCancelVoiceInput', dlg).on('click', function () {
|
|
||||||
destroyCurrentRecognition();
|
|
||||||
dialogHelper.close(dlg);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.btnRetry', dlg).on('click', function () {
|
|
||||||
$('.unrecognizedCommand').hide();
|
|
||||||
$('.defaultVoiceHelp').show();
|
|
||||||
startListening(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
getCommandsPromise.then(function (commands) {
|
|
||||||
renderSampleCommands(dlg.querySelector('.voiceHelpContent'), commands);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Hides the voice help. </summary>
|
|
||||||
/// <returns> . </returns>
|
|
||||||
function hideVoiceHelp() {
|
|
||||||
|
|
||||||
$('.voiceInputHelp').remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Shows the unrecognized command help. </summary>
|
|
||||||
/// <returns> . </returns>
|
|
||||||
function showUnrecognizedCommandHelp() {
|
|
||||||
//speak("I don't understend this command");
|
|
||||||
$('.unrecognizedCommand').show();
|
|
||||||
$('.defaultVoiceHelp').hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Process the transcript described by text. </summary>
|
|
||||||
/// <param name="text"> The text. </param>
|
|
||||||
/// <returns> . </returns>
|
|
||||||
function processTranscript(text, isCancelled) {
|
|
||||||
|
|
||||||
$('.voiceInputText').html(text);
|
|
||||||
|
|
||||||
if (text || AppInfo.isNativeApp) {
|
|
||||||
$('.blockedMessage').hide();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('.blockedMessage').show();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (text) {
|
|
||||||
require(['voice/voicecommands.js', 'voice/grammarprocessor.js'], function (voicecommands, grammarprocessor) {
|
|
||||||
|
|
||||||
var processor = grammarprocessor(commandgroups, text);
|
|
||||||
if (processor && processor.command) {
|
|
||||||
voicecommands(processor)
|
|
||||||
.then(function (result) {
|
|
||||||
if (result.item.actionid === 'show' && result.item.sourceid === 'group') {
|
|
||||||
var dlg = currentDialog;
|
|
||||||
if (dlg)
|
|
||||||
showCommands(false, result)
|
|
||||||
else
|
|
||||||
showCommands(true, result)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(showUnrecognizedCommandHelp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
showUnrecognizedCommandHelp();
|
|
||||||
|
|
||||||
var dlg = currentDialog;
|
|
||||||
if (dlg) {
|
|
||||||
dialogHelper.close(dlg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (!isCancelled) {
|
|
||||||
showUnrecognizedCommandHelp();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Starts listening internal. </summary>
|
|
||||||
/// <returns> . </returns>
|
|
||||||
function startListening(createUI) {
|
|
||||||
|
|
||||||
destroyCurrentRecognition();
|
|
||||||
var recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition || window.mozSpeechRecognition || window.oSpeechRecognition || window.msSpeechRecognition)();
|
|
||||||
recognition.lang = lang;
|
|
||||||
var groupid = '';
|
|
||||||
//recognition.continuous = true;
|
|
||||||
//recognition.interimResults = true;
|
|
||||||
|
|
||||||
recognition.onresult = function (event) {
|
|
||||||
if (event.results.length > 0) {
|
|
||||||
processTranscript(event.results[0][0].transcript || '');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
recognition.onerror = function () {
|
|
||||||
processTranscript('', recognition.cancelled);
|
|
||||||
};
|
|
||||||
|
|
||||||
recognition.onnomatch = function () {
|
|
||||||
processTranscript('', recognition.cancelled);
|
|
||||||
};
|
|
||||||
|
|
||||||
recognition.start();
|
|
||||||
currentRecognition = recognition;
|
|
||||||
showCommands(createUI);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Destroys the current recognition. </summary>
|
|
||||||
/// <returns> . </returns>
|
|
||||||
function destroyCurrentRecognition() {
|
|
||||||
|
|
||||||
var recognition = currentRecognition;
|
|
||||||
if (recognition) {
|
|
||||||
recognition.abort();
|
|
||||||
currentRecognition = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Cancel listener. </summary>
|
|
||||||
/// <returns> . </returns>
|
|
||||||
function cancelListener() {
|
|
||||||
|
|
||||||
destroyCurrentRecognition();
|
|
||||||
hideVoiceHelp();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> Shows the commands. </summary>
|
|
||||||
/// <param name="createUI"> The create user interface. </param>
|
|
||||||
/// <returns> . </returns>
|
|
||||||
function showCommands(createUI, result) {
|
|
||||||
if (createUI !== false) {
|
|
||||||
//speak('Hello, what can I do for you?');
|
|
||||||
require(['paper-fab', 'css!voice/voice.css'], function () {
|
|
||||||
if (result)
|
|
||||||
showVoiceHelp(result.groupid, result.name);
|
|
||||||
else
|
|
||||||
showVoiceHelp();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary> An enum constant representing the window. voice input manager option. </summary>
|
|
||||||
return {
|
|
||||||
startListening: startListening
|
|
||||||
};
|
|
||||||
|
|
||||||
});
|
|
|
@ -16,6 +16,7 @@
|
||||||
<label for="selectType" class="selectLabel">${LabelDataProvider}</label>
|
<label for="selectType" class="selectLabel">${LabelDataProvider}</label>
|
||||||
<select id="selectType" data-mini="true" required="required">
|
<select id="selectType" data-mini="true" required="required">
|
||||||
<option value="SchedulesDirect">Schedules Direct</option>
|
<option value="SchedulesDirect">Schedules Direct</option>
|
||||||
|
<option value="xmltv">Xml TV</option>
|
||||||
</select>
|
</select>
|
||||||
<div class="fieldDescription">${AdditionalLiveTvProvidersCanBeInstalledLater}</div>
|
<div class="fieldDescription">${AdditionalLiveTvProvidersCanBeInstalledLater}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue