mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 14:08:44 -04:00
Added support for additional image types
This commit is contained in:
parent
31c4b5a169
commit
e0acb3a74b
1 changed files with 22 additions and 10 deletions
|
@ -25,22 +25,34 @@ namespace MediaBrowser.Api.HttpHandlers
|
|||
|
||||
private async Task<string> DiscoverImagePath()
|
||||
{
|
||||
string path = QueryString["path"] ?? string.Empty;
|
||||
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
string personName = QueryString["personname"];
|
||||
|
||||
if (!string.IsNullOrEmpty(personName))
|
||||
{
|
||||
Person person = await Kernel.Instance.ItemController.GetPerson(personName);
|
||||
|
||||
return person.PrimaryImagePath;
|
||||
return (await Kernel.Instance.ItemController.GetPerson(personName)).PrimaryImagePath;
|
||||
}
|
||||
|
||||
string genreName = QueryString["genre"];
|
||||
|
||||
if (!string.IsNullOrEmpty(genreName))
|
||||
{
|
||||
return (await Kernel.Instance.ItemController.GetGenre(genreName)).PrimaryImagePath;
|
||||
}
|
||||
|
||||
string year = QueryString["year"];
|
||||
|
||||
if (!string.IsNullOrEmpty(year))
|
||||
{
|
||||
return (await Kernel.Instance.ItemController.GetYear(int.Parse(year))).PrimaryImagePath;
|
||||
}
|
||||
|
||||
string studio = QueryString["studio"];
|
||||
|
||||
if (!string.IsNullOrEmpty(studio))
|
||||
{
|
||||
return (await Kernel.Instance.ItemController.GetStudio(studio)).PrimaryImagePath;
|
||||
}
|
||||
|
||||
BaseItem item = ApiService.GetItemById(QueryString["id"]);
|
||||
|
||||
string imageIndex = QueryString["index"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue