diff options
| author | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-08-20 08:59:21 -0400 |
|---|---|---|
| committer | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-08-20 08:59:21 -0400 |
| commit | 1187222842d880aa8c6dcd2f4ca13ad5ccd31381 (patch) | |
| tree | e4f793b04adf3739946bc150231fb26929290700 /MediaBrowser.Controller/Library/ItemController.cs | |
| parent | ab01b49f6430fddb6eae4c29d4591f698a8405b2 (diff) | |
Update IBN types to use providers
Diffstat (limited to 'MediaBrowser.Controller/Library/ItemController.cs')
| -rw-r--r-- | MediaBrowser.Controller/Library/ItemController.cs | 19 |
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;
}
|
