mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
support primary images with same name as original file
This commit is contained in:
parent
a4f7eb84cd
commit
3b1dabff0f
@ -157,6 +157,17 @@ namespace MediaBrowser.Providers
|
|||||||
GetImage(item, "cover") ??
|
GetImage(item, "cover") ??
|
||||||
GetImage(item, "default");
|
GetImage(item, "default");
|
||||||
|
|
||||||
|
// Look for a file with the same name as the item
|
||||||
|
if (image == null)
|
||||||
|
{
|
||||||
|
var name = Path.GetFileNameWithoutExtension(item.Path);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(name))
|
||||||
|
{
|
||||||
|
image = GetImage(item, name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (image != null)
|
if (image != null)
|
||||||
{
|
{
|
||||||
item.SetImage(ImageType.Primary, image.FullName);
|
item.SetImage(ImageType.Primary, image.FullName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user