Merge pull request #2098 from MediaBrowser/dev

Dev
This commit is contained in:
Luke 2016-08-25 01:24:44 -04:00 committed by GitHub
commit b6f5064969
28 changed files with 231 additions and 131 deletions

View file

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.183",
"_release": "1.4.183",
"version": "1.4.186",
"_release": "1.4.186",
"_resolution": {
"type": "version",
"tag": "1.4.183",
"commit": "0548902d94131fb45ba17c421186014b0bed5e18"
"tag": "1.4.186",
"commit": "58f6ba7c53f72e861456632e6c278b6d9da2bf9b"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",

View file

@ -702,11 +702,11 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
return html;
}
function getCardFooterText(item, options, showTitle, forceName, imgUrl, footerClass, progressHtml, isOuterFooter) {
function getCardFooterText(item, options, showTitle, forceName, overlayText, imgUrl, footerClass, progressHtml, isOuterFooter) {
var html = '';
var showOtherText = isOuterFooter ? !options.overlayText : options.overlayText;
var showOtherText = isOuterFooter ? !overlayText : overlayText;
if (isOuterFooter && options.cardLayout && !layoutManager.tv) {
var moreIcon = appHost.moreIcon == 'dots-horiz' ? '' : '';
@ -719,7 +719,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
if (showOtherText) {
var parentTitleUnderneath = item.Type == 'MusicAlbum' || item.Type == 'Audio' || item.Type == 'MusicVideo';
if (options.showParentTitle && !parentTitleUnderneath) {
if ((options.showParentTitle || options.showParentTitleOrTitle) && !parentTitleUnderneath) {
if (isOuterFooter && item.Type == 'Episode' && item.SeriesName && item.SeriesId) {
@ -732,12 +732,16 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
}
else {
lines.push(item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || item.GameSystem || ""));
var parentTitle = item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || item.GameSystem || "");
if (parentTitle || options.showParentTitle) {
lines.push(parentTitle);
}
}
}
}
if (showTitle) {
if (showTitle || forceName || (options.showParentTitleOrTitle && !lines.length)) {
var name = options.showTitle == 'auto' && !item.IsFolder && item.MediaType == 'Photo' ? '' : itemHelper.getDisplayName(item);
@ -834,7 +838,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
lines.push(airTimeText || '');
}
if (item.Type == 'TvChannel') {
if (options.showCurrentProgram && item.Type == 'TvChannel') {
if (item.CurrentProgram) {
lines.push(itemHelper.getDisplayName(item.CurrentProgram));
@ -869,7 +873,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
}
}
if (showTitle && forceName && lines.length == 1) {
if (showTitle && forceName && overlayText && lines.length == 1) {
lines = [];
}
@ -1022,7 +1026,6 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
var overlayText = options.overlayText;
if (forceName && !options.cardLayout) {
showTitle = imgUrl;
if (overlayText == null) {
overlayText = true;
@ -1061,7 +1064,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
if (overlayText) {
footerCssClass = progressHtml ? 'innerCardFooter fullInnerCardFooter' : 'innerCardFooter';
innerCardFooter += getCardFooterText(item, options, showTitle, forceName, imgUrl, footerCssClass, progressHtml, false);
innerCardFooter += getCardFooterText(item, options, showTitle, forceName, overlayText, imgUrl, footerCssClass, progressHtml, false);
footerOverlayed = true;
}
else if (progressHtml) {
@ -1080,7 +1083,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
var outerCardFooter = '';
if (!overlayText && !footerOverlayed) {
footerCssClass = options.cardLayout ? 'cardFooter visualCardBox-cardFooter' : 'cardFooter transparent';
outerCardFooter = getCardFooterText(item, options, showTitle, forceName, imgUrl, footerCssClass, progressHtml, true);
outerCardFooter = getCardFooterText(item, options, showTitle, forceName, overlayText, imgUrl, footerCssClass, progressHtml, true);
}
if (outerCardFooter && !options.cardLayout && options.allowBottomPadding !== false) {
@ -1208,9 +1211,10 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
var mediaTypeData = item.MediaType ? (' data-mediatype="' + item.MediaType + '"') : '';
var collectionTypeData = item.CollectionType ? (' data-collectiontype="' + item.CollectionType + '"') : '';
var channelIdData = item.ChannelId ? (' data-channelid="' + item.ChannelId + '"') : '';
var contextData = options.context ? (' data-context="' + options.context + '"') : '';
return '\
<' + tagName + ' data-index="' + index + '"' + timerAttributes + actionAttribute + ' data-isfolder="' + (item.IsFolder || false) + '" data-serverid="' + (item.ServerId) + '" data-id="' + (item.Id || item.ItemId) + '" data-type="' + item.Type + '"' + mediaTypeData + collectionTypeData + channelIdData + positionTicksData + collectionIdData + playlistIdData + ' data-prefix="' + prefix + '" class="' + className + '"> \
<' + tagName + ' data-index="' + index + '"' + timerAttributes + actionAttribute + ' data-isfolder="' + (item.IsFolder || false) + '" data-serverid="' + (item.ServerId) + '" data-id="' + (item.Id || item.ItemId) + '" data-type="' + item.Type + '"' + mediaTypeData + collectionTypeData + channelIdData + positionTicksData + collectionIdData + playlistIdData + contextData + ' data-prefix="' + prefix + '" class="' + className + '"> \
' + cardImageContainerOpen + innerCardFooter + cardImageContainerClose + cardContentClose + overlayButtons + cardScalableClose + outerCardFooter + cardBoxClose + '\
</' + tagName + '>';
}

View file

@ -104,7 +104,7 @@
}();
function toLocaleDateString(date) {
var currentLocale = globalize.getCurrentLocale();
return currentLocale && toLocaleTimeStringSupportsLocales ?
@ -160,10 +160,20 @@
return time;
}
function isRelativeDay(date, offsetInDays) {
var yesterday = new Date();
var day = yesterday.getDate() + offsetInDays;
yesterday.setDate(day); // automatically adjusts month/year appropriately
return date.getFullYear() == yesterday.getFullYear() && date.getMonth() == yesterday.getMonth() && date.getDate() == day;
}
return {
parseISO8601Date: parseISO8601Date,
getDisplayRunningTime: getDisplayRunningTime,
toLocaleDateString: toLocaleDateString,
getDisplayTime: getDisplayTime
getDisplayTime: getDisplayTime,
isRelativeDay: isRelativeDay
};
});

View file

@ -254,6 +254,10 @@
height: 4em;
}
.channelPrograms-tv, .channelHeaderCell-tv {
height: 3.2em;
}
.channelTimeslotHeader {
border-right-color: transparent;
}

View file

@ -294,7 +294,9 @@
return curr.ChannelId == channel.Id;
});
html += '<div class="channelPrograms" data-channelid="' + channel.Id + '">';
var cssClass = layoutManager.tv ? 'channelPrograms channelPrograms-tv' : 'channelPrograms';
html += '<div class="' + cssClass + '" data-channelid="' + channel.Id + '">';
for (var i = 0, length = programs.length; i < length; i++) {
@ -450,6 +452,10 @@
var cssClass = 'channelHeaderCell clearButton itemAction lazy';
if (layoutManager.tv) {
cssClass += ' channelHeaderCell-tv';
}
html += '<button type="button" class="' + cssClass + '"' + dataSrc + ' data-action="link" data-isfolder="' + channel.IsFolder + '" data-id="' + channel.Id + '" data-serverid="' + channel.ServerId + '" data-type="' + channel.Type + '">';
cssClass = 'guideChannelNumber';

View file

@ -154,6 +154,13 @@
return html;
}
function onCardOverlayButtonsClick(e) {
var button = dom.parentWithTag(e.target, 'BUTTON');
if (button) {
e.stopPropagation();
}
}
function onShowTimerExpired(elem) {
@ -164,6 +171,10 @@
innerElem.classList.add('hide');
innerElem.classList.add('cardOverlayTarget');
// allow the overlay to be clicked to view the item
innerElem.classList.add('itemAction');
innerElem.setAttribute('data-action', 'link');
var appendTo = elem.querySelector('div.cardContent') || elem.querySelector('.cardScalable') || elem.querySelector('.cardBox');
//if (appendTo && appendTo.tagName == 'BUTTON') {
@ -203,6 +214,8 @@
var user = responses[1];
innerElem.innerHTML = getOverlayHtml(apiClient, item, user, dataElement);
innerElem.querySelector('.cardOverlayButtons').addEventListener('click', onCardOverlayButtonsClick);
});
slideUpToShow(innerElem);

View file

@ -522,17 +522,21 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
return show(pluginManager.mapRoute(skin, homeRoute));
}
function showItem(item, serverId) {
function showItem(item, serverId, options) {
if (typeof (item) === 'string') {
require(['connectionManager'], function (connectionManager) {
var apiClient = serverId ? connectionManager.getApiClient(serverId) : connectionManager.currentApiClient();
apiClient.getItem(apiClient.getCurrentUserId(), item).then(function (item) {
embyRouter.showItem(item);
embyRouter.showItem(item, options);
});
});
} else {
skinManager.getCurrentSkin().showItem(item);
if (arguments.length == 2) {
options = arguments[1];
}
skinManager.getCurrentSkin().showItem(item, options);
}
}

View file

@ -79,15 +79,15 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
});
}
function showItem(options) {
function showItem(item, options) {
if (options.Type == 'Photo') {
if (item.Type == 'Photo') {
showSlideshow(options.Id, options.ServerId);
showSlideshow(item.Id, item.ServerId);
return;
}
embyRouter.showItem(options);
embyRouter.showItem(item, options);
}
function getItem(button) {
@ -210,7 +210,10 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
var type = item.Type;
if (action == 'link') {
showItem(item);
showItem(item, {
context: card.getAttribute('data-context')
});
}
else if (action == 'instantmix') {

View file

@ -1,6 +1,6 @@
{
"name": "iron-meta",
"version": "1.1.1",
"version": "1.1.2",
"keywords": [
"web-components",
"polymer"
@ -22,16 +22,17 @@
"paper-styles": "polymerelements/paper-styles#^1.0.4",
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "*",
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"main": "iron-meta.html",
"ignore": [],
"homepage": "https://github.com/PolymerElements/iron-meta",
"_release": "1.1.1",
"_release": "1.1.2",
"_resolution": {
"type": "version",
"tag": "v1.1.1",
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
"tag": "v1.1.2",
"commit": "bae96531b63ea6d4ce982f5592248aea849c0f5a"
},
"_source": "git://github.com/PolymerElements/iron-meta.git",
"_target": "^1.0.0",

View file

@ -0,0 +1,33 @@
<!-- Instructions: https://github.com/PolymerElements/iron-meta/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
### Expected outcome
<!-- Example: The page stays the same color. -->
### Actual outcome
<!-- Example: The page turns pink. -->
### Live Demo
<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
### Steps to reproduce
<!-- Example
1. Put a `paper-foo` element in the page.
2. Open the page in a web browser.
3. Click the `paper-foo` element.
-->
### Browsers Affected
<!-- Check all that apply -->
- [ ] Chrome
- [ ] Firefox
- [ ] Safari 9
- [ ] Safari 8
- [ ] Safari 7
- [ ] Edge
- [ ] IE 11
- [ ] IE 10

View file

@ -1,28 +1,23 @@
language: node_js
sudo: false
matrix:
include:
- node_js: stable
script: xvfb-run wct
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- node_js: node
script:
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
wct -s 'default'
fi
sudo: required
before_script:
- npm install web-component-tester
- npm install bower
- export PATH=$PWD/node_modules/.bin:$PATH
- npm install -g bower polylint web-component-tester
- bower install
- polylint
env:
global:
- secure: eGcuDAJt+1GPrC6u95vHufjnSXWbVBZpW7oKQhZjcHrN19l9COdOb7RVkTPsZzEanHaH/D6Psr4WJKyd72Wx5wj+bqGh4nPHTFSnK3+gNT4eJAgLvsxLwHxW8QkYYHEdZe8Wd6sOdal9geeLZ8fG9xELYEtuJR6lww5uLvFv/cw=
- secure: DoBz8LDaS4/lQ9sTXE5pnp8fqEvG47mmdQaQ14EnHQ+wLbajIaLk59vRfau5c7mIef8dEgaT40r/kVP5QRr3OiH5UJY3jLnCMVIxWJ3ZTkuGGuU6QDQvoGSSBhdA+b+G94bbK6LtHQxRBrkiyT9d0IzT5ZiHlDlteGbjdDWAgw0=
- secure: mjikUCoN+UpTbFHwbGXUoKp4vtZ2qNN1JYW79WcOik7fCFmvdFzfYQPDa6y9aJvU3kgkDndGdR/ynLG4kejZjmqTS5fYtdHEwpPVPapbVYnquJvCJKbMN4S2QpGCoq51pjKQ8U3Ys6G5HkmdcDfw3SKk1uMgVzKV7fEI+6WnZ/M=
- secure: LHDnBtwK7yO2X4GNmIaAl7t85WWc1U189OiPqemD27+jTcKml0by1n9Mu/yrg94jYgeXab9mHgU3uMtIdQstNNwTDu8CgmmIP4H2EWopHrTi3KM7Z7aeofPgMJsVFXwg+WhNlcCfhEsygHZWTxjJXM4fcGOrFPDa4+BTgRa2hEE=
node_js: stable
addons:
firefox: '46.0'
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
sauce_connect: true
script:
- xvfb-run wct
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s 'default'; fi
dist: trusty

View file

@ -1,11 +1,16 @@
<!--
This file is autogenerated based on
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
If you edit that file, it will get updated everywhere else.
If you edit this file, your changes will get overridden :)
You can however override the jsbin link with one that's customized to this
specific element:
jsbin=https://jsbin.com/cagaye/edit?html,output
-->
# Polymer Elements
## Guide for Contributors
@ -41,7 +46,7 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
3. Click the `paper-foo` element.
```
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
@ -51,14 +56,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
When submitting pull requests, please provide:
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
```markdown
(For a single issue)
Fixes #20
(For multiple issues)
Fixes #32, #40
Fixes #32, fixes #40
```
2. **A succinct description of the design** used to fix any related issues. For example:

View file

@ -1,6 +1,6 @@
{
"name": "iron-meta",
"version": "1.1.1",
"version": "1.1.2",
"keywords": [
"web-components",
"polymer"
@ -22,8 +22,9 @@
"paper-styles": "polymerelements/paper-styles#^1.0.4",
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "*",
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"main": "iron-meta.html"
"main": "iron-meta.html",
"ignore": []
}

View file

@ -22,22 +22,52 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</head>
<body>
<div class="vertical-section vertical-section-container centered">
<div class="vertical-section centered">
<h1>&lt;iron-meta&gt;</h1>
<h2>Key Query</h2>
<iron-meta key="info" value="foo/bar"></iron-meta>
The <code>value</code> stored at <code>key="info"</code> is <code><meta-test></meta-test></code>.
</div>
<div class="vertical-section centered">
<h2>Type Query</h2>
<iron-meta type="type1" key="a" value="Polymer"></iron-meta>
<iron-meta type="type1" key="b" value="is"></iron-meta>
<iron-meta type="type2" key="a" value="wonderful"></iron-meta>
<iron-meta type="type2" key="b" value="<3"></iron-meta>
The <code>value(s)</code> stored at <code>type="type1"</code> are:<br><code><type-one></type-one></code>.<br><br>The <code>value(s)</code> stored at <code>type="type2"</code> are:<br><code><type-two></type-two></code>.
</div>
<script>
document.addEventListener('WebComponentsReady', function() {
Polymer({
is: 'meta-test',
ready: function() {
this.textContent = new Polymer.IronMetaQuery({key: 'info'}).value;
}
});
});
Polymer({
is: 'meta-test',
is: 'type-one',
ready: function() {
this.textContent = new Polymer.IronMetaQuery({key: 'info'}).value;
var resultList = new Polymer.IronMetaQuery({type: "type1"}).list;
this.textContent = JSON.stringify(resultList);
}
});
Polymer({
is: 'type-two',
ready: function() {
var resultList = new Polymer.IronMetaQuery({type: "type2"}).list;
this.textContent = JSON.stringify(resultList);
}
});
</script>

View file

@ -2,11 +2,11 @@
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
The complete set of authors may be found at http://polymer.github.io/AUTHORS
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>

View file

@ -33,17 +33,17 @@ attributes or use child nodes to define additional metadata.
Now I can access that element (and it's metadata) from any iron-meta instance
via the byKey method, e.g.
meta.byKey('info').getAttribute('value');
meta.byKey('info');
Pure imperative form would be like:
document.createElement('iron-meta').byKey('info').getAttribute('value');
document.createElement('iron-meta').byKey('info');
Or, in a Polymer element, you can include a meta in your template:
<iron-meta id="meta"></iron-meta>
...
this.$.meta.byKey('info').getAttribute('value');
this.$.meta.byKey('info');
@group Iron Elements
@demo demo/index.html

View file

@ -1,5 +1,4 @@
<!doctype html>
<!--
<!DOCTYPE html><!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@ -7,10 +6,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
--><html><head>
<meta charset="utf-8">
<title>Tests</title>
@ -22,9 +18,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<script>
WCT.loadSuites([
'basic.html',
'iron-meta.html'
'iron-meta.html',
'basic.html?dom=shadow',
'iron-meta.html?dom=shadow'
]);
</script>
</body>
</html>
</body></html>

View file

@ -40,6 +40,6 @@
"commit": "1f197d9d7874b1e5808b2a5c26f34446a7d912fc"
},
"_source": "git://github.com/Polymer/polymer.git",
"_target": "^1.1.0",
"_target": "^1.2.0",
"_originalSource": "Polymer/polymer"
}

View file

@ -38,19 +38,14 @@
} else {
parent.querySelector('.chkEnablePhotosContainer').classList.add('hide');
}
if (contentType == 'music' || contentType == 'tvshows' || contentType == 'movies' || contentType == 'homevideos' || contentType == 'musicvideos' || contentType == 'mixed') {
parent.classList.remove('hide');
} else {
parent.classList.add('hide');
}
}
function getLibraryOptions(parent) {
var options = {
EnableArchiveMediaFiles: parent.querySelector('.chkArhiveAsMedia').checked,
EnablePhotos: parent.querySelector('.chkEnablePhotos').checked
EnablePhotos: parent.querySelector('.chkEnablePhotos').checked,
EnableRealtimeMonitor: parent.querySelector('.chkEnableRealtimeMonitor').checked
};
return options;
@ -60,6 +55,7 @@
parent.querySelector('.chkArhiveAsMedia').checked = options.EnableArchiveMediaFiles;
parent.querySelector('.chkEnablePhotos').checked = options.EnablePhotos;
parent.querySelector('.chkEnableRealtimeMonitor').checked = options.EnableRealtimeMonitor;
}
return {

View file

@ -6,6 +6,14 @@
</label>
<div class="fieldDescription checkboxFieldDescription">${EnablePhotosHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" class="chkEnableRealtimeMonitor" checked />
<span>${LabelEnableRealtimeMonitor}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableRealtimeMonitorHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription chkArhiveAsMediaContainer">
<label>
<input type="checkbox" is="emby-checkbox" class="chkArhiveAsMedia" />

View file

@ -10,8 +10,6 @@
$('#txtSeasonZeroName', page).val(config.SeasonZeroDisplayName);
$('#selectEnableRealtimeMonitor', page).val(config.EnableLibraryMonitor);
$('#chkSaveMetadataHidden', page).checked(config.SaveMetadataHidden);
$('#txtMetadataPath', page).val(config.MetadataPath || '');
@ -91,8 +89,6 @@
config.SeasonZeroDisplayName = $('#txtSeasonZeroName', form).val();
config.EnableLibraryMonitor = $('#selectEnableRealtimeMonitor', form).val();
config.SaveMetadataHidden = $('#chkSaveMetadataHidden', form).checked();
config.EnableTvDbUpdates = $('#chkEnableTvdbUpdates', form).checked();
@ -169,15 +165,6 @@
$('.librarySettingsForm').off('submit', onSubmit).on('submit', onSubmit);
ApiClient.getSystemInfo().then(function (systemInfo) {
if (systemInfo.SupportsLibraryMonitor) {
view.querySelector('.fldLibraryMonitor').classList.remove('hide');
} else {
view.querySelector('.fldLibraryMonitor').classList.add('hide');
}
});
view.addEventListener('viewshow', function () {
LibraryMenu.setTabs('librarysetup', 3, getTabs);
Dashboard.showLoadingMsg();

View file

@ -16,7 +16,8 @@
<div class="fieldDescription">${LabelHardwareAccelerationTypeHelp}</div>
</div>
<div class="inputContainer hide fldVaapiDevice">
<input is="emby-input" type="text" id="txtVaapiDevice" label="${LabelVaapiDevice}" />
<input is="emby-input" type="text" id="txtVaapiDevice" label="${LabelVaapiDevice}"/>
<div class="fieldDescription">${LabelVaapiDeviceHelp}</div>
</div>
<div class="selectContainer">
<select is="emby-select" id="selectThreadCount" label="${LabelTranscodingThreadCount}">

View file

@ -4,16 +4,6 @@
<div class="content-primary">
<form class="librarySettingsForm">
<div class="selectContainer fldLibraryMonitor hide">
<select is="emby-select" id="selectEnableRealtimeMonitor" data-mini="true" label="${LabelEnableRealtimeMonitor}">
<option value="Auto">${OptionAuto}</option>
<option value="Enabled">${OptionYes}</option>
<option value="Disabled">${OptionNo}</option>
</select>
<div class="fieldDescription">
${LabelEnableRealtimeMonitorHelp}
</div>
</div>
<div class="selectContainer">
<select is="emby-select" id="selectDateAdded" data-mini="true" label="${LabelDateAddedBehavior}">
<option value="0">${OptionDateAddedImportTime}</option>

View file

@ -64,7 +64,7 @@
var premiereDate = datetime.parseISO8601Date(item.PremiereDate, true);
if (premiereDate.getDate() == new Date().getDate() - 1) {
if (datetime.isRelativeDay(premiereDate, -1)) {
dateText = Globalize.translate('Yesterday');
} else {
dateText = LibraryBrowser.getFutureDateText(premiereDate, true);

View file

@ -60,6 +60,7 @@
itemsContainer.classList.remove('vertical-list');
itemsContainer.classList.add('vertical-wrap');
itemsContainer.classList.add('centered');
}
itemsContainer.innerHTML = '';
}
@ -109,18 +110,11 @@
shape: "auto",
centerText: true,
lazy: true,
coverImage: item.Type == 'PhotoAlbum'
coverImage: item.Type == 'PhotoAlbum',
context: 'folders'
};
if (viewStyle == "Backdrop") {
posterOptions.shape = 'backdrop';
posterOptions.showTitle = true;
posterOptions.preferBackdrop = true;
html = cardBuilder.getCardsHtml(posterOptions);
}
else if (viewStyle == "PosterCard") {
if (viewStyle == "PosterCard") {
posterOptions.showTitle = true;
posterOptions.showYear = true;
@ -137,9 +131,11 @@
});
}
else if (viewStyle == "Thumb") {
posterOptions.preferThumb = true;
posterOptions.showTitle = true;
posterOptions.shape = "backdrop";
posterOptions.centerText = true;
posterOptions.overlayText = false;
html = cardBuilder.getCardsHtml(posterOptions);
} else {

View file

@ -1625,14 +1625,22 @@ var AppInfo = {};
Dashboard.navigate('home.html?tab=3');
};
function showItem(item) {
function showItem(item, serverId, options) {
if (typeof (item) === 'string') {
require(['connectionManager'], function (connectionManager) {
var apiClient = connectionManager.currentApiClient();
apiClient.getItem(apiClient.getCurrentUserId(), item).then(showItem);
apiClient.getItem(apiClient.getCurrentUserId(), item).then(function (item) {
embyRouter.showItem(item, options);
});
});
} else {
Emby.Page.show('/' + LibraryBrowser.getHref(item), { item: item });
if (arguments.length == 2) {
options = arguments[1];
}
var context = options ? options.context : null;
Emby.Page.show('/' + LibraryBrowser.getHref(item, context), { item: item });
}
}
@ -1954,6 +1962,7 @@ var AppInfo = {};
dependencies: ['emby-button', 'emby-input'],
autoFocus: false,
anonymous: true,
startup: true,
controller: 'scripts/connectlogin'
});
@ -2053,6 +2062,7 @@ var AppInfo = {};
path: '/forgotpassword.html',
dependencies: ['emby-input', 'emby-button'],
anonymous: true,
startup: true,
controller: 'scripts/forgotpassword'
});
@ -2061,6 +2071,7 @@ var AppInfo = {};
dependencies: ['emby-input', 'emby-button'],
autoFocus: false,
anonymous: true,
startup: true,
controller: 'scripts/forgotpasswordpin'
});
@ -2242,6 +2253,7 @@ var AppInfo = {};
dependencies: ['emby-button', 'humanedate', 'emby-input'],
autoFocus: false,
anonymous: true,
startup: true,
controller: 'scripts/loginpage'
});
@ -2471,6 +2483,7 @@ var AppInfo = {};
dependencies: ['listViewStyle', 'emby-button'],
autoFocus: false,
anonymous: true,
startup: true,
controller: 'scripts/selectserver'
});

View file

@ -66,7 +66,7 @@
var premiereDate = datetime.parseISO8601Date(item.PremiereDate, true);
if (premiereDate.getDate() == new Date().getDate() - 1) {
if (datetime.isRelativeDay(premiereDate, -1)) {
dateText = Globalize.translate('Yesterday');
} else {
dateText = libraryBrowser.getFutureDateText(premiereDate, true);

View file

@ -2300,7 +2300,7 @@
"LabelffmpegVersion": "FFmpeg version:",
"LabelffmpegPathHelp": "The path to your downloaded FFmpeg application, or folder containing FFmpeg.",
"SetupFFmpeg": "Setup FFmpeg",
"SetupFFmpegHelp": "FFmpeg is a required component and needs to be configured.",
"SetupFFmpegHelp": "Emby may require a library or application to convert certain media types. There are many different applications available, however, Emby has been tested to work with ffmpeg. Emby is in no way affiliated with ffmpeg, its ownership, code or distribution.",
"EnterFFmpegLocation": "Enter FFmpeg path",
"DownloadFFmpeg": "Download FFmpeg",
"FFmpegSuggestedDownload": "Suggested download: {0}",
@ -2323,5 +2323,6 @@
"HeaderOfflineSync": "Offline Sync",
"LabelMaxAudioFileBitrate": "Max audio file bitrate:",
"LabelMaxAudioFileBitrateHelp": "Audio files with a higher bitrate will be converted by Emby Server. Select a higher value for better quality, or a lower value to conserve local storage space.",
"LabelVaapiDevice": "VA API Device:"
"LabelVaapiDevice": "VA API Device:",
"LabelVaapiDeviceHelp": "This is the render node that is used for hardware acceleration."
}