Merge pull request #1162 from MrTimscampi/stupid-logo

Remove the small logo in OSD and details page
This commit is contained in:
dkanada 2020-05-01 17:58:04 +09:00 committed by GitHub
commit 645bd08161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 44 deletions

View File

@ -554,7 +554,7 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "userSetti
renderTimerEditor(page, item, apiClient, user);
renderImage(page, item, apiClient, user);
renderLogo(page, item, apiClient);
setTitle(item, apiClient);
Emby.Page.setTitle('');
setInitialCollapsibleState(page, item, apiClient, context, user);
renderDetails(page, item, apiClient, context);
renderTrackSelections(page, instance, item);
@ -666,19 +666,6 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "userSetti
return null;
}
function setTitle(item, apiClient) {
var url = logoImageUrl(item, apiClient, {});
if (url != null) {
var pageTitle = document.querySelector(".pageTitle");
pageTitle.style.backgroundImage = "url('" + url + "')";
pageTitle.classList.add("pageTitleWithLogo");
pageTitle.innerHTML = "";
} else {
Emby.Page.setTitle("");
}
}
function renderLogo(page, item, apiClient) {
var url = logoImageUrl(item, apiClient, {
maxWidth: 400
@ -2116,7 +2103,7 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "userSetti
if (e.detail.isRestored) {
if (currentItem) {
setTitle(currentItem, connectionManager.getApiClient(currentItem.ServerId));
Emby.Page.setTitle('');
renderTrackSelections(page, self, currentItem, true);
}
} else {

View File

@ -45,23 +45,6 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med
return null;
}
function logoImageUrl(item, apiClient, options) {
options = options || {};
options.type = "Logo";
if (item.ImageTags && item.ImageTags.Logo) {
options.tag = item.ImageTags.Logo;
return apiClient.getScaledImageUrl(item.Id, options);
}
if (item.ParentLogoImageTag) {
options.tag = item.ParentLogoImageTag;
return apiClient.getScaledImageUrl(item.ParentLogoItemId, options);
}
return null;
}
return function (view, params) {
function onVerticalSwipe(e, elem, data) {
var player = currentPlayer;
@ -309,18 +292,7 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med
}
function setTitle(item, parentName) {
var url = logoImageUrl(item, connectionManager.getApiClient(item.ServerId), {});
if (url) {
Emby.Page.setTitle("");
var pageTitle = document.querySelector(".pageTitle");
pageTitle.style.backgroundImage = "url('" + url + "')";
pageTitle.classList.add("pageTitleWithLogo");
pageTitle.classList.remove("pageTitleWithDefaultLogo");
pageTitle.innerHTML = "";
} else {
Emby.Page.setTitle(parentName || "");
}
Emby.Page.setTitle(parentName || '');
var documentTitle = parentName || (item ? item.Name : null);