aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library/ItemController.cs
diff options
context:
space:
mode:
authorLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-20 08:59:21 -0400
committerLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-20 08:59:21 -0400
commit1187222842d880aa8c6dcd2f4ca13ad5ccd31381 (patch)
treee4f793b04adf3739946bc150231fb26929290700 /MediaBrowser.Controller/Library/ItemController.cs
parentab01b49f6430fddb6eae4c29d4591f698a8405b2 (diff)
Update IBN types to use providers
Diffstat (limited to 'MediaBrowser.Controller/Library/ItemController.cs')
-rw-r--r--MediaBrowser.Controller/Library/ItemController.cs19
1 files changed, 5 insertions, 14 deletions
diff --git a/MediaBrowser.Controller/Library/ItemController.cs b/MediaBrowser.Controller/Library/ItemController.cs
index bc5cea79b..eb767d9a1 100644
--- a/MediaBrowser.Controller/Library/ItemController.cs
+++ b/MediaBrowser.Controller/Library/ItemController.cs
@@ -295,21 +295,12 @@ namespace MediaBrowser.Controller.Library
item.DateCreated = Directory.GetCreationTime(path);
item.DateModified = Directory.GetLastAccessTime(path);
- if (File.Exists(Path.Combine(path, "folder.jpg")))
- {
- item.PrimaryImagePath = Path.Combine(path, "folder.jpg");
- }
- else if (File.Exists(Path.Combine(path, "folder.png")))
- {
- item.PrimaryImagePath = Path.Combine(path, "folder.png");
- }
+ ItemResolveEventArgs args = new ItemResolveEventArgs();
+ args.Path = path;
+ args.FileAttributes = File.GetAttributes(path);
+ args.FileSystemChildren = Directory.GetFileSystemEntries(path, "*", SearchOption.TopDirectoryOnly).Select(f => new KeyValuePair<string, FileAttributes>(f, File.GetAttributes(f)));
- var b = false;
-
- if (b)
- {
- await Kernel.Instance.ExecuteMetadataProviders(item, null);
- }
+ await Kernel.Instance.ExecuteMetadataProviders(item, args);
return item;
}