update components

This commit is contained in:
Luke Pulverenti 2017-01-11 00:18:59 -05:00
parent 5772a26964
commit 51d44957c3
7 changed files with 67 additions and 56 deletions

View File

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.458",
"_release": "1.4.458",
"version": "1.4.460",
"_release": "1.4.460",
"_resolution": {
"type": "version",
"tag": "1.4.458",
"commit": "122cc814d3faca2afd6ebc3b406016e382e0b026"
"tag": "1.4.460",
"commit": "c25b2134e84594781f7eb2e6bd85bc2529a1d922"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",

View File

@ -118,7 +118,7 @@ define(['browser', 'pluginManager', 'events', 'apphost', 'loading', 'playbackMan
function updateVideoUrl(streamInfo) {
var isHls = streamInfo.url.toLowerCase().indexOf('.m3u8') != -1;
var isHls = streamInfo.url.toLowerCase().indexOf('.m3u8') !== -1;
var mediaSource = streamInfo.mediaSource;
var item = streamInfo.item;
@ -699,6 +699,7 @@ define(['browser', 'pluginManager', 'events', 'apphost', 'loading', 'playbackMan
if (!started) {
started = true;
this.removeAttribute('controls');
if (currentPlayOptions.title) {
self.originalDocumentTitle = document.title;
@ -709,8 +710,6 @@ define(['browser', 'pluginManager', 'events', 'apphost', 'loading', 'playbackMan
setCurrentTrackElement(subtitleTrackIndexToSetOnPlaying);
this.removeAttribute('controls');
seekOnPlaybackStart(e.target);
if (currentPlayOptions.fullscreen) {
@ -1289,7 +1288,7 @@ define(['browser', 'pluginManager', 'events', 'apphost', 'loading', 'playbackMan
} else {
// Chrome 35 won't play with preload none
html += '<video class="htmlvideoplayer htmlvideoplayer-nocontrols" preload="metadata" autoplay="autoplay" webkit-playsinline playsinline>';
html += '<video class="htmlvideoplayer" preload="metadata" autoplay="autoplay" webkit-playsinline playsinline>';
}
html += '</video>';

View File

@ -49,7 +49,7 @@
display: inline-block;
}
.htmlvideoplayer-nocontrols::-webkit-media-text-track-display {
.htmlvideoplayer::-webkit-media-text-track-display {
/*Style the text itself*/
margin-top: -2.5em;
}

View File

@ -845,8 +845,10 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
if (player) {
playNextAfterEnded = false;
// TODO: remove second param
player.stop(true, true);
return player.stop(true, true);
}
return Promise.resolve();
};
self.playPause = function (player) {

View File

@ -53,14 +53,14 @@
html += '<div class="listItemBody three-line">';
html += '<div>';
html += '<h3 class="listItemBodyText">';
html += jobItem.ItemName;
html += '</div>';
html += '</h3>';
if (jobItem.Status === 'Failed') {
html += '<div class="secondary" style="color:red;">';
html += '<div class="secondary listItemBodyText" style="color:red;">';
} else {
html += '<div class="secondary">';
html += '<div class="secondary listItemBodyText">';
}
html += globalize.translate('sharedcomponents#SyncJobItemStatus' + jobItem.Status);
if (jobItem.Status === 'Synced' && jobItem.IsMarkedForRemoval) {
@ -69,7 +69,7 @@
}
html += '</div>';
html += '<div class="secondary" style="padding-top:5px;">';
html += '<div class="secondary listItemBodyText" style="padding-top:5px;">';
html += '<div style="background:#e0e0e0;height:4px;"><div style="background:#52B54B;width:' + (jobItem.Progress || 0) + '%;height:100%;"></div></div>';
html += '</div>';

View File

@ -4,7 +4,7 @@
function onSyncJobsUpdated(e, apiClient, data) {
var listInstance = this;
renderList(listInstance, data);
renderList(listInstance, data, apiClient);
}
function refreshList(listInstance, jobs) {
@ -54,28 +54,28 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
return;
}
var progress = job.Progress || 0;
var statusIcon = listItem.querySelector('.statusIcon');
if (progress === 0) {
statusIcon.innerHTML = 'file_download';
statusIcon.classList.add('md-icon');
statusIcon.classList.remove('status-text-icon');
statusIcon.classList.add('zeroProgressStatus');
} else if (progress >= 100) {
statusIcon.innerHTML = 'check';
statusIcon.classList.add('md-icon');
statusIcon.classList.remove('status-text-icon');
statusIcon.classList.remove('zeroProgressStatus');
} else {
statusIcon.classList.remove('md-icon');
statusIcon.classList.remove('zeroProgressStatus');
statusIcon.classList.add('status-text-icon');
statusIcon.innerHTML = (Math.round(progress)) + '%';
}
listItem.querySelector('.jobStatus').innerHTML = getProgressText(job);
}
function getSyncJobHtml(listInstance, job) {
function getProgressText(job) {
var status = job.Status;
if (status === 'Completed') {
status = 'Synced';
}
var html = globalize.translate('sharedcomponents#SyncJobItemStatus' + status);
if (job.Status === 'Transferring' || job.Status === 'Converting' || job.Status === 'Completed') {
html += ' ';
html += (job.Progress || 0) + '%';
}
return html;
}
function getSyncJobHtml(listInstance, job, apiClient) {
var html = '';
@ -90,14 +90,24 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
html += '<' + tagName + typeAttribute + ' class="' + listItemClass + '" data-id="' + job.Id + '" data-status="' + job.Status + '">';
var progress = job.Progress || 0;
var imgUrl;
if (progress === 0) {
html += '<i class="md-icon listItemIcon statusIcon zeroProgressStatus">file_download</i>';
} else if (progress >= 100) {
html += '<i class="md-icon listItemIcon statusIcon">check</i>';
} else {
html += '<i class="listItemIcon statusIcon status-text-icon">' + (Math.round(progress)) + '%</i>';
if (job.PrimaryImageItemId) {
imgUrl = apiClient.getImageUrl(job.PrimaryImageItemId, {
type: "Primary",
width: 80,
tag: job.PrimaryImageTag,
minScale: 1.5
});
}
if (imgUrl) {
html += '<div class="listItemImage lazy" data-src="' + imgUrl + '" item-icon>';
html += '</div>';
}
else {
html += '<i class="md-icon listItemIcon">file_download</i>';
}
var textLines = [];
@ -114,11 +124,7 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
textLines.push(globalize.translate('sharedcomponents#ItemCount', job.ItemCount));
}
if (textLines >= 3) {
html += '<div class="listItemBody three-line">';
} else {
html += '<div class="listItemBody two-line">';
}
html += '<div class="listItemBody three-line">';
for (var i = 0, length = textLines.length; i < length; i++) {
@ -133,6 +139,10 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
}
}
html += '<div class="secondary listItemBodyText jobStatus" style="color:green;">';
html += getProgressText(job);
html += '</div>';
html += '</div>';
if (!layoutManager.tv) {
@ -144,7 +154,7 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
return html;
}
function renderList(listInstance, jobs) {
function renderList(listInstance, jobs, apiClient) {
if ((new Date().getTime() - listInstance.lastDataLoad) < 60000) {
refreshList(listInstance, jobs);
@ -187,7 +197,7 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
}
}
html += getSyncJobHtml(listInstance, job);
html += getSyncJobHtml(listInstance, job, apiClient);
}
if (hasOpenSection) {
@ -229,7 +239,7 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
return apiClient.getJSON(apiClient.getUrl('Sync/Jobs', options)).then(function (response) {
renderList(listInstance, response.Items);
renderList(listInstance, response.Items, apiClient);
loading.hide();
});
}

View File

@ -86,7 +86,7 @@ define(['appSettings', 'events', 'browser'], function (appsettings, events, brow
self.enableCinemaMode = function (val) {
if (val != null) {
self.set('enableCinemaMode', val.toString());
self.set('enableCinemaMode', val.toString(), false);
}
val = self.get('enableCinemaMode', false);
@ -101,7 +101,7 @@ define(['appSettings', 'events', 'browser'], function (appsettings, events, brow
self.enableThemeSongs = function (val) {
if (val != null) {
self.set('enableThemeSongs', val.toString());
self.set('enableThemeSongs', val.toString(), false);
}
val = self.get('enableThemeSongs', false);
@ -112,7 +112,7 @@ define(['appSettings', 'events', 'browser'], function (appsettings, events, brow
self.enableThemeVideos = function (val) {
if (val != null) {
self.set('enableThemeVideos', val.toString());
self.set('enableThemeVideos', val.toString(), false);
}
val = self.get('enableThemeVideos', false);
@ -127,10 +127,10 @@ define(['appSettings', 'events', 'browser'], function (appsettings, events, brow
self.language = function (val) {
if (val != null) {
self.set('language', val.toString());
self.set('language', val.toString(), false);
}
return self.get('language');
return self.get('language', false);
};
self.skipBackLength = function (val) {