diff --git a/MediaBrowser.Api/ImageProcessor.cs b/MediaBrowser.Api/ImageProcessor.cs
index c4a2fdb699..32c7e05a21 100644
--- a/MediaBrowser.Api/ImageProcessor.cs
+++ b/MediaBrowser.Api/ImageProcessor.cs
@@ -9,6 +9,14 @@ namespace MediaBrowser.Api
{
public static class ImageProcessor
{
+ ///
+ /// Resizes an image from a source stream and saves the result to an output stream
+ ///
+ /// Use if a fixed width is required. Aspect ratio will be preserved.
+ /// Use if a fixed height is required. Aspect ratio will be preserved.
+ /// Use if a max width is required. Aspect ratio will be preserved.
+ /// Use if a max height is required. Aspect ratio will be preserved.
+ /// Quality level, from 0-100. Currently only applies to JPG. The default value should suffice.
public static void ProcessImage(Stream sourceImageStream, Stream toStream, int? width, int? height, int? maxWidth, int? maxHeight, int? quality)
{
Image originalImage = Image.FromStream(sourceImageStream);
diff --git a/MediaBrowser.Common/Configuration/BaseApplicationPaths.cs b/MediaBrowser.Common/Configuration/BaseApplicationPaths.cs
index ae45280136..d030da844c 100644
--- a/MediaBrowser.Common/Configuration/BaseApplicationPaths.cs
+++ b/MediaBrowser.Common/Configuration/BaseApplicationPaths.cs
@@ -1,14 +1,13 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Configuration;
using System.IO;
-using System.Configuration;
using System.Reflection;
namespace MediaBrowser.Common.Configuration
{
+ ///
+ /// Provides a base class to hold common application paths used by both the UI and Server.
+ /// This can be subclassed to add application-specific paths.
+ ///
public abstract class BaseApplicationPaths
{
private string _programDataPath;
diff --git a/MediaBrowser.Common/Events/GenericItemEventArgs.cs b/MediaBrowser.Common/Events/GenericItemEventArgs.cs
deleted file mode 100644
index ae7b2f574a..0000000000
--- a/MediaBrowser.Common/Events/GenericItemEventArgs.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using System;
-
-namespace MediaBrowser.Common.Events
-{
- public class GenericItemEventArgs : EventArgs
- {
- public TItemType Item { get; set; }
- }
-}
diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj
index c38847b5c1..2d3d56da92 100644
--- a/MediaBrowser.Common/MediaBrowser.Common.csproj
+++ b/MediaBrowser.Common/MediaBrowser.Common.csproj
@@ -67,7 +67,6 @@
-
diff --git a/MediaBrowser.Common/Serialization/JsvSerializer.cs b/MediaBrowser.Common/Serialization/JsvSerializer.cs
index d2a12e0598..24c4b074eb 100644
--- a/MediaBrowser.Common/Serialization/JsvSerializer.cs
+++ b/MediaBrowser.Common/Serialization/JsvSerializer.cs
@@ -4,7 +4,7 @@ namespace MediaBrowser.Common.Serialization
{
///
/// This adds support for ServiceStack's proprietary JSV output format.
- /// It's based on Json but the serializer performs faster and output runs about 10% smaller
+ /// It's a hybrid of Json and Csv but the serializer performs about 25% faster and output runs about 10% smaller
/// http://www.servicestack.net/benchmarks/NorthwindDatabaseRowsSerialization.100000-times.2010-08-17.html
///
public static class JsvSerializer
diff --git a/MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs b/MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs
index 50bc1d10ce..92283ab25f 100644
--- a/MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs
+++ b/MediaBrowser.Controller/Configuration/ServerApplicationPaths.cs
@@ -3,6 +3,9 @@ using MediaBrowser.Common.Configuration;
namespace MediaBrowser.Controller.Configuration
{
+ ///
+ /// Extends BaseApplicationPaths to add paths that are only applicable on the server
+ ///
public class ServerApplicationPaths : BaseApplicationPaths
{
private string _rootFolderPath;
diff --git a/MediaBrowser.Controller/FFMpeg/ffmpeg.exe.REMOVED.git-id b/MediaBrowser.Controller/FFMpeg/ffmpeg.exe.REMOVED.git-id
index 30743c0548..9258468531 100644
--- a/MediaBrowser.Controller/FFMpeg/ffmpeg.exe.REMOVED.git-id
+++ b/MediaBrowser.Controller/FFMpeg/ffmpeg.exe.REMOVED.git-id
@@ -1 +1 @@
-faf137524dd67edb423344830e1436dcdca83daf
\ No newline at end of file
+480bd76ce262d65df6b87802bd9bda18cf5b1c8f
\ No newline at end of file
diff --git a/MediaBrowser.Controller/FFMpeg/ffprobe.exe.REMOVED.git-id b/MediaBrowser.Controller/FFMpeg/ffprobe.exe.REMOVED.git-id
index 4ad2356c9e..5ff237cfe6 100644
--- a/MediaBrowser.Controller/FFMpeg/ffprobe.exe.REMOVED.git-id
+++ b/MediaBrowser.Controller/FFMpeg/ffprobe.exe.REMOVED.git-id
@@ -1 +1 @@
-a304265e8410291c1f696e74a4f9b84970bb5753
\ No newline at end of file
+1f5e9773868e0f41260f64e20090803400b9a36d
\ No newline at end of file
diff --git a/MediaBrowser.Controller/Kernel.cs b/MediaBrowser.Controller/Kernel.cs
index fa650e53fe..b7e0258e0c 100644
--- a/MediaBrowser.Controller/Kernel.cs
+++ b/MediaBrowser.Controller/Kernel.cs
@@ -49,6 +49,11 @@ namespace MediaBrowser.Controller
///
[ImportMany(typeof(IBaseItemResolver))]
private IEnumerable EntityResolversEnumerable { get; set; }
+
+ ///
+ /// Once MEF has loaded the resolvers, sort them by priority and store them in this array
+ /// Given the sheer number of times they'll be iterated over it'll be faster to loop through an array
+ ///
internal IBaseItemResolver[] EntityResolvers { get; private set; }
///
diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
index 41bd42040e..652a9d7365 100644
--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj
+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
@@ -76,7 +76,6 @@
-
diff --git a/MediaBrowser.Controller/Providers/FolderProviderFromXml.cs b/MediaBrowser.Controller/Providers/FolderProviderFromXml.cs
index f0c95e4f78..d0bd20a47a 100644
--- a/MediaBrowser.Controller/Providers/FolderProviderFromXml.cs
+++ b/MediaBrowser.Controller/Providers/FolderProviderFromXml.cs
@@ -20,14 +20,17 @@ namespace MediaBrowser.Controller.Providers
get { return MetadataProviderPriority.First; }
}
- public override Task FetchAsync(BaseEntity item, ItemResolveEventArgs args)
+ public async override Task FetchAsync(BaseEntity item, ItemResolveEventArgs args)
+ {
+ await Task.Run(() => { Fetch(item, args); }).ConfigureAwait(false);
+ }
+
+ private void Fetch(BaseEntity item, ItemResolveEventArgs args)
{
if (args.ContainsFile("folder.xml"))
{
- return Task.Run(() => { new FolderXmlParser().Fetch(item as Folder, Path.Combine(args.Path, "folder.xml")); });
+ new BaseItemXmlParser().Fetch(item as Folder, Path.Combine(args.Path, "folder.xml"));
}
-
- return Task.FromResult