mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-08 02:34:19 -04:00
Added support for additional image types
This commit is contained in:
parent
31c4b5a169
commit
e0acb3a74b
@ -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…
x
Reference in New Issue
Block a user