mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-13 17:53:21 +01:00
Fixed a file system issue and also added a few more performance tweaks
This commit is contained in:
parent
906ad3cb1a
commit
e6a95defc9
@@ -2,11 +2,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Controller.Events;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Controller.IO;
|
||||
|
||||
namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
@@ -48,8 +46,10 @@ namespace MediaBrowser.Controller.Providers
|
||||
/// </summary>
|
||||
private void PopulateImages(BaseEntity item, ItemResolveEventArgs args)
|
||||
{
|
||||
foreach (KeyValuePair<string, WIN32_FIND_DATA> file in args.FileSystemChildren)
|
||||
for (int i = 0; i < args.FileSystemChildren.Length; i++)
|
||||
{
|
||||
var file = args.FileSystemChildren[i];
|
||||
|
||||
if (file.Value.IsDirectory)
|
||||
{
|
||||
continue;
|
||||
@@ -81,8 +81,10 @@ namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
List<string> backdropFiles = new List<string>();
|
||||
|
||||
foreach (KeyValuePair<string, WIN32_FIND_DATA> file in args.FileSystemChildren)
|
||||
for (int i = 0; i < args.FileSystemChildren.Length; i++)
|
||||
{
|
||||
var file = args.FileSystemChildren[i];
|
||||
|
||||
if (file.Value.IsDirectory)
|
||||
{
|
||||
continue;
|
||||
@@ -126,7 +128,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
}
|
||||
}
|
||||
|
||||
if (backdropFiles.Any())
|
||||
if (backdropFiles.Count > 0)
|
||||
{
|
||||
item.BackdropImagePaths = backdropFiles;
|
||||
}
|
||||
|
||||
@@ -32,8 +32,10 @@ namespace MediaBrowser.Controller.Providers
|
||||
|
||||
List<Video> localTrailers = new List<Video>();
|
||||
|
||||
foreach (string file in allFiles)
|
||||
for (int i = 0; i < allFiles.Length; i++)
|
||||
{
|
||||
string file = allFiles[i];
|
||||
|
||||
BaseItem child = await Kernel.Instance.ItemController.GetItem(file).ConfigureAwait(false);
|
||||
|
||||
Video video = child as Video;
|
||||
|
||||
Reference in New Issue
Block a user