mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added people pages
This commit is contained in:
parent
3d459a618d
commit
cc98266437
19 changed files with 766 additions and 15 deletions
|
@ -51,11 +51,9 @@
|
|||
var height = 300;
|
||||
var width = primaryImageAspectRatio ? parseInt(height * primaryImageAspectRatio) : null;
|
||||
|
||||
html += "<img class='posterDetailViewImage' src='" + ApiClient.getImageUrl(item.Id, {
|
||||
type: "Primary",
|
||||
html += "<img class='posterDetailViewImage' src='" + LibraryBrowser.getPrimaryImageUrl(item, {
|
||||
height: height,
|
||||
width: width,
|
||||
tag: item.ImageTags.Primary
|
||||
width: width
|
||||
|
||||
}) + "' />";
|
||||
|
||||
|
@ -77,6 +75,10 @@
|
|||
|
||||
html += "<img class='posterDetailViewImage' style='background:" + LibraryBrowser.getMetroColor(item.Id) + ";' src='css/images/items/list/video.png' />";
|
||||
}
|
||||
else if (item.Type == "Person") {
|
||||
|
||||
html += "<img class='posterDetailViewImage' style='background:" + LibraryBrowser.getMetroColor(item.Id) + ";' src='css/images/items/list/person.png' />";
|
||||
}
|
||||
else {
|
||||
|
||||
html += "<img class='posterDetailViewImage' style='background:" + LibraryBrowser.getMetroColor(item.Id) + ";' src='css/images/items/list/collection.png' />";
|
||||
|
@ -163,6 +165,29 @@
|
|||
return item.IsFolder ? (item.Id ? "itemList.html?parentId=" + item.Id : "#") : "itemdetails.html?id=" + item.Id;
|
||||
|
||||
},
|
||||
|
||||
getPrimaryImageUrl: function (item, options) {
|
||||
|
||||
options = options || {};
|
||||
options.type = "Primary";
|
||||
options.tag = item.ImageTags.Primary;
|
||||
|
||||
if (item.Type == "Studio") {
|
||||
|
||||
return ApiClient.getStudioImageUrl(item.Name, options);
|
||||
}
|
||||
if (item.Type == "Person") {
|
||||
|
||||
return ApiClient.getPersonImageUrl(item.Name, options);
|
||||
}
|
||||
if (item.Type == "Genre") {
|
||||
|
||||
return ApiClient.getGenreImageUrl(item.Name, options);
|
||||
}
|
||||
|
||||
return ApiClient.getImageUrl(item.Id, options);
|
||||
|
||||
},
|
||||
|
||||
getPosterViewHtml: function (options) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue