mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
add more device options
This commit is contained in:
@@ -1501,7 +1501,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
.Select(i => i.RootFolder)
|
||||
.Distinct()
|
||||
.SelectMany(i => i.Children)
|
||||
.OfType<CollectionFolder>()
|
||||
.OfType<ICollectionFolder>()
|
||||
.Where(i => string.Equals(i.Path, item.Path, StringComparison.OrdinalIgnoreCase) || i.PhysicalLocations.Contains(item.Path))
|
||||
.Select(i => i.CollectionType)
|
||||
.Where(i => !string.IsNullOrEmpty(i))
|
||||
|
||||
@@ -29,11 +29,22 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
||||
}
|
||||
|
||||
protected static string[] ImageExtensions = { ".tiff", ".jpeg", ".jpg", ".png", ".aiff" };
|
||||
|
||||
private static readonly string[] IgnoreFiles =
|
||||
{
|
||||
"folder",
|
||||
"thumb",
|
||||
"landscape",
|
||||
"fanart",
|
||||
"backdrop",
|
||||
"poster"
|
||||
};
|
||||
|
||||
internal static bool IsImageFile(string path)
|
||||
{
|
||||
var filename = Path.GetFileName(path);
|
||||
var filename = Path.GetFileNameWithoutExtension(path) ?? string.Empty;
|
||||
|
||||
return !string.Equals(filename, "folder.jpg", StringComparison.OrdinalIgnoreCase)
|
||||
return !IgnoreFiles.Contains(filename, StringComparer.OrdinalIgnoreCase)
|
||||
&& ImageExtensions.Contains(Path.GetExtension(path) ?? string.Empty, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user