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,20 +25,32 @@ namespace MediaBrowser.Api.HttpHandlers
|
|||||||
|
|
||||||
private async Task<string> DiscoverImagePath()
|
private async Task<string> DiscoverImagePath()
|
||||||
{
|
{
|
||||||
string path = QueryString["path"] ?? string.Empty;
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(path))
|
|
||||||
{
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
string personName = QueryString["personname"];
|
string personName = QueryString["personname"];
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(personName))
|
if (!string.IsNullOrEmpty(personName))
|
||||||
{
|
{
|
||||||
Person person = await Kernel.Instance.ItemController.GetPerson(personName);
|
return (await Kernel.Instance.ItemController.GetPerson(personName)).PrimaryImagePath;
|
||||||
|
}
|
||||||
|
|
||||||
return person.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"]);
|
BaseItem item = ApiService.GetItemById(QueryString["id"]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user