update details
This commit is contained in:
parent
cade92d4ad
commit
a29d3626b0
13 changed files with 366 additions and 710 deletions
|
@ -14,12 +14,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.362",
|
||||
"_release": "1.4.362",
|
||||
"version": "1.4.363",
|
||||
"_release": "1.4.363",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.362",
|
||||
"commit": "74f60991dce95403508b7eb84ec362226f574bc9"
|
||||
"tag": "1.4.363",
|
||||
"commit": "391923397ea7ea23890ced20153fc896e8892f31"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
|
|
@ -111,7 +111,7 @@ define(['lazyLoader', 'imageFetcher', 'layoutManager', 'browser', 'appSettings',
|
|||
|
||||
//var now = new Date().getTime();
|
||||
getVibrantInfoFromElement(img, url).then(function (vibrantInfo) {
|
||||
|
||||
|
||||
var swatch = vibrantInfo.split('|');
|
||||
//console.log('vibrant took ' + (new Date().getTime() - now) + 'ms');
|
||||
if (swatch.length) {
|
||||
|
@ -133,18 +133,22 @@ define(['lazyLoader', 'imageFetcher', 'layoutManager', 'browser', 'appSettings',
|
|||
}
|
||||
|
||||
function getVibrantInfoFromElement(elem, url) {
|
||||
|
||||
if (elem.tagName === 'IMG') {
|
||||
return Promise.resolve(getVibrantInfo(elem, url));
|
||||
}
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
var img = new Image();
|
||||
img.onload = function () {
|
||||
resolve(getVibrantInfo(img, url));
|
||||
};
|
||||
img.src = url;
|
||||
require(['vibrant'], function () {
|
||||
|
||||
if (elem.tagName === 'IMG') {
|
||||
resolve(getVibrantInfo(elem, url));
|
||||
return;
|
||||
}
|
||||
|
||||
var img = new Image();
|
||||
img.onload = function () {
|
||||
resolve(getVibrantInfo(img, url));
|
||||
};
|
||||
img.src = url;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -157,7 +161,7 @@ define(['lazyLoader', 'imageFetcher', 'layoutManager', 'browser', 'appSettings',
|
|||
|
||||
url = url.split('?')[0];
|
||||
|
||||
var cacheKey = 'vibrant25';
|
||||
var cacheKey = 'vibrant31';
|
||||
//cacheKey = 'vibrant' + new Date().getTime();
|
||||
return cacheKey + url;
|
||||
}
|
||||
|
@ -179,33 +183,21 @@ define(['lazyLoader', 'imageFetcher', 'layoutManager', 'browser', 'appSettings',
|
|||
|
||||
value = '';
|
||||
var swatch = swatches.DarkVibrant;
|
||||
if (swatch) {
|
||||
value += swatch.getHex() + '|' + swatch.getBodyTextColor();
|
||||
}
|
||||
//swatch = swatches.DarkMuted;
|
||||
//if (swatch) {
|
||||
// value += '|' + swatch.getHex() + '|' + swatch.getBodyTextColor();
|
||||
//} else {
|
||||
// value += '||';
|
||||
//}
|
||||
//swatch = swatches.Vibrant;
|
||||
//if (swatch) {
|
||||
// value += '|' + swatch.getHex() + '|' + swatch.getBodyTextColor();
|
||||
//} else {
|
||||
// value += '||';
|
||||
//}
|
||||
//swatch = swatches.Muted;
|
||||
//if (swatch) {
|
||||
// value += '|' + swatch.getHex() + '|' + swatch.getBodyTextColor();
|
||||
//} else {
|
||||
// value += '||';
|
||||
//}
|
||||
value += getSwatchString(swatch);
|
||||
|
||||
appSettings.set(getSettingsKey(url), value);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
function getSwatchString(swatch) {
|
||||
|
||||
if (swatch) {
|
||||
return swatch.getHex() + '|' + swatch.getBodyTextColor() + '|' + swatch.getTitleTextColor();
|
||||
}
|
||||
return '||';
|
||||
}
|
||||
|
||||
function fadeIn(elem) {
|
||||
|
||||
var duration = layoutManager.tv ? 160 : 300;
|
||||
|
@ -294,6 +286,7 @@ define(['lazyLoader', 'imageFetcher', 'layoutManager', 'browser', 'appSettings',
|
|||
self.lazyChildren = lazyChildren;
|
||||
self.getPrimaryImageAspectRatio = getPrimaryImageAspectRatio;
|
||||
self.getCachedVibrantInfo = getCachedVibrantInfo;
|
||||
self.getVibrantInfoFromElement = getVibrantInfoFromElement;
|
||||
|
||||
return self;
|
||||
});
|
|
@ -174,7 +174,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter',
|
|||
}
|
||||
}
|
||||
|
||||
if (item.Type === 'Program') {
|
||||
if (item.Type === 'Program' && options.record !== false) {
|
||||
|
||||
commands.push({
|
||||
name: Globalize.translate('sharedcomponents#Record'),
|
||||
|
@ -184,7 +184,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter',
|
|||
|
||||
if (user.Policy.IsAdministrator) {
|
||||
|
||||
if (item.Type !== 'Timer' && item.Type !== 'SeriesTimer' && item.Type !== 'Program' && !(item.Type === 'Recording' && item.Status !== 'Completed')) {
|
||||
if (item.Type !== 'Timer' && item.Type !== 'SeriesTimer' && item.Type !== 'Program' && item.Type !== 'TvChannel' && !(item.Type === 'Recording' && item.Status !== 'Completed')) {
|
||||
commands.push({
|
||||
name: globalize.translate('sharedcomponents#Refresh'),
|
||||
id: 'refresh'
|
||||
|
|
|
@ -71,6 +71,9 @@ define(['apphost'], function (appHost) {
|
|||
if (item.Type === 'Program') {
|
||||
return false;
|
||||
}
|
||||
if (item.Type === 'TvChannel') {
|
||||
return false;
|
||||
}
|
||||
if (item.Type === 'Timer') {
|
||||
return false;
|
||||
}
|
||||
|
@ -169,6 +172,12 @@ define(['apphost'], function (appHost) {
|
|||
|
||||
canShare: function (user, item) {
|
||||
|
||||
if (item.Type === 'Program') {
|
||||
return false;
|
||||
}
|
||||
if (item.Type === 'TvChannel') {
|
||||
return false;
|
||||
}
|
||||
if (item.Type === 'Timer') {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue