mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-22 01:56:40 +00:00
made library scan a bit more conservative
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Logging;
|
||||
@@ -159,7 +160,7 @@ namespace MediaBrowser.ServerApplication.Controls
|
||||
DisplayTitle(item);
|
||||
DisplayRating(item);
|
||||
|
||||
var path = MultiItemUpdateNotification.GetImagePath(item);
|
||||
var path = GetImagePath(item);
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
@@ -210,6 +211,44 @@ namespace MediaBrowser.ServerApplication.Controls
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the image path.
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
internal static string GetImagePath(BaseItem item)
|
||||
{
|
||||
// Try our best to find an image
|
||||
var path = item.PrimaryImagePath;
|
||||
|
||||
if (string.IsNullOrEmpty(path) && item.BackdropImagePaths != null)
|
||||
{
|
||||
path = item.BackdropImagePaths.FirstOrDefault();
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
path = item.GetImage(ImageType.Thumb);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
path = item.GetImage(ImageType.Art);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
path = item.GetImage(ImageType.Logo);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
path = item.GetImage(ImageType.Disc);
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Displays the rating.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user