浏览代码

Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser

Eric Reed 12 年之前
父节点
当前提交
67f2b1b2ba
共有 39 个文件被更改,包括 3154 次插入1605 次删除
  1. 6 6
      MediaBrowser.Api/MediaBrowser.Api.csproj
  2. 1 1
      MediaBrowser.Api/Playback/Progressive/VideoService.cs
  3. 3 3
      MediaBrowser.Api/SearchService.cs
  4. 2 2
      MediaBrowser.Api/packages.config
  5. 2 2
      MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj
  6. 1 1
      MediaBrowser.Common.Implementations/packages.config
  7. 6 6
      MediaBrowser.Common/MediaBrowser.Common.csproj
  8. 2 2
      MediaBrowser.Common/packages.config
  9. 2 3
      MediaBrowser.Controller/Entities/UserItemData.cs
  10. 1 1
      MediaBrowser.Controller/MediaBrowser.Controller.csproj
  11. 1 1
      MediaBrowser.Controller/Providers/MediaInfo/FFProbeAudioInfoProvider.cs
  12. 2 2
      MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs
  13. 64 74
      MediaBrowser.Controller/Providers/Movies/OpenMovieDatabaseProvider.cs
  14. 83 28
      MediaBrowser.Controller/Providers/Movies/RottenTomatoesMovieProvider.cs
  15. 111 169
      MediaBrowser.Controller/Providers/Movies/TmdbPersonProvider.cs
  16. 5 2
      MediaBrowser.Controller/Providers/Music/FanArtArtistProvider.cs
  17. 10 7
      MediaBrowser.Controller/Providers/Music/LastfmArtistProvider.cs
  18. 1 1
      MediaBrowser.Controller/Providers/Music/LastfmBaseProvider.cs
  19. 5 2
      MediaBrowser.Controller/Providers/TV/RemoteSeriesProvider.cs
  20. 32 23
      MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj
  21. 0 41
      MediaBrowser.Server.Implementations/README.txt
  22. 4 4
      MediaBrowser.Server.Implementations/packages.config
  23. 135 0
      MediaBrowser.Server.Implementations/swagger-ui/css/hightlight.default.css
  24. 1633 833
      MediaBrowser.Server.Implementations/swagger-ui/css/screen.css
  25. 二进制
      MediaBrowser.Server.Implementations/swagger-ui/images/logo_small.png
  26. 二进制
      MediaBrowser.Server.Implementations/swagger-ui/images/throbber.gif
  27. 26 34
      MediaBrowser.Server.Implementations/swagger-ui/index.html
  28. 212 0
      MediaBrowser.Server.Implementations/swagger-ui/lib/handlebars-1.0.rc.1.js
  29. 0 223
      MediaBrowser.Server.Implementations/swagger-ui/lib/handlebars.runtime-1.0.0.beta.6.js
  30. 0 0
      MediaBrowser.Server.Implementations/swagger-ui/lib/highlight.7.3.pack.js
  31. 1 0
      MediaBrowser.Server.Implementations/swagger-ui/lib/jquery-1.8.0.min.js
  32. 0 1
      MediaBrowser.Server.Implementations/swagger-ui/lib/jquery.min.js
  33. 287 29
      MediaBrowser.Server.Implementations/swagger-ui/lib/swagger.js
  34. 479 88
      MediaBrowser.Server.Implementations/swagger-ui/swagger-ui.js
  35. 0 0
      MediaBrowser.Server.Implementations/swagger-ui/swagger-ui.min.js
  36. 21 6
      MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj
  37. 5 2
      MediaBrowser.ServerApplication/packages.config
  38. 9 6
      MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
  39. 2 2
      MediaBrowser.WebDashboard/packages.config

+ 6 - 6
MediaBrowser.Api/MediaBrowser.Api.csproj

@@ -39,17 +39,17 @@
     <Reference Include="MoreLinq">
     <Reference Include="MoreLinq">
       <HintPath>..\packages\morelinq.1.0.15631-beta\lib\net35\MoreLinq.dll</HintPath>
       <HintPath>..\packages\morelinq.1.0.15631-beta\lib\net35\MoreLinq.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Common, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Common, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Common.3.9.43\lib\net35\ServiceStack.Common.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Common.3.9.44\lib\net35\ServiceStack.Common.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Interfaces, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Interfaces, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Common.3.9.43\lib\net35\ServiceStack.Interfaces.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Common.3.9.44\lib\net35\ServiceStack.Interfaces.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Text, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Text, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Text.3.9.43\lib\net35\ServiceStack.Text.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Text.3.9.44\lib\net35\ServiceStack.Text.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Core" />

+ 1 - 1
MediaBrowser.Api/Playback/Progressive/VideoService.cs

@@ -258,7 +258,7 @@ namespace MediaBrowser.Api.Playback.Progressive
             // webm
             // webm
             if (videoCodec.Equals("libvpx", StringComparison.OrdinalIgnoreCase))
             if (videoCodec.Equals("libvpx", StringComparison.OrdinalIgnoreCase))
             {
             {
-                args = "-quality realtime -speed 0 -qmin 0 -qmax 30 -profile:v 0 -slices 8";
+                args = "-speed 16 -quality good -profile:v 0 -slices 8";
             }
             }
 
 
             // asf/wmv
             // asf/wmv

+ 3 - 3
MediaBrowser.Api/SearchService.cs

@@ -1,5 +1,4 @@
-using System.Collections;
-using MediaBrowser.Controller;
+using MediaBrowser.Controller;
 using MediaBrowser.Controller.Dto;
 using MediaBrowser.Controller.Dto;
 using MediaBrowser.Controller.Entities;
 using MediaBrowser.Controller.Entities;
 using MediaBrowser.Controller.Entities.Audio;
 using MediaBrowser.Controller.Entities.Audio;
@@ -9,9 +8,10 @@ using MediaBrowser.Model.Entities;
 using MediaBrowser.Model.Search;
 using MediaBrowser.Model.Search;
 using ServiceStack.ServiceHost;
 using ServiceStack.ServiceHost;
 using System;
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
-using System.Threading.Tasks;
 using System.Linq;
 using System.Linq;
+using System.Threading.Tasks;
 
 
 namespace MediaBrowser.Api
 namespace MediaBrowser.Api
 {
 {

+ 2 - 2
MediaBrowser.Api/packages.config

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
 <packages>
   <package id="morelinq" version="1.0.15631-beta" targetFramework="net45" />
   <package id="morelinq" version="1.0.15631-beta" targetFramework="net45" />
-  <package id="ServiceStack.Common" version="3.9.43" targetFramework="net45" />
-  <package id="ServiceStack.Text" version="3.9.43" targetFramework="net45" />
+  <package id="ServiceStack.Common" version="3.9.44" targetFramework="net45" />
+  <package id="ServiceStack.Text" version="3.9.44" targetFramework="net45" />
 </packages>
 </packages>

+ 2 - 2
MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj

@@ -39,9 +39,9 @@
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\packages\NLog.2.0.1.2\lib\net45\NLog.dll</HintPath>
       <HintPath>..\packages\NLog.2.0.1.2\lib\net45\NLog.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Text, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Text, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Text.3.9.43\lib\net35\ServiceStack.Text.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Text.3.9.44\lib\net35\ServiceStack.Text.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="SimpleInjector, Version=2.2.1.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
     <Reference Include="SimpleInjector, Version=2.2.1.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>

+ 1 - 1
MediaBrowser.Common.Implementations/packages.config

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
 <packages>
   <package id="NLog" version="2.0.1.2" targetFramework="net45" />
   <package id="NLog" version="2.0.1.2" targetFramework="net45" />
-  <package id="ServiceStack.Text" version="3.9.43" targetFramework="net45" />
+  <package id="ServiceStack.Text" version="3.9.44" targetFramework="net45" />
   <package id="SimpleInjector" version="2.2.1" targetFramework="net45" />
   <package id="SimpleInjector" version="2.2.1" targetFramework="net45" />
 </packages>
 </packages>

+ 6 - 6
MediaBrowser.Common/MediaBrowser.Common.csproj

@@ -38,17 +38,17 @@
     </ApplicationIcon>
     </ApplicationIcon>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
-    <Reference Include="ServiceStack.Common, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Common, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Common.3.9.43\lib\net35\ServiceStack.Common.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Common.3.9.44\lib\net35\ServiceStack.Common.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Interfaces, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Interfaces, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Common.3.9.43\lib\net35\ServiceStack.Interfaces.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Common.3.9.44\lib\net35\ServiceStack.Interfaces.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Text, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Text, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Text.3.9.43\lib\net35\ServiceStack.Text.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Text.3.9.44\lib\net35\ServiceStack.Text.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Core" />

+ 2 - 2
MediaBrowser.Common/packages.config

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
 <packages>
-  <package id="ServiceStack.Common" version="3.9.43" targetFramework="net45" />
-  <package id="ServiceStack.Text" version="3.9.43" targetFramework="net45" />
+  <package id="ServiceStack.Common" version="3.9.44" targetFramework="net45" />
+  <package id="ServiceStack.Text" version="3.9.44" targetFramework="net45" />
 </packages>
 </packages>

+ 2 - 3
MediaBrowser.Controller/Entities/UserItemData.cs

@@ -22,8 +22,7 @@ namespace MediaBrowser.Controller.Entities
         /// Gets or sets the users 0-10 rating
         /// Gets or sets the users 0-10 rating
         /// </summary>
         /// </summary>
         /// <value>The rating.</value>
         /// <value>The rating.</value>
-        /// <exception cref="System.ArgumentOutOfRangeException">A 0-10 rating is required for UserItemData.</exception>
-        /// <exception cref="System.InvalidOperationException">A 0-10 rating is required for UserItemData.</exception>
+        /// <exception cref="System.ArgumentOutOfRangeException">Rating;A 0 to 10 rating is required for UserItemData.</exception>
         public float? Rating
         public float? Rating
         {
         {
             get
             get
@@ -36,7 +35,7 @@ namespace MediaBrowser.Controller.Entities
                 {
                 {
                     if (value.Value < 0 || value.Value > 10)
                     if (value.Value < 0 || value.Value > 10)
                     {
                     {
-                        throw new ArgumentOutOfRangeException("A 0-10 rating is required for UserItemData.");
+                        throw new ArgumentOutOfRangeException("value", "A 0 to 10 rating is required for UserItemData.");
                     }
                     }
                 }
                 }
 
 

+ 1 - 1
MediaBrowser.Controller/MediaBrowser.Controller.csproj

@@ -116,8 +116,8 @@
     <Compile Include="Providers\IProviderManager.cs" />
     <Compile Include="Providers\IProviderManager.cs" />
     <Compile Include="Providers\MediaInfo\MediaEncoderHelpers.cs" />
     <Compile Include="Providers\MediaInfo\MediaEncoderHelpers.cs" />
     <Compile Include="Providers\MetadataProviderPriority.cs" />
     <Compile Include="Providers\MetadataProviderPriority.cs" />
+    <Compile Include="Providers\Movies\OpenMovieDatabaseProvider.cs" />
     <Compile Include="Providers\Movies\RottenTomatoesMovieProvider.cs" />
     <Compile Include="Providers\Movies\RottenTomatoesMovieProvider.cs" />
-    <Compile Include="Providers\Movies\RottenTomatoesMovieReviewsProvider.cs" />
     <Compile Include="Providers\Music\FanArtArtistByNameProvider.cs" />
     <Compile Include="Providers\Music\FanArtArtistByNameProvider.cs" />
     <Compile Include="Providers\Music\LastfmAlbumProvider.cs" />
     <Compile Include="Providers\Music\LastfmAlbumProvider.cs" />
     <Compile Include="Providers\Music\FanArtAlbumProvider.cs" />
     <Compile Include="Providers\Music\FanArtAlbumProvider.cs" />

+ 1 - 1
MediaBrowser.Controller/Providers/MediaInfo/FFProbeAudioInfoProvider.cs

@@ -148,7 +148,7 @@ namespace MediaBrowser.Controller.Providers.MediaInfo
         /// </summary>
         /// </summary>
         /// <param name="val">The val.</param>
         /// <param name="val">The val.</param>
         /// <returns>System.String[][].</returns>
         /// <returns>System.String[][].</returns>
-        private string[] Split(string val)
+        private IEnumerable<string> Split(string val)
         {
         {
             // Only use the comma as a delimeter if there are no slashes or pipes. 
             // Only use the comma as a delimeter if there are no slashes or pipes. 
             // We want to be careful not to split names that have commas in them
             // We want to be careful not to split names that have commas in them

+ 2 - 2
MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs

@@ -975,8 +975,8 @@ namespace MediaBrowser.Controller.Providers.Movies
                     boxset.OfficialRating = firstChild != null ? firstChild.OfficialRating : null;
                     boxset.OfficialRating = firstChild != null ? firstChild.OfficialRating : null;
                 }
                 }
 
 
-                if (movie.RunTimeTicks == null && movieData.runtime > 0)
-                    movie.RunTimeTicks = TimeSpan.FromMinutes(movieData.runtime).Ticks;
+                //if (movie.RunTimeTicks == null && movieData.runtime > 0)
+                //    movie.RunTimeTicks = TimeSpan.FromMinutes(movieData.runtime).Ticks;
 
 
                 //studios
                 //studios
                 if (movieData.production_companies != null)
                 if (movieData.production_companies != null)

+ 64 - 74
MediaBrowser.Controller/Providers/Movies/RottenTomatoesMovieReviewsProvider.cs → MediaBrowser.Controller/Providers/Movies/OpenMovieDatabaseProvider.cs

@@ -7,21 +7,15 @@ using MediaBrowser.Model.Entities;
 using MediaBrowser.Model.Logging;
 using MediaBrowser.Model.Logging;
 using MediaBrowser.Model.Serialization;
 using MediaBrowser.Model.Serialization;
 using System;
 using System;
-using System.Collections.Generic;
-using System.Linq;
+using System.Globalization;
 using System.Threading;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
 
 
 namespace MediaBrowser.Controller.Providers.Movies
 namespace MediaBrowser.Controller.Providers.Movies
 {
 {
-    /// <summary>
-    /// Class RottenTomatoesMovieProvider
-    /// </summary>
-    public class RottenTomatoesMovieReviewsProvider : BaseMetadataProvider
+    public class OpenMovieDatabaseProvider : BaseMetadataProvider
     {
     {
-        // http://developer.rottentomatoes.com/iodocs
-
-        private const string MoviesReviews = @"movies/{1}/reviews.json?review_type=top_critic&page_limit=10&page=1&country=us&apikey={0}";
+        private readonly SemaphoreSlim _resourcePool = new SemaphoreSlim(1, 1);
 
 
         /// <summary>
         /// <summary>
         /// Gets the json serializer.
         /// Gets the json serializer.
@@ -35,14 +29,7 @@ namespace MediaBrowser.Controller.Providers.Movies
         /// <value>The HTTP client.</value>
         /// <value>The HTTP client.</value>
         protected IHttpClient HttpClient { get; private set; }
         protected IHttpClient HttpClient { get; private set; }
 
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="RottenTomatoesMovieProvider"/> class.
-        /// </summary>
-        /// <param name="logManager">The log manager.</param>
-        /// <param name="configurationManager">The configuration manager.</param>
-        /// <param name="jsonSerializer">The json serializer.</param>
-        /// <param name="httpClient">The HTTP client.</param>
-        public RottenTomatoesMovieReviewsProvider(ILogManager logManager, IServerConfigurationManager configurationManager, IJsonSerializer jsonSerializer, IHttpClient httpClient)
+        public OpenMovieDatabaseProvider(ILogManager logManager, IServerConfigurationManager configurationManager, IJsonSerializer jsonSerializer, IHttpClient httpClient)
             : base(logManager, configurationManager)
             : base(logManager, configurationManager)
         {
         {
             JsonSerializer = jsonSerializer;
             JsonSerializer = jsonSerializer;
@@ -57,7 +44,7 @@ namespace MediaBrowser.Controller.Providers.Movies
         {
         {
             get
             get
             {
             {
-                return "5";
+                return "6";
             }
             }
         }
         }
 
 
@@ -92,15 +79,14 @@ namespace MediaBrowser.Controller.Providers.Movies
         /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
         /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
         public override bool Supports(BaseItem item)
         public override bool Supports(BaseItem item)
         {
         {
-            return false;
             var trailer = item as Trailer;
             var trailer = item as Trailer;
 
 
+            // Don't support local trailers
             if (trailer != null)
             if (trailer != null)
             {
             {
                 return !trailer.IsLocalTrailer;
                 return !trailer.IsLocalTrailer;
             }
             }
 
 
-            // Don't support local trailers
             return item is Movie;
             return item is Movie;
         }
         }
 
 
@@ -136,7 +122,7 @@ namespace MediaBrowser.Controller.Providers.Movies
         protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo)
         protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo)
         {
         {
             // Refresh if rt id has changed
             // Refresh if rt id has changed
-            if (providerInfo.Data != GetComparisonData(item.GetProviderId(MetadataProviders.RottenTomatoes)))
+            if (providerInfo.Data != GetComparisonData(item.GetProviderId(MetadataProviders.Imdb)))
             {
             {
                 return true;
                 return true;
             }
             }
@@ -144,13 +130,8 @@ namespace MediaBrowser.Controller.Providers.Movies
             return base.NeedsRefreshInternal(item, providerInfo);
             return base.NeedsRefreshInternal(item, providerInfo);
         }
         }
 
 
-        /// <summary>
-        /// Fetches metadata and returns true or false indicating if any work that requires persistence was done
-        /// </summary>
-        /// <param name="item">The item.</param>
-        /// <param name="force">if set to <c>true</c> [force].</param>
-        /// <param name="cancellationToken">The cancellation token.</param>
-        /// <returns>Task{System.Boolean}.</returns>
+        protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
+        
         public override async Task<bool> FetchAsync(BaseItem item, bool force, CancellationToken cancellationToken)
         public override async Task<bool> FetchAsync(BaseItem item, bool force, CancellationToken cancellationToken)
         {
         {
             BaseProviderInfo data;
             BaseProviderInfo data;
@@ -161,76 +142,85 @@ namespace MediaBrowser.Controller.Providers.Movies
                 item.ProviderData[Id] = data;
                 item.ProviderData[Id] = data;
             }
             }
 
 
-            var rottenTomatoesId = item.GetProviderId(MetadataProviders.RottenTomatoes);
+            var imdbId = item.GetProviderId(MetadataProviders.Imdb);
 
 
-            
-            if (string.IsNullOrEmpty(rottenTomatoesId))
+            if (string.IsNullOrEmpty(imdbId))
             {
             {
-                data.Data = GetComparisonData(rottenTomatoesId);
+                data.Data = GetComparisonData(imdbId);
                 data.LastRefreshStatus = ProviderRefreshStatus.Success;
                 data.LastRefreshStatus = ProviderRefreshStatus.Success;
                 return true;
                 return true;
             }
             }
 
 
+            var imdbParam = imdbId.StartsWith("tt", StringComparison.OrdinalIgnoreCase) ? imdbId : "tt" + imdbId;
+
+            var url = string.Format("http://www.omdbapi.com/?i={0}&tomatoes=true", imdbParam);
+
             using (var stream = await HttpClient.Get(new HttpRequestOptions
             using (var stream = await HttpClient.Get(new HttpRequestOptions
             {
             {
-                Url = GetMovieReviewsUrl(rottenTomatoesId),
-                ResourcePool = RottenTomatoesMovieProvider.Current.RottenTomatoesResourcePool,
+                Url = url,
+                ResourcePool = _resourcePool,
                 CancellationToken = cancellationToken,
                 CancellationToken = cancellationToken,
                 EnableResponseCache = true
                 EnableResponseCache = true
 
 
             }).ConfigureAwait(false))
             }).ConfigureAwait(false))
             {
             {
+                var result = JsonSerializer.DeserializeFromStream<RootObject>(stream);
 
 
-                var result = JsonSerializer.DeserializeFromStream<RTReviewList>(stream);
+                int tomatoMeter;
 
 
-                item.CriticReviews = result.reviews.Select(rtReview => new ItemReview
+                if (!string.IsNullOrEmpty(result.tomatoMeter) && int.TryParse(result.tomatoMeter, NumberStyles.Integer, UsCulture, out tomatoMeter))
                 {
                 {
-                    ReviewerName = rtReview.critic,
-                    Publisher = rtReview.publication,
-                    Date = DateTime.Parse(rtReview.date).ToUniversalTime(),
-                    Caption = rtReview.quote,
-                    Url = rtReview.links.review,
-                    Likes = string.Equals(rtReview.freshness, "fresh", StringComparison.OrdinalIgnoreCase)
-
-                }).ToList();
-            }
+                    item.CriticRating = tomatoMeter;
+                }
 
 
-            data.Data = GetComparisonData(rottenTomatoesId);
+                if (!string.IsNullOrEmpty(result.tomatoConsensus)
+                    && !string.Equals(result.tomatoConsensus, "n/a", StringComparison.OrdinalIgnoreCase)
+                    && !string.Equals(result.tomatoConsensus, "No consensus yet.", StringComparison.OrdinalIgnoreCase))
+                {
+                    item.CriticRatingSummary = result.tomatoConsensus;
+                }
+            }
+            
+            data.Data = GetComparisonData(item.GetProviderId(MetadataProviders.Imdb));
             data.LastRefreshStatus = ProviderRefreshStatus.Success;
             data.LastRefreshStatus = ProviderRefreshStatus.Success;
             SetLastRefreshed(item, DateTime.UtcNow);
             SetLastRefreshed(item, DateTime.UtcNow);
 
 
             return true;
             return true;
         }
         }
 
 
-        // Utility functions to get the URL of the API calls
-
-        private string GetMovieReviewsUrl(string rtId)
-        {
-            return RottenTomatoesMovieProvider.BasicUrl + string.Format(MoviesReviews, RottenTomatoesMovieProvider.ApiKey, rtId);
-        }
-
-        // Data contract classes for use with the Rotten Tomatoes API
-
-        protected class RTReviewList
-        {
-            public int total { get; set; }
-            public List<RTReview> reviews { get; set; }
-        }
-
-        protected class RTReview
-        {
-            public string critic { get; set; }
-            public string date { get; set; }
-            public string freshness { get; set; }
-            public string publication { get; set; }
-            public string quote { get; set; }
-            public RTReviewLink links { get; set; }
-            public string original_score { get; set; }
-        }
 
 
-        protected class RTReviewLink
+        protected class RootObject
         {
         {
-            public string review { get; set; }
+            public string Title { get; set; }
+            public string Year { get; set; }
+            public string Rated { get; set; }
+            public string Released { get; set; }
+            public string Runtime { get; set; }
+            public string Genre { get; set; }
+            public string Director { get; set; }
+            public string Writer { get; set; }
+            public string Actors { get; set; }
+            public string Plot { get; set; }
+            public string Poster { get; set; }
+            public string imdbRating { get; set; }
+            public string imdbVotes { get; set; }
+            public string imdbID { get; set; }
+            public string Type { get; set; }
+            public string tomatoMeter { get; set; }
+            public string tomatoImage { get; set; }
+            public string tomatoRating { get; set; }
+            public string tomatoReviews { get; set; }
+            public string tomatoFresh { get; set; }
+            public string tomatoRotten { get; set; }
+            public string tomatoConsensus { get; set; }
+            public string tomatoUserMeter { get; set; }
+            public string tomatoUserRating { get; set; }
+            public string tomatoUserReviews { get; set; }
+            public string DVD { get; set; }
+            public string BoxOffice { get; set; }
+            public string Production { get; set; }
+            public string Website { get; set; }
+            public string Response { get; set; }
         }
         }
     }
     }
-}
+}

+ 83 - 28
MediaBrowser.Controller/Providers/Movies/RottenTomatoesMovieProvider.cs

@@ -17,23 +17,18 @@ namespace MediaBrowser.Controller.Providers.Movies
     /// <summary>
     /// <summary>
     /// Class RottenTomatoesMovieProvider
     /// Class RottenTomatoesMovieProvider
     /// </summary>
     /// </summary>
-    public class RottenTomatoesMovieProvider : BaseMetadataProvider
+    public class RottenTomatoesProvider : BaseMetadataProvider
     {
     {
         // http://developer.rottentomatoes.com/iodocs
         // http://developer.rottentomatoes.com/iodocs
-        /// <summary>
-        /// The API key
-        /// </summary>
-        internal const string ApiKey = "x9wjnvv39ntjmt9zs95nm7bg";
 
 
-        internal const string BasicUrl = @"http://api.rottentomatoes.com/api/public/v1.0/";
-        private const string MovieImdb = @"movie_alias.json?id={1}&type=imdb&apikey={0}";
+        private const string MoviesReviews = @"movies/{1}/reviews.json?review_type=top_critic&page_limit=10&page=1&country=us&apikey={0}";
 
 
-        internal static RottenTomatoesMovieProvider Current { get; private set; }
+        private const string ApiKey = "x9wjnvv39ntjmt9zs95nm7bg";
 
 
-        /// <summary>
-        /// The _rotten tomatoes resource pool
-        /// </summary>
-        internal readonly SemaphoreSlim RottenTomatoesResourcePool = new SemaphoreSlim(1, 1);
+        private const string BasicUrl = @"http://api.rottentomatoes.com/api/public/v1.0/";
+        private const string MovieImdb = @"movie_alias.json?id={1}&type=imdb&apikey={0}";
+
+        private readonly SemaphoreSlim _rottenTomatoesResourcePool = new SemaphoreSlim(1, 1);
 
 
         /// <summary>
         /// <summary>
         /// Gets the json serializer.
         /// Gets the json serializer.
@@ -54,12 +49,11 @@ namespace MediaBrowser.Controller.Providers.Movies
         /// <param name="configurationManager">The configuration manager.</param>
         /// <param name="configurationManager">The configuration manager.</param>
         /// <param name="jsonSerializer">The json serializer.</param>
         /// <param name="jsonSerializer">The json serializer.</param>
         /// <param name="httpClient">The HTTP client.</param>
         /// <param name="httpClient">The HTTP client.</param>
-        public RottenTomatoesMovieProvider(ILogManager logManager, IServerConfigurationManager configurationManager, IJsonSerializer jsonSerializer, IHttpClient httpClient)
+        public RottenTomatoesProvider(ILogManager logManager, IServerConfigurationManager configurationManager, IJsonSerializer jsonSerializer, IHttpClient httpClient)
             : base(logManager, configurationManager)
             : base(logManager, configurationManager)
         {
         {
             JsonSerializer = jsonSerializer;
             JsonSerializer = jsonSerializer;
             HttpClient = httpClient;
             HttpClient = httpClient;
-            Current = this;
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -136,7 +130,7 @@ namespace MediaBrowser.Controller.Providers.Movies
             get
             get
             {
             {
                 // Run after moviedb and xml providers
                 // Run after moviedb and xml providers
-                return MetadataProviderPriority.Third;
+                return MetadataProviderPriority.Last;
             }
             }
         }
         }
 
 
@@ -148,7 +142,7 @@ namespace MediaBrowser.Controller.Providers.Movies
         /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
         /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
         protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo)
         protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo)
         {
         {
-            // Refresh if imdb id has changed
+            // Refresh if rt id has changed
             if (providerInfo.Data != GetComparisonData(item.GetProviderId(MetadataProviders.Imdb)))
             if (providerInfo.Data != GetComparisonData(item.GetProviderId(MetadataProviders.Imdb)))
             {
             {
                 return true;
                 return true;
@@ -175,7 +169,7 @@ namespace MediaBrowser.Controller.Providers.Movies
             }
             }
 
 
             var imdbId = item.GetProviderId(MetadataProviders.Imdb);
             var imdbId = item.GetProviderId(MetadataProviders.Imdb);
-            
+
             if (string.IsNullOrEmpty(imdbId))
             if (string.IsNullOrEmpty(imdbId))
             {
             {
                 data.Data = GetComparisonData(imdbId);
                 data.Data = GetComparisonData(imdbId);
@@ -183,11 +177,54 @@ namespace MediaBrowser.Controller.Providers.Movies
                 return true;
                 return true;
             }
             }
 
 
+            await FetchRottenTomatoesId(item, cancellationToken).ConfigureAwait(false);
+
+            using (var stream = await HttpClient.Get(new HttpRequestOptions
+            {
+                Url = GetMovieReviewsUrl(item.GetProviderId(MetadataProviders.RottenTomatoes)),
+                ResourcePool = _rottenTomatoesResourcePool,
+                CancellationToken = cancellationToken,
+                EnableResponseCache = true
+
+            }).ConfigureAwait(false))
+            {
+
+                var result = JsonSerializer.DeserializeFromStream<RTReviewList>(stream);
+
+                item.CriticReviews = result.reviews.Select(rtReview => new ItemReview
+                {
+                    ReviewerName = rtReview.critic,
+                    Publisher = rtReview.publication,
+                    Date = DateTime.Parse(rtReview.date).ToUniversalTime(),
+                    Caption = rtReview.quote,
+                    Url = rtReview.links.review,
+                    Likes = string.Equals(rtReview.freshness, "fresh", StringComparison.OrdinalIgnoreCase)
+
+                }).ToList();
+            }
+
+            data.Data = GetComparisonData(item.GetProviderId(MetadataProviders.Imdb));
+            data.LastRefreshStatus = ProviderRefreshStatus.Success;
+            SetLastRefreshed(item, DateTime.UtcNow);
+
+            return true;
+        }
+
+        /// <summary>
+        /// Fetches the rotten tomatoes id.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        /// <param name="cancellationToken">The cancellation token.</param>
+        /// <returns>Task.</returns>
+        private async Task FetchRottenTomatoesId(BaseItem item, CancellationToken cancellationToken)
+        {
+            var imdbId = item.GetProviderId(MetadataProviders.Imdb);
+
             // Have IMDB Id
             // Have IMDB Id
             using (var stream = await HttpClient.Get(new HttpRequestOptions
             using (var stream = await HttpClient.Get(new HttpRequestOptions
             {
             {
                 Url = GetMovieImdbUrl(imdbId),
                 Url = GetMovieImdbUrl(imdbId),
-                ResourcePool = RottenTomatoesResourcePool,
+                ResourcePool = _rottenTomatoesResourcePool,
                 CancellationToken = cancellationToken,
                 CancellationToken = cancellationToken,
                 EnableResponseCache = true
                 EnableResponseCache = true
 
 
@@ -201,23 +238,18 @@ namespace MediaBrowser.Controller.Providers.Movies
                     item.CriticRatingSummary = hit.critics_consensus;
                     item.CriticRatingSummary = hit.critics_consensus;
                     item.CriticRating = float.Parse(hit.ratings.critics_score);
                     item.CriticRating = float.Parse(hit.ratings.critics_score);
 
 
-                    data.Data = GetComparisonData(hit.alternate_ids.imdb);
-
-                    item.SetProviderId(MetadataProviders.Imdb, hit.alternate_ids.imdb);
                     item.SetProviderId(MetadataProviders.RottenTomatoes, hit.id);
                     item.SetProviderId(MetadataProviders.RottenTomatoes, hit.id);
                 }
                 }
             }
             }
-
-            data.Data = GetComparisonData(imdbId);
-            data.LastRefreshStatus = ProviderRefreshStatus.Success;
-
-            SetLastRefreshed(item, DateTime.UtcNow);
-
-            return true;
         }
         }
 
 
+
         // Utility functions to get the URL of the API calls
         // Utility functions to get the URL of the API calls
 
 
+        private string GetMovieReviewsUrl(string rtId)
+        {
+            return BasicUrl + string.Format(MoviesReviews, ApiKey, rtId);
+        }
         private string GetMovieImdbUrl(string imdbId)
         private string GetMovieImdbUrl(string imdbId)
         {
         {
             return BasicUrl + string.Format(MovieImdb, ApiKey, imdbId.TrimStart('t'));
             return BasicUrl + string.Format(MovieImdb, ApiKey, imdbId.TrimStart('t'));
@@ -225,6 +257,28 @@ namespace MediaBrowser.Controller.Providers.Movies
 
 
         // Data contract classes for use with the Rotten Tomatoes API
         // Data contract classes for use with the Rotten Tomatoes API
 
 
+        protected class RTReviewList
+        {
+            public int total { get; set; }
+            public List<RTReview> reviews { get; set; }
+        }
+
+        protected class RTReview
+        {
+            public string critic { get; set; }
+            public string date { get; set; }
+            public string freshness { get; set; }
+            public string publication { get; set; }
+            public string quote { get; set; }
+            public RTReviewLink links { get; set; }
+            public string original_score { get; set; }
+        }
+
+        protected class RTReviewLink
+        {
+            public string review { get; set; }
+        }
+
         protected class RTSearchResults
         protected class RTSearchResults
         {
         {
             public int total { get; set; }
             public int total { get; set; }
@@ -263,5 +317,6 @@ namespace MediaBrowser.Controller.Providers.Movies
         {
         {
             public string imdb { get; set; }
             public string imdb { get; set; }
         }
         }
+
     }
     }
 }
 }

+ 111 - 169
MediaBrowser.Controller/Providers/Movies/TmdbPersonProvider.cs

@@ -24,7 +24,7 @@ namespace MediaBrowser.Controller.Providers.Movies
         /// <summary>
         /// <summary>
         /// The meta file name
         /// The meta file name
         /// </summary>
         /// </summary>
-        protected const string MetaFileName = "mbperson.json";
+        protected const string MetaFileName = "tmdb3.json";
 
 
         protected readonly IProviderManager ProviderManager;
         protected readonly IProviderManager ProviderManager;
         
         
@@ -66,6 +66,22 @@ namespace MediaBrowser.Controller.Providers.Movies
             return item is Person;
             return item is Person;
         }
         }
 
 
+        protected override bool RefreshOnVersionChange
+        {
+            get
+            {
+                return true;
+            }
+        }
+
+        protected override string ProviderVersion
+        {
+            get
+            {
+                return "2";
+            }
+        }
+        
         /// <summary>
         /// <summary>
         /// Needses the refresh internal.
         /// Needses the refresh internal.
         /// </summary>
         /// </summary>
@@ -74,6 +90,11 @@ namespace MediaBrowser.Controller.Providers.Movies
         /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
         /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
         protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo)
         protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo)
         {
         {
+            if (RefreshOnVersionChange && !String.Equals(ProviderVersion, providerInfo.ProviderVersion))
+            {
+                return true;
+            }
+            
             //we fetch if either info or image needed and haven't already tried recently
             //we fetch if either info or image needed and haven't already tried recently
             return (string.IsNullOrEmpty(item.PrimaryImagePath) || !item.ResolveArgs.ContainsMetaFileByName(MetaFileName))
             return (string.IsNullOrEmpty(item.PrimaryImagePath) || !item.ResolveArgs.ContainsMetaFileByName(MetaFileName))
                 && DateTime.Today.Subtract(providerInfo.LastRefreshed).TotalDays > ConfigurationManager.Configuration.MetadataRefreshDays;
                 && DateTime.Today.Subtract(providerInfo.LastRefreshed).TotalDays > ConfigurationManager.Configuration.MetadataRefreshDays;
@@ -91,7 +112,6 @@ namespace MediaBrowser.Controller.Providers.Movies
             cancellationToken.ThrowIfCancellationRequested();
             cancellationToken.ThrowIfCancellationRequested();
 
 
             var person = (Person)item;
             var person = (Person)item;
-            var tasks = new List<Task>();
 
 
             var id = person.GetProviderId(MetadataProviders.Tmdb);
             var id = person.GetProviderId(MetadataProviders.Tmdb);
 
 
@@ -105,20 +125,7 @@ namespace MediaBrowser.Controller.Providers.Movies
 
 
             if (!string.IsNullOrEmpty(id))
             if (!string.IsNullOrEmpty(id))
             {
             {
-                //get info only if not already saved
-                if (!item.ResolveArgs.ContainsMetaFileByName(MetaFileName))
-                {
-                    tasks.Add(FetchInfo(person, id, cancellationToken));
-                }
-
-                //get image only if not already there
-                if (string.IsNullOrEmpty(item.PrimaryImagePath))
-                {
-                    tasks.Add(FetchImages(person, id, cancellationToken));
-                }
-
-                //and wait for them to complete
-                await Task.WhenAll(tasks).ConfigureAwait(false);
+                await FetchInfo(person, id, cancellationToken).ConfigureAwait(false);
             }
             }
             else
             else
             {
             {
@@ -150,6 +157,8 @@ namespace MediaBrowser.Controller.Providers.Movies
             }
             }
         }
         }
 
 
+        protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
+        
         /// <summary>
         /// <summary>
         /// Gets the TMDB id.
         /// Gets the TMDB id.
         /// </summary>
         /// </summary>
@@ -180,7 +189,7 @@ namespace MediaBrowser.Controller.Providers.Movies
             {
             {
             }
             }
 
 
-            return searchResult != null && searchResult.Total_Results > 0 ? searchResult.Results[0].Id.ToString() : null;
+            return searchResult != null && searchResult.Total_Results > 0 ? searchResult.Results[0].Id.ToString(UsCulture) : null;
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -192,12 +201,12 @@ namespace MediaBrowser.Controller.Providers.Movies
         /// <returns>Task.</returns>
         /// <returns>Task.</returns>
         private async Task FetchInfo(Person person, string id, CancellationToken cancellationToken)
         private async Task FetchInfo(Person person, string id, CancellationToken cancellationToken)
         {
         {
-            string url = string.Format(@"http://api.themoviedb.org/3/person/{1}?api_key={0}", MovieDbProvider.ApiKey, id);
+            string url = string.Format(@"http://api.themoviedb.org/3/person/{1}?api_key={0}&append_to_response=credits,images", MovieDbProvider.ApiKey, id);
             PersonResult searchResult = null;
             PersonResult searchResult = null;
 
 
             try
             try
             {
             {
-                using (Stream json = await HttpClient.Get(new HttpRequestOptions
+                using (var json = await HttpClient.Get(new HttpRequestOptions
                 {
                 {
                     Url = url,
                     Url = url,
                     CancellationToken = cancellationToken,
                     CancellationToken = cancellationToken,
@@ -207,10 +216,7 @@ namespace MediaBrowser.Controller.Providers.Movies
 
 
                 }).ConfigureAwait(false))
                 }).ConfigureAwait(false))
                 {
                 {
-                    if (json != null)
-                    {
-                        searchResult = JsonSerializer.DeserializeFromStream<PersonResult>(json);
-                    }
+                    searchResult = JsonSerializer.DeserializeFromStream<PersonResult>(json);
                 }
                 }
             }
             }
             catch (HttpException)
             catch (HttpException)
@@ -219,7 +225,7 @@ namespace MediaBrowser.Controller.Providers.Movies
 
 
             cancellationToken.ThrowIfCancellationRequested();
             cancellationToken.ThrowIfCancellationRequested();
 
 
-            if (searchResult != null && searchResult.Biography != null)
+            if (searchResult != null)
             {
             {
                 ProcessInfo(person, searchResult);
                 ProcessInfo(person, searchResult);
 
 
@@ -231,6 +237,8 @@ namespace MediaBrowser.Controller.Providers.Movies
                 await ProviderManager.SaveToLibraryFilesystem(person, Path.Combine(person.MetaLocation, MetaFileName), memoryStream, cancellationToken);
                 await ProviderManager.SaveToLibraryFilesystem(person, Path.Combine(person.MetaLocation, MetaFileName), memoryStream, cancellationToken);
 
 
                 Logger.Debug("TmdbPersonProvider downloaded and saved information for {0}", person.Name);
                 Logger.Debug("TmdbPersonProvider downloaded and saved information for {0}", person.Name);
+
+                await FetchImages(person, searchResult.images, cancellationToken).ConfigureAwait(false);
             }
             }
         }
         }
 
 
@@ -241,99 +249,73 @@ namespace MediaBrowser.Controller.Providers.Movies
         /// <param name="searchResult">The search result.</param>
         /// <param name="searchResult">The search result.</param>
         protected void ProcessInfo(Person person, PersonResult searchResult)
         protected void ProcessInfo(Person person, PersonResult searchResult)
         {
         {
-            person.Overview = searchResult.Biography;
+            person.Overview = searchResult.biography;
 
 
             DateTime date;
             DateTime date;
 
 
-            if (DateTime.TryParseExact(searchResult.Birthday, "yyyy-MM-dd", new CultureInfo("en-US"), DateTimeStyles.None, out date))
+            if (DateTime.TryParseExact(searchResult.birthday, "yyyy-MM-dd", new CultureInfo("en-US"), DateTimeStyles.None, out date))
             {
             {
                 person.PremiereDate = date.ToUniversalTime();
                 person.PremiereDate = date.ToUniversalTime();
             }
             }
 
 
-            if (DateTime.TryParseExact(searchResult.Deathday, "yyyy-MM-dd", new CultureInfo("en-US"), DateTimeStyles.None, out date))
+            if (DateTime.TryParseExact(searchResult.deathday, "yyyy-MM-dd", new CultureInfo("en-US"), DateTimeStyles.None, out date))
             {
             {
                 person.EndDate = date.ToUniversalTime();
                 person.EndDate = date.ToUniversalTime();
             }
             }
 
 
-            if (!string.IsNullOrEmpty(searchResult.Homepage))
+            if (!string.IsNullOrEmpty(searchResult.homepage))
             {
             {
-                person.HomePageUrl = searchResult.Homepage;
+                person.HomePageUrl = searchResult.homepage;
             }
             }
 
 
-            if (!string.IsNullOrEmpty(searchResult.Place_Of_Birth))
+            if (!string.IsNullOrEmpty(searchResult.place_of_birth))
             {
             {
-                person.AddProductionLocation(searchResult.Place_Of_Birth);
+                person.AddProductionLocation(searchResult.place_of_birth);
             }
             }
             
             
-            person.SetProviderId(MetadataProviders.Tmdb, searchResult.Id.ToString());
+            person.SetProviderId(MetadataProviders.Tmdb, searchResult.id.ToString(UsCulture));
         }
         }
 
 
         /// <summary>
         /// <summary>
         /// Fetches the images.
         /// Fetches the images.
         /// </summary>
         /// </summary>
         /// <param name="person">The person.</param>
         /// <param name="person">The person.</param>
-        /// <param name="id">The id.</param>
+        /// <param name="searchResult">The search result.</param>
         /// <param name="cancellationToken">The cancellation token.</param>
         /// <param name="cancellationToken">The cancellation token.</param>
         /// <returns>Task.</returns>
         /// <returns>Task.</returns>
-        private async Task FetchImages(Person person, string id, CancellationToken cancellationToken)
+        private async Task FetchImages(Person person, Images searchResult, CancellationToken cancellationToken)
         {
         {
-            string url = string.Format(@"http://api.themoviedb.org/3/person/{1}/images?api_key={0}", MovieDbProvider.ApiKey, id);
-
-            PersonImages searchResult = null;
-
-            try
-            {
-                using (Stream json = await HttpClient.Get(new HttpRequestOptions
-                {
-                    Url = url,
-                    CancellationToken = cancellationToken,
-                    ResourcePool = MovieDbProvider.Current.MovieDbResourcePool,
-                    AcceptHeader = MovieDbProvider.AcceptHeader,
-                    EnableResponseCache = true
-
-                }).ConfigureAwait(false))
-                {
-                    if (json != null)
-                    {
-                        searchResult = JsonSerializer.DeserializeFromStream<PersonImages>(json);
-                    }
-                }
-            }
-            catch (HttpException)
-            {
-            }
-
-            if (searchResult != null && searchResult.Profiles.Count > 0)
+            if (searchResult != null && searchResult.profiles.Count > 0)
             {
             {
                 //get our language
                 //get our language
                 var profile =
                 var profile =
-                    searchResult.Profiles.FirstOrDefault(
+                    searchResult.profiles.FirstOrDefault(
                         p =>
                         p =>
-                        !string.IsNullOrEmpty(p.Iso_639_1) &&
-                        p.Iso_639_1.Equals(ConfigurationManager.Configuration.PreferredMetadataLanguage,
+                        !string.IsNullOrEmpty(GetIso639(p)) &&
+                        GetIso639(p).Equals(ConfigurationManager.Configuration.PreferredMetadataLanguage,
                                           StringComparison.OrdinalIgnoreCase));
                                           StringComparison.OrdinalIgnoreCase));
                 if (profile == null)
                 if (profile == null)
                 {
                 {
                     //didn't find our language - try first null one
                     //didn't find our language - try first null one
                     profile =
                     profile =
-                        searchResult.Profiles.FirstOrDefault(
+                        searchResult.profiles.FirstOrDefault(
                             p =>
                             p =>
-                                !string.IsNullOrEmpty(p.Iso_639_1) &&
-                            p.Iso_639_1.Equals(ConfigurationManager.Configuration.PreferredMetadataLanguage,
+                                !string.IsNullOrEmpty(GetIso639(p)) &&
+                            GetIso639(p).Equals(ConfigurationManager.Configuration.PreferredMetadataLanguage,
                                               StringComparison.OrdinalIgnoreCase));
                                               StringComparison.OrdinalIgnoreCase));
 
 
                 }
                 }
                 if (profile == null)
                 if (profile == null)
                 {
                 {
                     //still nothing - just get first one
                     //still nothing - just get first one
-                    profile = searchResult.Profiles[0];
+                    profile = searchResult.profiles[0];
                 }
                 }
                 if (profile != null)
                 if (profile != null)
                 {
                 {
                     var tmdbSettings = await MovieDbProvider.Current.TmdbSettings.ConfigureAwait(false);
                     var tmdbSettings = await MovieDbProvider.Current.TmdbSettings.ConfigureAwait(false);
 
 
-                    var img = await DownloadAndSaveImage(person, tmdbSettings.images.base_url + ConfigurationManager.Configuration.TmdbFetchedProfileSize + profile.File_Path,
-                                             "folder" + Path.GetExtension(profile.File_Path), cancellationToken).ConfigureAwait(false);
+                    var img = await DownloadAndSaveImage(person, tmdbSettings.images.base_url + ConfigurationManager.Configuration.TmdbFetchedProfileSize + profile.file_path,
+                                             "folder" + Path.GetExtension(profile.file_path), cancellationToken).ConfigureAwait(false);
 
 
                     if (!string.IsNullOrEmpty(img))
                     if (!string.IsNullOrEmpty(img))
                     {
                     {
@@ -343,6 +325,11 @@ namespace MediaBrowser.Controller.Providers.Movies
             }
             }
         }
         }
 
 
+        private string GetIso639(Profile p)
+        {
+            return p.iso_639_1 == null ? string.Empty : p.iso_639_1.ToString();
+        }
+
         /// <summary>
         /// <summary>
         /// Downloads the and save image.
         /// Downloads the and save image.
         /// </summary>
         /// </summary>
@@ -373,7 +360,7 @@ namespace MediaBrowser.Controller.Providers.Movies
         /// <summary>
         /// <summary>
         /// Class PersonSearchResult
         /// Class PersonSearchResult
         /// </summary>
         /// </summary>
-        public class PersonSearchResult
+        protected class PersonSearchResult
         {
         {
             /// <summary>
             /// <summary>
             /// Gets or sets a value indicating whether this <see cref="PersonSearchResult" /> is adult.
             /// Gets or sets a value indicating whether this <see cref="PersonSearchResult" /> is adult.
@@ -400,7 +387,7 @@ namespace MediaBrowser.Controller.Providers.Movies
         /// <summary>
         /// <summary>
         /// Class PersonSearchResults
         /// Class PersonSearchResults
         /// </summary>
         /// </summary>
-        public class PersonSearchResults
+        protected class PersonSearchResults
         {
         {
             /// <summary>
             /// <summary>
             /// Gets or sets the page.
             /// Gets or sets the page.
@@ -424,110 +411,65 @@ namespace MediaBrowser.Controller.Providers.Movies
             public int Total_Results { get; set; }
             public int Total_Results { get; set; }
         }
         }
 
 
-        /// <summary>
-        /// Class PersonResult
-        /// </summary>
-        public class PersonResult
+        protected class Cast
         {
         {
-            /// <summary>
-            /// Gets or sets a value indicating whether this <see cref="PersonResult" /> is adult.
-            /// </summary>
-            /// <value><c>true</c> if adult; otherwise, <c>false</c>.</value>
-            public bool Adult { get; set; }
-            /// <summary>
-            /// Gets or sets the also_ known_ as.
-            /// </summary>
-            /// <value>The also_ known_ as.</value>
-            public List<object> Also_Known_As { get; set; }
-            /// <summary>
-            /// Gets or sets the biography.
-            /// </summary>
-            /// <value>The biography.</value>
-            public string Biography { get; set; }
-            /// <summary>
-            /// Gets or sets the birthday.
-            /// </summary>
-            /// <value>The birthday.</value>
-            public string Birthday { get; set; }
-            /// <summary>
-            /// Gets or sets the deathday.
-            /// </summary>
-            /// <value>The deathday.</value>
-            public string Deathday { get; set; }
-            /// <summary>
-            /// Gets or sets the homepage.
-            /// </summary>
-            /// <value>The homepage.</value>
-            public string Homepage { get; set; }
-            /// <summary>
-            /// Gets or sets the id.
-            /// </summary>
-            /// <value>The id.</value>
-            public int Id { get; set; }
-            /// <summary>
-            /// Gets or sets the name.
-            /// </summary>
-            /// <value>The name.</value>
-            public string Name { get; set; }
-            /// <summary>
-            /// Gets or sets the place_ of_ birth.
-            /// </summary>
-            /// <value>The place_ of_ birth.</value>
-            public string Place_Of_Birth { get; set; }
-            /// <summary>
-            /// Gets or sets the profile_ path.
-            /// </summary>
-            /// <value>The profile_ path.</value>
-            public string Profile_Path { get; set; }
+            public int id { get; set; }
+            public string title { get; set; }
+            public string character { get; set; }
+            public string original_title { get; set; }
+            public string poster_path { get; set; }
+            public string release_date { get; set; }
+            public bool adult { get; set; }
         }
         }
 
 
-        /// <summary>
-        /// Class PersonProfile
-        /// </summary>
-        public class PersonProfile
+        protected class Crew
         {
         {
-            /// <summary>
-            /// Gets or sets the aspect_ ratio.
-            /// </summary>
-            /// <value>The aspect_ ratio.</value>
-            public double Aspect_Ratio { get; set; }
-            /// <summary>
-            /// Gets or sets the file_ path.
-            /// </summary>
-            /// <value>The file_ path.</value>
-            public string File_Path { get; set; }
-            /// <summary>
-            /// Gets or sets the height.
-            /// </summary>
-            /// <value>The height.</value>
-            public int Height { get; set; }
-            /// <summary>
-            /// Gets or sets the iso_639_1.
-            /// </summary>
-            /// <value>The iso_639_1.</value>
-            public string Iso_639_1 { get; set; }
-            /// <summary>
-            /// Gets or sets the width.
-            /// </summary>
-            /// <value>The width.</value>
-            public int Width { get; set; }
+            public int id { get; set; }
+            public string title { get; set; }
+            public string original_title { get; set; }
+            public string department { get; set; }
+            public string job { get; set; }
+            public string poster_path { get; set; }
+            public string release_date { get; set; }
+            public bool adult { get; set; }
         }
         }
 
 
-        /// <summary>
-        /// Class PersonImages
-        /// </summary>
-        public class PersonImages
+        protected class Credits
         {
         {
-            /// <summary>
-            /// Gets or sets the id.
-            /// </summary>
-            /// <value>The id.</value>
-            public int Id { get; set; }
-            /// <summary>
-            /// Gets or sets the profiles.
-            /// </summary>
-            /// <value>The profiles.</value>
-            public List<PersonProfile> Profiles { get; set; }
+            public List<Cast> cast { get; set; }
+            public List<Crew> crew { get; set; }
+        }
+
+        protected class Profile
+        {
+            public string file_path { get; set; }
+            public int width { get; set; }
+            public int height { get; set; }
+            public object iso_639_1 { get; set; }
+            public double aspect_ratio { get; set; }
+        }
+
+        protected class Images
+        {
+            public List<Profile> profiles { get; set; }
+        }
+
+        protected class PersonResult
+        {
+            public bool adult { get; set; }
+            public List<object> also_known_as { get; set; }
+            public string biography { get; set; }
+            public string birthday { get; set; }
+            public string deathday { get; set; }
+            public string homepage { get; set; }
+            public int id { get; set; }
+            public string imdb_id { get; set; }
+            public string name { get; set; }
+            public string place_of_birth { get; set; }
+            public double popularity { get; set; }
+            public string profile_path { get; set; }
+            public Credits credits { get; set; }
+            public Images images { get; set; }
         }
         }
 
 
         #endregion
         #endregion

+ 5 - 2
MediaBrowser.Controller/Providers/Music/FanArtArtistProvider.cs

@@ -1,4 +1,5 @@
-using MediaBrowser.Common.Net;
+using System.Globalization;
+using MediaBrowser.Common.Net;
 using MediaBrowser.Controller.Configuration;
 using MediaBrowser.Controller.Configuration;
 using MediaBrowser.Controller.Entities;
 using MediaBrowser.Controller.Entities;
 using MediaBrowser.Controller.Entities.Audio;
 using MediaBrowser.Controller.Entities.Audio;
@@ -99,6 +100,8 @@ namespace MediaBrowser.Controller.Providers.Music
             return base.NeedsRefreshInternal(item, providerInfo);
             return base.NeedsRefreshInternal(item, providerInfo);
         }
         }
 
 
+        protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
+        
         /// <summary>
         /// <summary>
         /// Fetches metadata and returns true or false indicating if any work that requires persistence was done
         /// Fetches metadata and returns true or false indicating if any work that requires persistence was done
         /// </summary>
         /// </summary>
@@ -178,7 +181,7 @@ namespace MediaBrowser.Controller.Providers.Music
                                 Logger.Debug("FanArtProvider getting Backdrop for " + item.Name);
                                 Logger.Debug("FanArtProvider getting Backdrop for " + item.Name);
                                 try
                                 try
                                 {
                                 {
-                                    item.BackdropImagePaths.Add(await _providerManager.DownloadAndSaveImage(item, path, ("Backdrop" + (numBackdrops > 0 ? numBackdrops.ToString() : "") + ".jpg"), SaveLocalMeta, FanArtResourcePool, cancellationToken).ConfigureAwait(false));
+                                    item.BackdropImagePaths.Add(await _providerManager.DownloadAndSaveImage(item, path, ("Backdrop" + (numBackdrops > 0 ? numBackdrops.ToString(UsCulture) : "") + ".jpg"), SaveLocalMeta, FanArtResourcePool, cancellationToken).ConfigureAwait(false));
                                     numBackdrops++;
                                     numBackdrops++;
                                     if (numBackdrops >= ConfigurationManager.Configuration.MaxBackdrops) break;
                                     if (numBackdrops >= ConfigurationManager.Configuration.MaxBackdrops) break;
                                 }
                                 }

+ 10 - 7
MediaBrowser.Controller/Providers/Music/LastfmArtistProvider.cs

@@ -55,15 +55,18 @@ namespace MediaBrowser.Controller.Providers.Music
             // Try to find the id using last fm
             // Try to find the id using last fm
             var result = await FindIdFromLastFm(item, cancellationToken).ConfigureAwait(false);
             var result = await FindIdFromLastFm(item, cancellationToken).ConfigureAwait(false);
 
 
-            if (!string.IsNullOrEmpty(result.Item1))
+            if (result != null)
             {
             {
-                return result.Item1;
-            }
+                if (!string.IsNullOrEmpty(result.Item1))
+                {
+                    return result.Item1;
+                }
 
 
-            // If there were no artists returned at all, then don't bother with musicbrainz
-            if (!result.Item2)
-            {
-                return null;
+                // If there were no artists returned at all, then don't bother with musicbrainz
+                if (!result.Item2)
+                {
+                    return null;
+                }
             }
             }
 
 
             try
             try

+ 1 - 1
MediaBrowser.Controller/Providers/Music/LastfmBaseProvider.cs

@@ -17,7 +17,7 @@ namespace MediaBrowser.Controller.Providers.Music
     /// </summary>
     /// </summary>
     public abstract class LastfmBaseProvider : BaseMetadataProvider
     public abstract class LastfmBaseProvider : BaseMetadataProvider
     {
     {
-        protected static readonly SemaphoreSlim LastfmResourcePool = new SemaphoreSlim(5, 5);
+        protected static readonly SemaphoreSlim LastfmResourcePool = new SemaphoreSlim(4, 4);
 
 
         /// <summary>
         /// <summary>
         /// Initializes a new instance of the <see cref="LastfmBaseProvider" /> class.
         /// Initializes a new instance of the <see cref="LastfmBaseProvider" /> class.

+ 5 - 2
MediaBrowser.Controller/Providers/TV/RemoteSeriesProvider.cs

@@ -1,4 +1,5 @@
-using MediaBrowser.Common.Extensions;
+using System.Globalization;
+using MediaBrowser.Common.Extensions;
 using MediaBrowser.Common.Net;
 using MediaBrowser.Common.Net;
 using MediaBrowser.Controller.Configuration;
 using MediaBrowser.Controller.Configuration;
 using MediaBrowser.Controller.Entities;
 using MediaBrowser.Controller.Entities;
@@ -364,6 +365,8 @@ namespace MediaBrowser.Controller.Providers.TV
             }
             }
         }
         }
 
 
+        protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
+        
         /// <summary>
         /// <summary>
         /// Fetches the images.
         /// Fetches the images.
         /// </summary>
         /// </summary>
@@ -455,7 +458,7 @@ namespace MediaBrowser.Controller.Providers.TV
                             var p = b.SelectSingleNode("./BannerPath");
                             var p = b.SelectSingleNode("./BannerPath");
                             if (p != null)
                             if (p != null)
                             {
                             {
-                                var bdName = "backdrop" + (bdNo > 0 ? bdNo.ToString() : "");
+                                var bdName = "backdrop" + (bdNo > 0 ? bdNo.ToString(UsCulture) : "");
                                 if (ConfigurationManager.Configuration.RefreshItemImages || !series.HasLocalImage(bdName))
                                 if (ConfigurationManager.Configuration.RefreshItemImages || !series.HasLocalImage(bdName))
                                 {
                                 {
                                     try
                                     try

+ 32 - 23
MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj

@@ -48,21 +48,21 @@
     <Reference Include="MoreLinq">
     <Reference Include="MoreLinq">
       <HintPath>..\packages\morelinq.1.0.15631-beta\lib\net35\MoreLinq.dll</HintPath>
       <HintPath>..\packages\morelinq.1.0.15631-beta\lib\net35\MoreLinq.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.3.9.43\lib\net35\ServiceStack.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.3.9.44\lib\net35\ServiceStack.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Api.Swagger, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Api.Swagger, Version=3.9.45.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Api.Swagger.3.9.43\lib\net35\ServiceStack.Api.Swagger.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Api.Swagger.3.9.45\lib\net35\ServiceStack.Api.Swagger.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Common, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Common, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Common.3.9.43\lib\net35\ServiceStack.Common.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Common.3.9.44\lib\net35\ServiceStack.Common.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Interfaces, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Interfaces, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Common.3.9.43\lib\net35\ServiceStack.Interfaces.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Common.3.9.44\lib\net35\ServiceStack.Interfaces.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="ServiceStack.OrmLite, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
     <Reference Include="ServiceStack.OrmLite, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
@@ -76,13 +76,13 @@
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\packages\ServiceStack.Redis.3.9.43\lib\net35\ServiceStack.Redis.dll</HintPath>
       <HintPath>..\packages\ServiceStack.Redis.3.9.43\lib\net35\ServiceStack.Redis.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.ServiceInterface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.ServiceInterface, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.3.9.43\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.3.9.44\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Text, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Text, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Text.3.9.43\lib\net35\ServiceStack.Text.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Text.3.9.44\lib\net35\ServiceStack.Text.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Core" />
@@ -203,20 +203,19 @@
     </ProjectReference>
     </ProjectReference>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <Content Include="x64\SQLite.Interop.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="x86\SQLite.Interop.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <EmbeddedResource Include="MediaEncoder\readme.txt" />
-    <Content Include="README.txt" />
+    <Content Include="swagger-ui\css\hightlight.default.css" />
     <Content Include="swagger-ui\css\screen.css">
     <Content Include="swagger-ui\css\screen.css">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
+    <Content Include="swagger-ui\images\logo_small.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="swagger-ui\images\pet_store_api.png">
     <Content Include="swagger-ui\images\pet_store_api.png">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
+    <Content Include="swagger-ui\images\throbber.gif">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="swagger-ui\images\wordnik_api.png">
     <Content Include="swagger-ui\images\wordnik_api.png">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
@@ -226,13 +225,16 @@
     <Content Include="swagger-ui\lib\backbone-min.js">
     <Content Include="swagger-ui\lib\backbone-min.js">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
-    <Content Include="swagger-ui\lib\handlebars.runtime-1.0.0.beta.6.js">
+    <Content Include="swagger-ui\lib\handlebars-1.0.rc.1.js">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
-    <Content Include="swagger-ui\lib\jquery.ba-bbq.min.js">
+    <Content Include="swagger-ui\lib\highlight.7.3.pack.js">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="swagger-ui\lib\jquery-1.8.0.min.js">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
-    <Content Include="swagger-ui\lib\jquery.min.js">
+    <Content Include="swagger-ui\lib\jquery.ba-bbq.min.js">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
     <Content Include="swagger-ui\lib\jquery.slideto.min.js">
     <Content Include="swagger-ui\lib\jquery.slideto.min.js">
@@ -253,6 +255,13 @@
     <Content Include="swagger-ui\swagger-ui.min.js">
     <Content Include="swagger-ui\swagger-ui.min.js">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
+    <Content Include="x64\SQLite.Interop.dll">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+    <Content Include="x86\SQLite.Interop.dll">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+    <EmbeddedResource Include="MediaEncoder\readme.txt" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="MediaEncoder\fonts\ARIALUNI.TTF" />
     <EmbeddedResource Include="MediaEncoder\fonts\ARIALUNI.TTF" />

+ 0 - 41
MediaBrowser.Server.Implementations/README.txt

@@ -1,41 +0,0 @@
-ServiceStack services should be available under '/api' path. If it's a brand new MVC project 
-install NuGet Package: ServiceStack.Host.Mvc. The package prepares ServiceStack default services. Make sure 
-that you added ignore for MVC routes:
-
-	routes.IgnoreRoute("api/{*pathInfo}"); 
-
-If it's MVC4 project, then don't forget to disable WebAPI:
-
-	//WebApiConfig.Register(GlobalConfiguration.Configuration);
- 
-Enable Swagger plugin in AppHost.cs with:
-
-    public override void Configure(Container container)
-    {
-		...
-
-        Plugins.Add(new SwaggerFeature());
-		// uncomment CORS feature if it's has to be available from external sites 
-        //Plugins.Add(new CorsFeature()); 
-		...
-
-    }
-
-Compile it. Now you can access swagger UI with:
-
-http://localost:port/swagger-ui/index.html
-
-or
-
-http://yoursite/swagger-ui/index.html
-
-
-For more info about ServiceStack please visit: http://www.servicestack.net
-
-Feel free to ask questions about ServiceStack on:
-http://stackoverflow.com/
-
-or on the mailing Group at:
-http://groups.google.com/group/servicestack
-
-Enjoy!

+ 4 - 4
MediaBrowser.Server.Implementations/packages.config

@@ -7,12 +7,12 @@
   <package id="Rx-Core" version="2.1.30214.0" targetFramework="net45" />
   <package id="Rx-Core" version="2.1.30214.0" targetFramework="net45" />
   <package id="Rx-Interfaces" version="2.1.30214.0" targetFramework="net45" />
   <package id="Rx-Interfaces" version="2.1.30214.0" targetFramework="net45" />
   <package id="Rx-Linq" version="2.1.30214.0" targetFramework="net45" />
   <package id="Rx-Linq" version="2.1.30214.0" targetFramework="net45" />
-  <package id="ServiceStack" version="3.9.43" targetFramework="net45" />
-  <package id="ServiceStack.Api.Swagger" version="3.9.43" targetFramework="net45" />
-  <package id="ServiceStack.Common" version="3.9.43" targetFramework="net45" />
+  <package id="ServiceStack" version="3.9.44" targetFramework="net45" />
+  <package id="ServiceStack.Api.Swagger" version="3.9.45" targetFramework="net45" />
+  <package id="ServiceStack.Common" version="3.9.44" targetFramework="net45" />
   <package id="ServiceStack.OrmLite.SqlServer" version="3.9.43" targetFramework="net45" />
   <package id="ServiceStack.OrmLite.SqlServer" version="3.9.43" targetFramework="net45" />
   <package id="ServiceStack.Redis" version="3.9.43" targetFramework="net45" />
   <package id="ServiceStack.Redis" version="3.9.43" targetFramework="net45" />
-  <package id="ServiceStack.Text" version="3.9.43" targetFramework="net45" />
+  <package id="ServiceStack.Text" version="3.9.44" targetFramework="net45" />
   <package id="SharpZipLib" version="0.86.0" targetFramework="net45" />
   <package id="SharpZipLib" version="0.86.0" targetFramework="net45" />
   <package id="System.Data.SQLite" version="1.0.85.0" targetFramework="net45" />
   <package id="System.Data.SQLite" version="1.0.85.0" targetFramework="net45" />
 </packages>
 </packages>

+ 135 - 0
MediaBrowser.Server.Implementations/swagger-ui/css/hightlight.default.css

@@ -0,0 +1,135 @@
+/*
+
+Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
+
+*/
+
+pre code {
+  display: block; padding: 0.5em;
+  background: #F0F0F0;
+}
+
+pre code,
+pre .subst,
+pre .tag .title,
+pre .lisp .title,
+pre .clojure .built_in,
+pre .nginx .title {
+  color: black;
+}
+
+pre .string,
+pre .title,
+pre .constant,
+pre .parent,
+pre .tag .value,
+pre .rules .value,
+pre .rules .value .number,
+pre .preprocessor,
+pre .ruby .symbol,
+pre .ruby .symbol .string,
+pre .aggregate,
+pre .template_tag,
+pre .django .variable,
+pre .smalltalk .class,
+pre .addition,
+pre .flow,
+pre .stream,
+pre .bash .variable,
+pre .apache .tag,
+pre .apache .cbracket,
+pre .tex .command,
+pre .tex .special,
+pre .erlang_repl .function_or_atom,
+pre .markdown .header {
+  color: #800;
+}
+
+pre .comment,
+pre .annotation,
+pre .template_comment,
+pre .diff .header,
+pre .chunk,
+pre .markdown .blockquote {
+  color: #888;
+}
+
+pre .number,
+pre .date,
+pre .regexp,
+pre .literal,
+pre .smalltalk .symbol,
+pre .smalltalk .char,
+pre .go .constant,
+pre .change,
+pre .markdown .bullet,
+pre .markdown .link_url {
+  color: #080;
+}
+
+pre .label,
+pre .javadoc,
+pre .ruby .string,
+pre .decorator,
+pre .filter .argument,
+pre .localvars,
+pre .array,
+pre .attr_selector,
+pre .important,
+pre .pseudo,
+pre .pi,
+pre .doctype,
+pre .deletion,
+pre .envvar,
+pre .shebang,
+pre .apache .sqbracket,
+pre .nginx .built_in,
+pre .tex .formula,
+pre .erlang_repl .reserved,
+pre .prompt,
+pre .markdown .link_label,
+pre .vhdl .attribute,
+pre .clojure .attribute,
+pre .coffeescript .property {
+  color: #88F
+}
+
+pre .keyword,
+pre .id,
+pre .phpdoc,
+pre .title,
+pre .built_in,
+pre .aggregate,
+pre .css .tag,
+pre .javadoctag,
+pre .phpdoc,
+pre .yardoctag,
+pre .smalltalk .class,
+pre .winutils,
+pre .bash .variable,
+pre .apache .tag,
+pre .go .typename,
+pre .tex .command,
+pre .markdown .strong,
+pre .request,
+pre .status {
+  font-weight: bold;
+}
+
+pre .markdown .emphasis {
+  font-style: italic;
+}
+
+pre .nginx .built_in {
+  font-weight: normal;
+}
+
+pre .coffeescript .javascript,
+pre .javascript .xml,
+pre .tex .formula,
+pre .xml .javascript,
+pre .xml .vbscript,
+pre .xml .css,
+pre .xml .cdata {
+  opacity: 0.5;
+}

+ 1633 - 833
MediaBrowser.Server.Implementations/swagger-ui/css/screen.css

@@ -11,81 +11,105 @@ article, aside, canvas, details, embed,
 figure, figcaption, footer, header, hgroup,
 figure, figcaption, footer, header, hgroup,
 menu, nav, output, ruby, section, summary,
 menu, nav, output, ruby, section, summary,
 time, mark, audio, video {
 time, mark, audio, video {
-  margin: 0;
-  padding: 0;
-  border: 0;
-  font-size: 100%;
-  font: inherit;
-  vertical-align: baseline; }
+    margin: 0;
+    padding: 0;
+    border: 0;
+    font-size: 100%;
+    font: inherit;
+    vertical-align: baseline;
+}
 
 
 body {
 body {
-  line-height: 1; }
+    line-height: 1;
+}
 
 
 ol, ul {
 ol, ul {
-  list-style: none; }
+    list-style: none;
+}
 
 
 table {
 table {
-  border-collapse: collapse;
-  border-spacing: 0; }
+    border-collapse: collapse;
+    border-spacing: 0;
+}
 
 
 caption, th, td {
 caption, th, td {
-  text-align: left;
-  font-weight: normal;
-  vertical-align: middle; }
+    text-align: left;
+    font-weight: normal;
+    vertical-align: middle;
+}
 
 
 q, blockquote {
 q, blockquote {
-  quotes: none; }
-  q:before, q:after, blockquote:before, blockquote:after {
+    quotes: none;
+}
+
+q:before, q:after, blockquote:before, blockquote:after {
     content: "";
     content: "";
-    content: none; }
+    content: none;
+}
 
 
 a img {
 a img {
-  border: none; }
+    border: none;
+}
 
 
 article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
 article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
-  display: block; }
+    display: block;
+}
 
 
 h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
 h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
-  text-decoration: none; }
-  h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
-    text-decoration: underline; }
+    text-decoration: none;
+}
+
+h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
+    text-decoration: underline;
+}
+
 h1 span.divider, h2 span.divider, h3 span.divider, h4 span.divider, h5 span.divider, h6 span.divider {
 h1 span.divider, h2 span.divider, h3 span.divider, h4 span.divider, h5 span.divider, h6 span.divider {
-  color: #aaaaaa; }
+    color: #aaaaaa;
+}
 
 
 h1 {
 h1 {
-  color: #547f00;
-  color: black;
-  font-size: 1.5em;
-  line-height: 1.3em;
-  padding: 10px 0 10px 0;
-  font-family: "Droid Sans", sans-serif;
-  font-weight: bold; }
+    color: black;
+    font-size: 1.5em;
+    line-height: 1.3em;
+    padding: 10px 0 10px 0;
+    font-family: "Droid Sans", sans-serif;
+    font-weight: bold;
+}
 
 
 h2 {
 h2 {
-  color: #89bf04;
-  color: black;
-  font-size: 1.3em;
-  padding: 10px 0 10px 0; }
-  h2 a {
-    color: black; }
-  h2 span.sub {
+    color: black;
+    font-size: 1.3em;
+    padding: 10px 0 10px 0;
+}
+
+h2 a {
+    color: black;
+}
+
+h2 span.sub {
     font-size: 0.7em;
     font-size: 0.7em;
     color: #999999;
     color: #999999;
-    font-style: italic; }
-    h2 span.sub a {
-      color: #777777; }
+    font-style: italic;
+}
+
+h2 span.sub a {
+    color: #777777;
+}
 
 
 h3 {
 h3 {
-  color: black;
-  font-size: 1.1em;
-  padding: 10px 0 10px 0; }
+    color: black;
+    font-size: 1.1em;
+    padding: 10px 0 10px 0;
+}
 
 
-div.heading_with_menu {
-  float: none;
-  clear: both;
-  overflow: hidden;
-  display: block; }
-  div.heading_with_menu h1, div.heading_with_menu h2, div.heading_with_menu h3, div.heading_with_menu h4, div.heading_with_menu h5, div.heading_with_menu h6 {
+.heading_with_menu {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+}
+
+.heading_with_menu h1, .heading_with_menu h2, .heading_with_menu h3, .heading_with_menu h4, .heading_with_menu h5, .heading_with_menu h6 {
     display: block;
     display: block;
     clear: none;
     clear: none;
     float: left;
     float: left;
@@ -93,8 +117,10 @@ div.heading_with_menu {
     -webkit-box-sizing: border-box;
     -webkit-box-sizing: border-box;
     -ms-box-sizing: border-box;
     -ms-box-sizing: border-box;
     box-sizing: border-box;
     box-sizing: border-box;
-    width: 60%; }
-  div.heading_with_menu ul {
+    width: 60%;
+}
+
+.heading_with_menu ul {
     display: block;
     display: block;
     clear: none;
     clear: none;
     float: right;
     float: right;
@@ -102,858 +128,1632 @@ div.heading_with_menu {
     -webkit-box-sizing: border-box;
     -webkit-box-sizing: border-box;
     -ms-box-sizing: border-box;
     -ms-box-sizing: border-box;
     box-sizing: border-box;
     box-sizing: border-box;
-    margin-top: 10px; }
+    margin-top: 10px;
+}
+
+input.parameter {
+    width: 300px;
+    border: 1px solid #aaa;
+}
 
 
 .body-textarea {
 .body-textarea {
-  width: 300px;
-  height: 100px;
+    width: 300px;
+    height: 100px;
+    border: 1px solid #aaa;
 }
 }
 
 
 p {
 p {
-  line-height: 1.4em;
-  padding: 0 0 10px 0;
-  color: #333333; }
+    line-height: 1.4em;
+    padding: 0 0 10px;
+    color: #333333;
+}
 
 
 ol {
 ol {
-  margin: 0px 0 10px 0;
-  padding: 0 0 0 18px;
-  list-style-type: decimal; }
-  ol li {
+    margin: 0px 0 10px;
+    padding: 0 0 0 18px;
+    list-style-type: decimal;
+}
+
+ol li {
     padding: 5px 0px;
     padding: 5px 0px;
     font-size: 0.9em;
     font-size: 0.9em;
-    color: #333333; }
+    color: #333333;
+}
 
 
 .markdown h3 {
 .markdown h3 {
-  color: #547f00; }
+    color: #547f00;
+}
+
 .markdown h4 {
 .markdown h4 {
-  color: #666666; }
+    color: #666666;
+}
+
 .markdown pre {
 .markdown pre {
-  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
-  background-color: #fcf6db;
-  border: 1px solid black;
-  border-color: #e5e0c6;
-  padding: 10px;
-  margin: 0 0 10px 0; }
-  .markdown pre code {
-    line-height: 1.6em; }
+    font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+    background-color: #fcf6db;
+    border: 1px solid #e5e0c6;
+    padding: 10px;
+    margin: 0 0 10px 0;
+}
+
+.markdown pre code {
+    line-height: 1.6em;
+}
+
 .markdown p code, .markdown li code {
 .markdown p code, .markdown li code {
-  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
-  background-color: #f0f0f0;
-  color: black;
-  padding: 1px 3px; }
+    font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+    background-color: #f0f0f0;
+    color: black;
+    padding: 1px 3px;
+}
+
 .markdown ol, .markdown ul {
 .markdown ol, .markdown ul {
-  font-family: "Droid Sans", sans-serif;
-  margin: 5px 0 10px 0;
-  padding: 0 0 0 18px;
-  list-style-type: disc; }
-  .markdown ol li, .markdown ul li {
+    font-family: "Droid Sans", sans-serif;
+    margin: 5px 0 10px;
+    padding: 0 0 0 18px;
+    list-style-type: disc;
+}
+
+.markdown ol li, .markdown ul li {
     padding: 3px 0px;
     padding: 3px 0px;
     line-height: 1.4em;
     line-height: 1.4em;
-    color: #333333; }
+    color: #333333;
+}
 
 
 div.gist {
 div.gist {
-  margin: 20px 0 25px 0 !important; }
+    margin: 20px 0 25px 0 !important;
+}
 
 
 p.big, div.big p {
 p.big, div.big p {
-  font-size: 1 em;
-  margin-bottom: 10px; }
+    font-size: 1em;
+    margin-bottom: 10px;
+}
 
 
 span.weak {
 span.weak {
-  color: #666666; }
+    color: #666666;
+}
+
 span.blank, span.empty {
 span.blank, span.empty {
-  color: #888888;
-  font-style: italic; }
+    color: #888888;
+    font-style: italic;
+}
 
 
 a {
 a {
-  color: #547f00; }
+    color: #547f00;
+}
 
 
-strong {
-  font-family: "Droid Sans", sans-serif;
-  font-weight: bold;
-  font-weight: bold; }
+b, strong {
+    font-family: "Droid Sans", sans-serif;
+    font-weight: bold;
+}
 
 
 .code {
 .code {
-  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; }
+    font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+}
 
 
 pre {
 pre {
-  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
-  background-color: #fcf6db;
-  border: 1px solid black;
-  border-color: #e5e0c6;
-  padding: 10px;
-  /* white-space: pre-line */ }
-  pre code {
-    line-height: 1.6em; }
+    font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+    background-color: #fcf6db;
+    border: 1px solid #e5e0c6;
+    padding: 10px;
+}
+
+pre code {
+    line-height: 1.6em;
+}
 
 
 .required {
 .required {
-  font-weight: bold; }
+    font-weight: bold;
+}
 
 
 table.fullwidth {
 table.fullwidth {
-  width: 100%; }
+    width: 100%;
+}
+
 table thead tr th {
 table thead tr th {
-  padding: 5px;
-  font-size: 0.9em;
-  color: #666666;
-  border-bottom: 1px solid #999999; }
+    padding: 5px;
+    font-size: 0.9em;
+    color: #666666;
+    border-bottom: 1px solid #999999;
+}
+
 table tbody tr.offset {
 table tbody tr.offset {
-  background-color: #f5f5f5; }
+    background-color: #f5f5f5;
+}
+
 table tbody tr td {
 table tbody tr td {
-  padding: 6px;
-  font-size: 0.9em;
-  border-bottom: 1px solid #cccccc;
-  vertical-align: top;
-  line-height: 1.3em; }
+    padding: 6px;
+    font-size: 0.9em;
+    border-bottom: 1px solid #cccccc;
+    vertical-align: top;
+    line-height: 1.3em;
+}
+
 table tbody tr:last-child td {
 table tbody tr:last-child td {
-  border-bottom: none; }
+    border-bottom: none;
+}
+
 table tbody tr.offset {
 table tbody tr.offset {
-  background-color: #f0f0f0; }
+    background-color: #f0f0f0;
+}
 
 
 form.form_box {
 form.form_box {
-  background-color: #ebf3f9;
-  border: 1px solid black;
-  border-color: #c3d9ec;
-  padding: 10px; }
-  form.form_box label {
-    color: #0f6ab4 !important; }
-  form.form_box input[type=submit] {
-    display: block;
-    padding: 10px; }
-  form.form_box p {
+    background-color: #ebf3f9;
+    border: 1px solid #c3d9ec;
+    padding: 10px;
+}
+
+form.form_box label {
+    color: #0f6ab4 !important;
+}
+
+form.form_box input[type=submit] {
+    display: block;
+    padding: 10px;
+}
+
+form.form_box p {
     font-size: 0.9em;
     font-size: 0.9em;
-    padding: 0 0 15px 0;
-    color: #7e7b6d; }
-    form.form_box p a {
-      color: #646257; }
-    form.form_box p strong {
-      color: black; }
-    form.form_box p.weak {
-      font-size: 0.8em; }
+    padding: 0 0 15px;
+    color: #7e7b6d;
+}
+
+form.form_box p a {
+    color: #646257;
+}
+
+form.form_box p strong {
+    color: black;
+}
+
+form.form_box p.weak {
+    font-size: 0.8em;
+}
+
 form.formtastic fieldset.inputs ol li p.inline-hints {
 form.formtastic fieldset.inputs ol li p.inline-hints {
-  margin-left: 0;
-  font-style: italic;
-  font-size: 0.9em;
-  margin: 0; }
+    margin-left: 0;
+    font-style: italic;
+    font-size: 0.9em;
+    margin: 0;
+}
+
 form.formtastic fieldset.inputs ol li label {
 form.formtastic fieldset.inputs ol li label {
-  display: block;
-  clear: both;
-  width: auto;
-  padding: 0 0 3px 0;
-  color: #666666; }
-  form.formtastic fieldset.inputs ol li label abbr {
+    display: block;
+    clear: both;
+    width: auto;
+    padding: 0 0 3px;
+    color: #666666;
+}
+
+form.formtastic fieldset.inputs ol li label abbr {
     padding-left: 3px;
     padding-left: 3px;
-    color: #888888; }
+    color: #888888;
+}
+
 form.formtastic fieldset.inputs ol li.required label {
 form.formtastic fieldset.inputs ol li.required label {
-  color: black; }
+    color: black;
+}
+
 form.formtastic fieldset.inputs ol li.string input, form.formtastic fieldset.inputs ol li.url input, form.formtastic fieldset.inputs ol li.numeric input {
 form.formtastic fieldset.inputs ol li.string input, form.formtastic fieldset.inputs ol li.url input, form.formtastic fieldset.inputs ol li.numeric input {
-  display: block;
-  padding: 4px;
-  width: auto;
-  clear: both; }
-  form.formtastic fieldset.inputs ol li.string input.title, form.formtastic fieldset.inputs ol li.url input.title, form.formtastic fieldset.inputs ol li.numeric input.title {
-    font-size: 1.3em; }
+    display: block;
+    padding: 4px;
+    width: auto;
+    clear: both;
+}
+
+form.formtastic fieldset.inputs ol li.string input.title, form.formtastic fieldset.inputs ol li.url input.title, form.formtastic fieldset.inputs ol li.numeric input.title {
+    font-size: 1.3em;
+}
+
 form.formtastic fieldset.inputs ol li.text textarea {
 form.formtastic fieldset.inputs ol li.text textarea {
-  font-family: "Droid Sans", sans-serif;
-  height: 250px;
-  padding: 4px;
-  display: block;
-  clear: both; }
+    font-family: "Droid Sans", sans-serif;
+    height: 250px;
+    padding: 4px;
+    display: block;
+    clear: both;
+}
+
 form.formtastic fieldset.inputs ol li.select select {
 form.formtastic fieldset.inputs ol li.select select {
-  display: block;
-  clear: both; }
+    display: block;
+    clear: both;
+}
+
 form.formtastic fieldset.inputs ol li.boolean {
 form.formtastic fieldset.inputs ol li.boolean {
-  float: none;
-  clear: both;
-  overflow: hidden;
-  display: block; }
-  form.formtastic fieldset.inputs ol li.boolean input {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+}
+
+form.formtastic fieldset.inputs ol li.boolean input {
     display: block;
     display: block;
     float: left;
     float: left;
     clear: none;
     clear: none;
-    margin: 0 5px 0 0; }
-  form.formtastic fieldset.inputs ol li.boolean label {
+    margin: 0 5px 0 0;
+}
+
+form.formtastic fieldset.inputs ol li.boolean label {
     display: block;
     display: block;
     float: left;
     float: left;
     clear: none;
     clear: none;
     margin: 0;
     margin: 0;
-    padding: 0; }
+    padding: 0;
+}
+
 form.formtastic fieldset.buttons {
 form.formtastic fieldset.buttons {
-  margin: 0;
-  padding: 0; }
+    margin: 0;
+    padding: 0;
+}
+
 form.fullwidth ol li.string input, form.fullwidth ol li.url input, form.fullwidth ol li.text textarea, form.fullwidth ol li.numeric input {
 form.fullwidth ol li.string input, form.fullwidth ol li.url input, form.fullwidth ol li.text textarea, form.fullwidth ol li.numeric input {
-  width: 500px !important; }
+    width: 500px !important;
+}
 
 
 body {
 body {
-  font-family: "Droid Sans", sans-serif; }
-  body #content_message {
+    font-family: "Droid Sans", sans-serif;
+}
+
+body #content_message {
     margin: 10px 15px;
     margin: 10px 15px;
     font-style: italic;
     font-style: italic;
-    color: #999999; }
-  body #header {
+    color: #999999;
+}
+
+body #header {
     background-color: #89bf04;
     background-color: #89bf04;
-    padding: 14px; }
-    body #header a#logo {
-      font-size: 1.5em;
-      font-weight: bold;
-      text-decoration: none;
-      background: transparent url(http://swagger.wordnik.com/images/logo_small.png) no-repeat left center;
-      padding: 20px 0 20px 40px;
-      color: white; }
-    body #header form#api_selector {
-      display: block;
-      clear: none;
-      float: right; }
-      body #header form#api_selector .input {
-        display: block;
-        clear: none;
-        float: left;
-        margin: 0 10px 0 0; }
-        body #header form#api_selector .input input {
-          font-size: 0.9em;
-          padding: 3px;
-          margin: 0; }
-        body #header form#api_selector .input input#input_baseUrl {
-          width: 400px; }
-        body #header form#api_selector .input input#input_apiKey {
-          width: 200px; }
-        body #header form#api_selector .input a#explore {
-          display: block;
-          text-decoration: none;
-          font-weight: bold;
-          padding: 6px 8px;
-          font-size: 0.9em;
-          color: white;
-          background-color: #547f00;
-          -moz-border-radius: 4px;
-          -webkit-border-radius: 4px;
-          -o-border-radius: 4px;
-          -ms-border-radius: 4px;
-          -khtml-border-radius: 4px;
-          border-radius: 4px; }
-          body #header form#api_selector .input a#explore:hover {
-            background-color: #547f00; }
-  body p#colophon {
+    padding: 14px;
+}
+
+body #header a#logo {
+    font-size: 1.5em;
+    font-weight: bold;
+    text-decoration: none;
+    background: transparent url(../images/logo_small.png) no-repeat left center;
+    padding: 20px 0 20px 40px;
+    color: white;
+}
+
+body #header form#api_selector {
+    display: block;
+    clear: none;
+    float: right;
+}
+
+body #header form#api_selector .input {
+    display: block;
+    clear: none;
+    float: left;
+    margin: 0 10px 0 0;
+}
+
+body #header form#api_selector .input input {
+    font-size: 0.9em;
+    padding: 3px;
+    margin: 0;
+}
+
+body #header form#api_selector .input input#input_baseUrl {
+    width: 400px;
+}
+
+body #header form#api_selector .input input#input_apiKey {
+    width: 200px;
+}
+
+body #header form#api_selector .input a#explore {
+    display: block;
+    text-decoration: none;
+    font-weight: bold;
+    padding: 6px 8px;
+    font-size: 0.9em;
+    color: white;
+    background-color: #547f00;
+    -moz-border-radius: 4px;
+    -webkit-border-radius: 4px;
+    -o-border-radius: 4px;
+    -ms-border-radius: 4px;
+    -khtml-border-radius: 4px;
+    border-radius: 4px;
+}
+
+body #header form#api_selector .input a#explore:hover {
+    background-color: #547f00;
+}
+
+body p#colophon {
     margin: 0 15px 40px 15px;
     margin: 0 15px 40px 15px;
     padding: 10px 0;
     padding: 10px 0;
     font-size: 0.8em;
     font-size: 0.8em;
     border-top: 1px solid #dddddd;
     border-top: 1px solid #dddddd;
     font-family: "Droid Sans", sans-serif;
     font-family: "Droid Sans", sans-serif;
     color: #999999;
     color: #999999;
-    font-style: italic; }
-    body p#colophon a {
-      text-decoration: none;
-      color: #547f00; }
-  body ul#resources {
+    font-style: italic;
+}
+
+body p#colophon a {
+    text-decoration: none;
+    color: #547f00;
+}
+
+body ul#resources {
+    font-family: "Droid Sans", sans-serif;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource {
+    border-bottom: 1px solid #dddddd;
+}
+
+body ul#resources li.resource:last-child {
+    border-bottom: none;
+}
+
+body ul#resources li.resource div.heading {
+    border: 1px solid transparent;
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+}
+
+body ul#resources li.resource div.heading h2 {
+    color: #999999;
+    padding-left: 0;
+    display: block;
+    clear: none;
+    float: left;
     font-family: "Droid Sans", sans-serif;
     font-family: "Droid Sans", sans-serif;
-    font-size: 0.9em; }
-    body ul#resources li.resource {
-      border-bottom: 1px solid #dddddd; }
-      body ul#resources li.resource:last-child {
-        border-bottom: none; }
-      body ul#resources li.resource div.heading {
-        border: 1px solid transparent;
-        float: none;
-        clear: both;
-        overflow: hidden;
-        display: block; }
-        body ul#resources li.resource div.heading h2 {
-          color: #999999;
-          padding-left: 0px;
-          display: block;
-          clear: none;
-          float: left;
-          font-family: "Droid Sans", sans-serif;
-          font-weight: bold; }
-          body ul#resources li.resource div.heading h2 a {
-            color: #999999; }
-            body ul#resources li.resource div.heading h2 a:hover {
-              color: black; }
-        body ul#resources li.resource div.heading ul.options {
-          float: none;
-          clear: both;
-          overflow: hidden;
-          margin: 0;
-          padding: 0;
-          display: block;
-          clear: none;
-          float: right;
-          margin: 14px 10px 0 0; }
-          body ul#resources li.resource div.heading ul.options li {
-            float: left;
-            clear: none;
-            margin: 0;
-            padding: 2px 10px;
-            border-right: 1px solid #dddddd; }
-            body ul#resources li.resource div.heading ul.options li:first-child, body ul#resources li.resource div.heading ul.options li.first {
-              padding-left: 0; }
-            body ul#resources li.resource div.heading ul.options li:last-child, body ul#resources li.resource div.heading ul.options li.last {
-              padding-right: 0;
-              border-right: none; }
-          body ul#resources li.resource div.heading ul.options li {
-            color: #666666;
-            font-size: 0.9em; }
-            body ul#resources li.resource div.heading ul.options li a {
-              color: #aaaaaa;
-              text-decoration: none; }
-              body ul#resources li.resource div.heading ul.options li a:hover {
-                text-decoration: underline;
-                color: black; }
-      body ul#resources li.resource:hover div.heading h2 a, body ul#resources li.resource.active div.heading h2 a {
-        color: black; }
-      body ul#resources li.resource:hover div.heading ul.options li a, body ul#resources li.resource.active div.heading ul.options li a {
-        color: #555555; }
-      body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get {
-        float: none;
-        clear: both;
-        overflow: hidden;
-        display: block;
-        margin: 0 0 10px 0;
-        padding: 0 0 0 0px; }
-        body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading {
-          float: none;
-          clear: both;
-          overflow: hidden;
-          display: block;
-          margin: 0 0 0 0;
-          padding: 0;
-          background-color: #e7f0f7;
-          border: 1px solid black;
-          border-color: #c3d9ec; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 {
-            display: block;
-            clear: none;
-            float: left;
-            width: auto;
-            margin: 0;
-            padding: 0;
-            line-height: 1.1em;
-            color: black; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span {
-              margin: 0;
-              padding: 0; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a {
-                text-transform: uppercase;
-                background-color: #0f6ab4;
-                text-decoration: none;
-                color: white;
-                display: inline-block;
-                width: 50px;
-                font-size: 0.7em;
-                text-align: center;
-                padding: 7px 0 4px 0;
-                -moz-border-radius: 2px;
-                -webkit-border-radius: 2px;
-                -o-border-radius: 2px;
-                -ms-border-radius: 2px;
-                -khtml-border-radius: 2px;
-                border-radius: 2px; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path {
-                padding-left: 10px; }
-                body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path a {
-                  color: black;
-                  text-decoration: none; }
-                  body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path a:hover {
-                    text-decoration: underline; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options {
-            float: none;
-            clear: both;
-            overflow: hidden;
-            margin: 0;
-            padding: 0;
-            display: block;
-            clear: none;
-            float: right;
-            margin: 6px 10px 0 0; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {
-              float: left;
-              clear: none;
-              margin: 0;
-              padding: 2px 10px;
-              border-right: 1px solid #dddddd; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:first-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.first {
-                padding-left: 0; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last {
-                padding-right: 0;
-                border-right: none; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {
-              border-right-color: #c3d9ec;
-              color: #0f6ab4;
-              font-size: 0.9em; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a {
-                color: #0f6ab4;
-                text-decoration: none; }
-                body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a:hover, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a:active, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a.active {
-                  text-decoration: underline; }
-        body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content {
-          background-color: #ebf3f9;
-          border: 1px solid black;
-          border-color: #c3d9ec;
-          border-top: none;
-          padding: 10px;
-          -moz-border-radius-bottomleft: 6px;
-          -webkit-border-bottom-left-radius: 6px;
-          -o-border-bottom-left-radius: 6px;
-          -ms-border-bottom-left-radius: 6px;
-          -khtml-border-bottom-left-radius: 6px;
-          border-bottom-left-radius: 6px;
-          -moz-border-radius-bottomright: 6px;
-          -webkit-border-bottom-right-radius: 6px;
-          -o-border-bottom-right-radius: 6px;
-          -ms-border-bottom-right-radius: 6px;
-          -khtml-border-bottom-right-radius: 6px;
-          border-bottom-right-radius: 6px;
-          margin: 0 0 20px 0; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 {
-            color: #0f6ab4;
-            font-size: 1.1em;
-            margin: 0;
-            padding: 15px 0 5px 0px; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content form input[type='text'].error {
-            outline: 2px solid black;
-            outline-color: #cc0000; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header {
-            float: none;
-            clear: both;
-            overflow: hidden;
-            display: block; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header input.submit {
-              display: block;
-              clear: none;
-              float: left;
-              padding: 6px 8px; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header img {
-              display: block;
-              display: block;
-              clear: none;
-              float: right; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
-              padding: 4px 0 0 10px;
-              color: #6fa5d2;
-              display: inline-block;
-              font-size: 0.9em; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.response div.block {
-            background-color: #fcf6db;
-            border: 1px solid black;
-            border-color: #e5e0c6; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.response div.block pre {
-              font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
-              padding: 10px;
-              font-size: 0.9em;
-              max-height: 400px;
-              overflow-y: auto; }
-      body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post {
-        float: none;
-        clear: both;
-        overflow: hidden;
-        display: block;
-        margin: 0 0 10px 0;
-        padding: 0 0 0 0px; }
-        body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading {
-          float: none;
-          clear: both;
-          overflow: hidden;
-          display: block;
-          margin: 0 0 0 0;
-          padding: 0;
-          background-color: #e7f6ec;
-          border: 1px solid black;
-          border-color: #c3e8d1; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 {
-            display: block;
-            clear: none;
-            float: left;
-            width: auto;
-            margin: 0;
-            padding: 0;
-            line-height: 1.1em;
-            color: black; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span {
-              margin: 0;
-              padding: 0; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a {
-                text-transform: uppercase;
-                background-color: #10a54a;
-                text-decoration: none;
-                color: white;
-                display: inline-block;
-                width: 50px;
-                font-size: 0.7em;
-                text-align: center;
-                padding: 7px 0 4px 0;
-                -moz-border-radius: 2px;
-                -webkit-border-radius: 2px;
-                -o-border-radius: 2px;
-                -ms-border-radius: 2px;
-                -khtml-border-radius: 2px;
-                border-radius: 2px; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path {
-                padding-left: 10px; }
-                body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path a {
-                  color: black;
-                  text-decoration: none; }
-                  body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path a:hover {
-                    text-decoration: underline; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options {
-            float: none;
-            clear: both;
-            overflow: hidden;
-            margin: 0;
-            padding: 0;
-            display: block;
-            clear: none;
-            float: right;
-            margin: 6px 10px 0 0; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {
-              float: left;
-              clear: none;
-              margin: 0;
-              padding: 2px 10px;
-              border-right: 1px solid #dddddd; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:first-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.first {
-                padding-left: 0; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last {
-                padding-right: 0;
-                border-right: none; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {
-              border-right-color: #c3e8d1;
-              color: #10a54a;
-              font-size: 0.9em; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a {
-                color: #10a54a;
-                text-decoration: none; }
-                body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a:hover, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a:active, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a.active {
-                  text-decoration: underline; }
-        body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content {
-          background-color: #ebf7f0;
-          border: 1px solid black;
-          border-color: #c3e8d1;
-          border-top: none;
-          padding: 10px;
-          -moz-border-radius-bottomleft: 6px;
-          -webkit-border-bottom-left-radius: 6px;
-          -o-border-bottom-left-radius: 6px;
-          -ms-border-bottom-left-radius: 6px;
-          -khtml-border-bottom-left-radius: 6px;
-          border-bottom-left-radius: 6px;
-          -moz-border-radius-bottomright: 6px;
-          -webkit-border-bottom-right-radius: 6px;
-          -o-border-bottom-right-radius: 6px;
-          -ms-border-bottom-right-radius: 6px;
-          -khtml-border-bottom-right-radius: 6px;
-          border-bottom-right-radius: 6px;
-          margin: 0 0 20px 0; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 {
-            color: #10a54a;
-            font-size: 1.1em;
-            margin: 0;
-            padding: 15px 0 5px 0px; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content form input[type='text'].error {
-            outline: 2px solid black;
-            outline-color: #cc0000; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header {
-            float: none;
-            clear: both;
-            overflow: hidden;
-            display: block; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header input.submit {
-              display: block;
-              clear: none;
-              float: left;
-              padding: 6px 8px; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header img {
-              display: block;
-              display: block;
-              clear: none;
-              float: right; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a {
-              padding: 4px 0 0 10px;
-              color: #6fc992;
-              display: inline-block;
-              font-size: 0.9em; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.response div.block {
-            background-color: #fcf6db;
-            border: 1px solid black;
-            border-color: #e5e0c6; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.response div.block pre {
-              font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
-              padding: 10px;
-              font-size: 0.9em;
-              max-height: 400px;
-              overflow-y: auto; }
-      body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put {
-        float: none;
-        clear: both;
-        overflow: hidden;
-        display: block;
-        margin: 0 0 10px 0;
-        padding: 0 0 0 0px; }
-        body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading {
-          float: none;
-          clear: both;
-          overflow: hidden;
-          display: block;
-          margin: 0 0 0 0;
-          padding: 0;
-          background-color: #f9f2e9;
-          border: 1px solid black;
-          border-color: #f0e0ca; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 {
-            display: block;
-            clear: none;
-            float: left;
-            width: auto;
-            margin: 0;
-            padding: 0;
-            line-height: 1.1em;
-            color: black; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span {
-              margin: 0;
-              padding: 0; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a {
-                text-transform: uppercase;
-                background-color: #c5862b;
-                text-decoration: none;
-                color: white;
-                display: inline-block;
-                width: 50px;
-                font-size: 0.7em;
-                text-align: center;
-                padding: 7px 0 4px 0;
-                -moz-border-radius: 2px;
-                -webkit-border-radius: 2px;
-                -o-border-radius: 2px;
-                -ms-border-radius: 2px;
-                -khtml-border-radius: 2px;
-                border-radius: 2px; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path {
-                padding-left: 10px; }
-                body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path a {
-                  color: black;
-                  text-decoration: none; }
-                  body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path a:hover {
-                    text-decoration: underline; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options {
-            float: none;
-            clear: both;
-            overflow: hidden;
-            margin: 0;
-            padding: 0;
-            display: block;
-            clear: none;
-            float: right;
-            margin: 6px 10px 0 0; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {
-              float: left;
-              clear: none;
-              margin: 0;
-              padding: 2px 10px;
-              border-right: 1px solid #dddddd; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:first-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.first {
-                padding-left: 0; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last {
-                padding-right: 0;
-                border-right: none; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {
-              border-right-color: #f0e0ca;
-              color: #c5862b;
-              font-size: 0.9em; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a {
-                color: #c5862b;
-                text-decoration: none; }
-                body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a:hover, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a:active, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a.active {
-                  text-decoration: underline; }
-        body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content {
-          background-color: #faf5ee;
-          border: 1px solid black;
-          border-color: #f0e0ca;
-          border-top: none;
-          padding: 10px;
-          -moz-border-radius-bottomleft: 6px;
-          -webkit-border-bottom-left-radius: 6px;
-          -o-border-bottom-left-radius: 6px;
-          -ms-border-bottom-left-radius: 6px;
-          -khtml-border-bottom-left-radius: 6px;
-          border-bottom-left-radius: 6px;
-          -moz-border-radius-bottomright: 6px;
-          -webkit-border-bottom-right-radius: 6px;
-          -o-border-bottom-right-radius: 6px;
-          -ms-border-bottom-right-radius: 6px;
-          -khtml-border-bottom-right-radius: 6px;
-          border-bottom-right-radius: 6px;
-          margin: 0 0 20px 0; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 {
-            color: #c5862b;
-            font-size: 1.1em;
-            margin: 0;
-            padding: 15px 0 5px 0px; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content form input[type='text'].error {
-            outline: 2px solid black;
-            outline-color: #cc0000; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header {
-            float: none;
-            clear: both;
-            overflow: hidden;
-            display: block; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header input.submit {
-              display: block;
-              clear: none;
-              float: left;
-              padding: 6px 8px; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header img {
-              display: block;
-              display: block;
-              clear: none;
-              float: right; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a {
-              padding: 4px 0 0 10px;
-              color: #dcb67f;
-              display: inline-block;
-              font-size: 0.9em; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.response div.block {
-            background-color: #fcf6db;
-            border: 1px solid black;
-            border-color: #e5e0c6; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.response div.block pre {
-              font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
-              padding: 10px;
-              font-size: 0.9em;
-              max-height: 400px;
-              overflow-y: auto; }
-      body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete {
-        float: none;
-        clear: both;
-        overflow: hidden;
-        display: block;
-        margin: 0 0 10px 0;
-        padding: 0 0 0 0px; }
-        body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading {
-          float: none;
-          clear: both;
-          overflow: hidden;
-          display: block;
-          margin: 0 0 0 0;
-          padding: 0;
-          background-color: #f5e8e8;
-          border: 1px solid black;
-          border-color: #e8c6c7; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 {
-            display: block;
-            clear: none;
-            float: left;
-            width: auto;
-            margin: 0;
-            padding: 0;
-            line-height: 1.1em;
-            color: black; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span {
-              margin: 0;
-              padding: 0; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a {
-                text-transform: uppercase;
-                background-color: #a41e22;
-                text-decoration: none;
-                color: white;
-                display: inline-block;
-                width: 50px;
-                font-size: 0.7em;
-                text-align: center;
-                padding: 7px 0 4px 0;
-                -moz-border-radius: 2px;
-                -webkit-border-radius: 2px;
-                -o-border-radius: 2px;
-                -ms-border-radius: 2px;
-                -khtml-border-radius: 2px;
-                border-radius: 2px; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path {
-                padding-left: 10px; }
-                body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path a {
-                  color: black;
-                  text-decoration: none; }
-                  body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path a:hover {
-                    text-decoration: underline; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options {
-            float: none;
-            clear: both;
-            overflow: hidden;
-            margin: 0;
-            padding: 0;
-            display: block;
-            clear: none;
-            float: right;
-            margin: 6px 10px 0 0; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {
-              float: left;
-              clear: none;
-              margin: 0;
-              padding: 2px 10px;
-              border-right: 1px solid #dddddd; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:first-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.first {
-                padding-left: 0; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last {
-                padding-right: 0;
-                border-right: none; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {
-              border-right-color: #e8c6c7;
-              color: #a41e22;
-              font-size: 0.9em; }
-              body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a {
-                color: #a41e22;
-                text-decoration: none; }
-                body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a:hover, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a:active, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a.active {
-                  text-decoration: underline; }
-        body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
-          background-color: #f7eded;
-          border: 1px solid black;
-          border-color: #e8c6c7;
-          border-top: none;
-          padding: 10px;
-          -moz-border-radius-bottomleft: 6px;
-          -webkit-border-bottom-left-radius: 6px;
-          -o-border-bottom-left-radius: 6px;
-          -ms-border-bottom-left-radius: 6px;
-          -khtml-border-bottom-left-radius: 6px;
-          border-bottom-left-radius: 6px;
-          -moz-border-radius-bottomright: 6px;
-          -webkit-border-bottom-right-radius: 6px;
-          -o-border-bottom-right-radius: 6px;
-          -ms-border-bottom-right-radius: 6px;
-          -khtml-border-bottom-right-radius: 6px;
-          border-bottom-right-radius: 6px;
-          margin: 0 0 20px 0; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 {
-            color: #a41e22;
-            font-size: 1.1em;
-            margin: 0;
-            padding: 15px 0 5px 0px; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content form input[type='text'].error {
-            outline: 2px solid black;
-            outline-color: #cc0000; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header {
-            float: none;
-            clear: both;
-            overflow: hidden;
-            display: block; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header input.submit {
-              display: block;
-              clear: none;
-              float: left;
-              padding: 6px 8px; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header img {
-              display: block;
-              display: block;
-              clear: none;
-              float: right; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a {
-              padding: 4px 0 0 10px;
-              color: #c8787a;
-              display: inline-block;
-              font-size: 0.9em; }
-          body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.response div.block {
-            background-color: #fcf6db;
-            border: 1px solid black;
-            border-color: #e5e0c6; }
-            body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.response div.block pre {
-              font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
-              padding: 10px;
-              font-size: 0.9em;
-              max-height: 400px;
-              overflow-y: auto; }
+    font-weight: bold;
+}
+
+body ul#resources li.resource div.heading h2 a {
+    color: #999999;
+}
+
+body ul#resources li.resource div.heading h2 a:hover {
+    color: black;
+}
+
+body ul#resources li.resource div.heading ul.options {
+    overflow: hidden;
+    padding: 0;
+    display: block;
+    clear: none;
+    float: right;
+    margin: 14px 10px 0 0;
+}
+
+body ul#resources li.resource div.heading ul.options li {
+    float: left;
+    clear: none;
+    margin: 0;
+    padding: 2px 10px;
+    border-right: 1px solid #dddddd;
+}
+
+body ul#resources li.resource div.heading ul.options li:first-child, body ul#resources li.resource div.heading ul.options li.first {
+    padding-left: 0;
+}
+
+body ul#resources li.resource div.heading ul.options li:last-child, body ul#resources li.resource div.heading ul.options li.last {
+    padding-right: 0;
+    border-right: none;
+}
+
+body ul#resources li.resource div.heading ul.options li {
+    color: #666666;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource div.heading ul.options li a {
+    color: #aaaaaa;
+    text-decoration: none;
+}
+
+body ul#resources li.resource div.heading ul.options li a:hover {
+    text-decoration: underline;
+    color: black;
+}
+
+body ul#resources li.resource:hover div.heading h2 a, body ul#resources li.resource.active div.heading h2 a {
+    color: black;
+}
+
+body ul#resources li.resource:hover div.heading ul.options li a, body ul#resources li.resource.active div.heading ul.options li a {
+    color: #555555;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+    margin: 0 0 10px;
+    padding: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+    margin: 0;
+    padding: 0;
+    background-color: #e7f0f7;
+    border: 1px solid #c3d9ec;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 {
+    display: block;
+    clear: none;
+    float: left;
+    width: auto;
+    margin: 0;
+    padding: 0;
+    line-height: 1.1em;
+    color: black;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span {
+    margin: 0;
+    padding: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a {
+    text-transform: uppercase;
+    background-color: #0f6ab4;
+    text-decoration: none;
+    color: white;
+    display: inline-block;
+    width: 50px;
+    font-size: 0.7em;
+    text-align: center;
+    padding: 7px 0 4px 0;
+    -moz-border-radius: 2px;
+    -webkit-border-radius: 2px;
+    -o-border-radius: 2px;
+    -ms-border-radius: 2px;
+    -khtml-border-radius: 2px;
+    border-radius: 2px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path {
+    padding-left: 10px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path a {
+    color: black;
+    text-decoration: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.path a:hover {
+    text-decoration: underline;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options {
+    overflow: hidden;
+    padding: 0;
+    display: block;
+    clear: none;
+    float: right;
+    margin: 6px 10px 0 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {
+    float: left;
+    clear: none;
+    margin: 0;
+    padding: 2px 10px;
+    border-right: 1px solid #dddddd;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:first-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.first {
+    padding-left: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last {
+    padding-right: 0;
+    border-right: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {
+    border-right-color: #c3d9ec;
+    color: #0f6ab4;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a {
+    color: #0f6ab4;
+    text-decoration: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a:hover, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a:active, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a.active {
+    text-decoration: underline;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content {
+    background-color: #ebf3f9;
+    border: 1px solid #c3d9ec;
+    border-top: none;
+    padding: 10px;
+    -moz-border-radius-bottomleft: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -o-border-bottom-left-radius: 6px;
+    -ms-border-bottom-left-radius: 6px;
+    -khtml-border-bottom-left-radius: 6px;
+    border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomright: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    -o-border-bottom-right-radius: 6px;
+    -ms-border-bottom-right-radius: 6px;
+    -khtml-border-bottom-right-radius: 6px;
+    border-bottom-right-radius: 6px;
+    margin: 0 0 20px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 {
+    color: #0f6ab4;
+    font-size: 1.1em;
+    margin: 0;
+    padding: 15px 0 5px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content form input[type='text'].error {
+    outline: 2px solid black;
+    outline-color: #cc0000;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header input.submit {
+    display: block;
+    clear: none;
+    float: left;
+    padding: 6px 8px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header img {
+    display: block;
+    clear: none;
+    float: right;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
+    padding: 4px 0 0 10px;
+    color: #6fa5d2;
+    display: inline-block;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.response div.block pre {
+    font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+    padding: 10px;
+    font-size: 0.9em;
+    max-height: 400px;
+    overflow-y: auto;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+    margin: 0 0 10px;
+    padding: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+    margin: 0;
+    padding: 0;
+    background-color: #e7f6ec;
+    border: 1px solid #c3e8d1;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 {
+    display: block;
+    clear: none;
+    float: left;
+    width: auto;
+    margin: 0;
+    padding: 0;
+    line-height: 1.1em;
+    color: black;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span {
+    margin: 0;
+    padding: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a {
+    text-transform: uppercase;
+    background-color: #10a54a;
+    text-decoration: none;
+    color: white;
+    display: inline-block;
+    width: 50px;
+    font-size: 0.7em;
+    text-align: center;
+    padding: 7px 0 4px 0;
+    -moz-border-radius: 2px;
+    -webkit-border-radius: 2px;
+    -o-border-radius: 2px;
+    -ms-border-radius: 2px;
+    -khtml-border-radius: 2px;
+    border-radius: 2px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path {
+    padding-left: 10px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path a {
+    color: black;
+    text-decoration: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.path a:hover {
+    text-decoration: underline;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options {
+    overflow: hidden;
+    padding: 0;
+    display: block;
+    clear: none;
+    float: right;
+    margin: 6px 10px 0 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {
+    float: left;
+    clear: none;
+    margin: 0;
+    padding: 2px 10px;
+    border-right: 1px solid #dddddd;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:first-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.first {
+    padding-left: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last {
+    padding-right: 0;
+    border-right: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {
+    border-right-color: #c3e8d1;
+    color: #10a54a;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a {
+    color: #10a54a;
+    text-decoration: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a:hover, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a:active, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a.active {
+    text-decoration: underline;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content {
+    background-color: #ebf7f0;
+    border: 1px solid #c3e8d1;
+    border-top: none;
+    padding: 10px;
+    -moz-border-radius-bottomleft: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -o-border-bottom-left-radius: 6px;
+    -ms-border-bottom-left-radius: 6px;
+    -khtml-border-bottom-left-radius: 6px;
+    border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomright: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    -o-border-bottom-right-radius: 6px;
+    -ms-border-bottom-right-radius: 6px;
+    -khtml-border-bottom-right-radius: 6px;
+    border-bottom-right-radius: 6px;
+    margin: 0 0 20px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 {
+    color: #10a54a;
+    font-size: 1.1em;
+    margin: 0;
+    padding: 15px 0 5px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content form input[type='text'].error {
+    outline: 2px solid black;
+    outline-color: #cc0000;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header input.submit {
+    display: block;
+    clear: none;
+    float: left;
+    padding: 6px 8px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header img {
+    display: block;
+    clear: none;
+    float: right;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a {
+    padding: 4px 0 0 10px;
+    color: #6fc992;
+    display: inline-block;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.response div.block pre {
+    font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+    padding: 10px;
+    font-size: 0.9em;
+    max-height: 400px;
+    overflow-y: auto;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+    margin: 0 0 10px;
+    padding: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+    margin: 0;
+    padding: 0;
+    background-color: #f9f2e9;
+    border: 1px solid #f0e0ca;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 {
+    display: block;
+    clear: none;
+    float: left;
+    width: auto;
+    margin: 0;
+    padding: 0;
+    line-height: 1.1em;
+    color: black;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span {
+    margin: 0;
+    padding: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a {
+    text-transform: uppercase;
+    background-color: #c5862b;
+    text-decoration: none;
+    color: white;
+    display: inline-block;
+    width: 50px;
+    font-size: 0.7em;
+    text-align: center;
+    padding: 7px 0 4px;
+    -moz-border-radius: 2px;
+    -webkit-border-radius: 2px;
+    -o-border-radius: 2px;
+    -ms-border-radius: 2px;
+    -khtml-border-radius: 2px;
+    border-radius: 2px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path {
+    padding-left: 10px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path a {
+    color: black;
+    text-decoration: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.path a:hover {
+    text-decoration: underline;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options {
+    overflow: hidden;
+    padding: 0;
+    display: block;
+    clear: none;
+    float: right;
+    margin: 6px 10px 0 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {
+    float: left;
+    clear: none;
+    margin: 0;
+    padding: 2px 10px;
+    border-right: 1px solid #dddddd;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:first-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.first {
+    padding-left: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last {
+    padding-right: 0;
+    border-right: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {
+    border-right-color: #f0e0ca;
+    color: #c5862b;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a {
+    color: #c5862b;
+    text-decoration: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a:hover, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a:active, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a.active {
+    text-decoration: underline;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content {
+    background-color: #faf5ee;
+    border: 1px solid #f0e0ca;
+    border-top: none;
+    padding: 10px;
+    -moz-border-radius-bottomleft: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -o-border-bottom-left-radius: 6px;
+    -ms-border-bottom-left-radius: 6px;
+    -khtml-border-bottom-left-radius: 6px;
+    border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomright: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    -o-border-bottom-right-radius: 6px;
+    -ms-border-bottom-right-radius: 6px;
+    -khtml-border-bottom-right-radius: 6px;
+    border-bottom-right-radius: 6px;
+    margin: 0 0 20px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 {
+    color: #c5862b;
+    font-size: 1.1em;
+    margin: 0;
+    padding: 15px 0 5px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content form input[type='text'].error {
+    outline: 2px solid black;
+    outline-color: #cc0000;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header input.submit {
+    display: block;
+    clear: none;
+    float: left;
+    padding: 6px 8px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header img {
+    display: block;
+    clear: none;
+    float: right;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a {
+    padding: 4px 0 0 10px;
+    color: #dcb67f;
+    display: inline-block;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.response div.block pre {
+    font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+    padding: 10px;
+    font-size: 0.9em;
+    max-height: 400px;
+    overflow-y: auto;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+    margin: 0 0 10px;
+    padding: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+    margin: 0;
+    padding: 0;
+    background-color: #FCE9E3;
+    border: 1px solid #F5D5C3;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 {
+    display: block;
+    clear: none;
+    float: left;
+    width: auto;
+    margin: 0;
+    padding: 0;
+    line-height: 1.1em;
+    color: black;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span {
+    margin: 0;
+    padding: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a {
+    text-transform: uppercase;
+    background-color: #D38042;
+    text-decoration: none;
+    color: white;
+    display: inline-block;
+    width: 50px;
+    font-size: 0.7em;
+    text-align: center;
+    padding: 7px 0 4px 0;
+    -moz-border-radius: 2px;
+    -webkit-border-radius: 2px;
+    -o-border-radius: 2px;
+    -ms-border-radius: 2px;
+    -khtml-border-radius: 2px;
+    border-radius: 2px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.path {
+    padding-left: 10px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.path a {
+    color: black;
+    text-decoration: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.path a:hover {
+    text-decoration: underline;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options {
+    overflow: hidden;
+    padding: 0;
+    display: block;
+    clear: none;
+    float: right;
+    margin: 6px 10px 0 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li {
+    float: left;
+    clear: none;
+    margin: 0;
+    padding: 2px 10px;
+    border-right: 1px solid #dddddd;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:first-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.first {
+    padding-left: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last {
+    padding-right: 0;
+    border-right: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li {
+    border-right-color: #f0cecb;
+    color: #D38042;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a {
+    color: #D38042;
+    text-decoration: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a:hover, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a:active, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a.active {
+    text-decoration: underline;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content {
+    background-color: #faf0ef;
+    border: 1px solid #f0cecb;
+    border-top: none;
+    padding: 10px;
+    -moz-border-radius-bottomleft: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -o-border-bottom-left-radius: 6px;
+    -ms-border-bottom-left-radius: 6px;
+    -khtml-border-bottom-left-radius: 6px;
+    border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomright: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    -o-border-bottom-right-radius: 6px;
+    -ms-border-bottom-right-radius: 6px;
+    -khtml-border-bottom-right-radius: 6px;
+    border-bottom-right-radius: 6px;
+    margin: 0 0 20px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 {
+    color: #D38042;
+    font-size: 1.1em;
+    margin: 0;
+    padding: 15px 0 5px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content form input[type='text'].error {
+    outline: 2px solid black;
+    outline-color: #F5D5C3;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header input.submit {
+    display: block;
+    clear: none;
+    float: left;
+    padding: 6px 8px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header img {
+    display: block;
+    clear: none;
+    float: right;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a {
+    padding: 4px 0 0 10px;
+    color: #dcb67f;
+    display: inline-block;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.response div.block pre {
+    font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+    padding: 10px;
+    font-size: 0.9em;
+    max-height: 400px;
+    overflow-y: auto;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+    margin: 0 0 10px 0;
+    padding: 0 0 0 0px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+    margin: 0 0 0 0;
+    padding: 0;
+    background-color: #fcffcd;
+    border: 1px solid black;
+    border-color: #ffd20f;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 {
+    display: block;
+    clear: none;
+    float: left;
+    width: auto;
+    margin: 0;
+    padding: 0;
+    line-height: 1.1em;
+    color: black;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span {
+    margin: 0;
+    padding: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a {
+    text-transform: uppercase;
+    background-color: #ffd20f;
+    text-decoration: none;
+    color: white;
+    display: inline-block;
+    width: 50px;
+    font-size: 0.7em;
+    text-align: center;
+    padding: 7px 0 4px 0;
+    -moz-border-radius: 2px;
+    -webkit-border-radius: 2px;
+    -o-border-radius: 2px;
+    -ms-border-radius: 2px;
+    -khtml-border-radius: 2px;
+    border-radius: 2px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.path {
+    padding-left: 10px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.path a {
+    color: black;
+    text-decoration: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.path a:hover {
+    text-decoration: underline;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    margin: 0;
+    padding: 0;
+    display: block;
+    clear: none;
+    float: right;
+    margin: 6px 10px 0 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li {
+    float: left;
+    clear: none;
+    margin: 0;
+    padding: 2px 10px;
+    border-right: 1px solid #dddddd;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:first-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.first {
+    padding-left: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last {
+    padding-right: 0;
+    border-right: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li {
+    border-right-color: #ffd20f;
+    color: #ffd20f;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a {
+    color: #ffd20f;
+    text-decoration: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a:hover, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a:active, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a.active {
+    text-decoration: underline;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content {
+    background-color: #fcffcd;
+    border: 1px solid black;
+    border-color: #ffd20f;
+    border-top: none;
+    padding: 10px;
+    -moz-border-radius-bottomleft: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -o-border-bottom-left-radius: 6px;
+    -ms-border-bottom-left-radius: 6px;
+    -khtml-border-bottom-left-radius: 6px;
+    border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomright: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    -o-border-bottom-right-radius: 6px;
+    -ms-border-bottom-right-radius: 6px;
+    -khtml-border-bottom-right-radius: 6px;
+    border-bottom-right-radius: 6px;
+    margin: 0 0 20px 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 {
+    color: #ffd20f;
+    font-size: 1.1em;
+    margin: 0;
+    padding: 15px 0 5px 0px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content form input[type='text'].error {
+    outline: 2px solid black;
+    outline-color: #cc0000;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header input.submit {
+    display: block;
+    clear: none;
+    float: left;
+    padding: 6px 8px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header img {
+    display: block;
+    display: block;
+    clear: none;
+    float: right;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a {
+    padding: 4px 0 0 10px;
+    color: #6fc992;
+    display: inline-block;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.response div.block {
+    background-color: #fcf6db;
+    border: 1px solid black;
+    border-color: #e5e0c6;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.response div.block pre {
+    font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+    padding: 10px;
+    font-size: 0.9em;
+    max-height: 400px;
+    overflow-y: auto;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+    margin: 0 0 10px;
+    padding: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+    margin: 0;
+    padding: 0;
+    background-color: #f5e8e8;
+    border: 1px solid #e8c6c7;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 {
+    display: block;
+    clear: none;
+    float: left;
+    width: auto;
+    margin: 0;
+    padding: 0;
+    line-height: 1.1em;
+    color: black;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span {
+    margin: 0;
+    padding: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a {
+    text-transform: uppercase;
+    background-color: #a41e22;
+    text-decoration: none;
+    color: white;
+    display: inline-block;
+    width: 50px;
+    font-size: 0.7em;
+    text-align: center;
+    padding: 7px 0 4px 0;
+    -moz-border-radius: 2px;
+    -webkit-border-radius: 2px;
+    -o-border-radius: 2px;
+    -ms-border-radius: 2px;
+    -khtml-border-radius: 2px;
+    border-radius: 2px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path {
+    padding-left: 10px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path a {
+    color: black;
+    text-decoration: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.path a:hover {
+    text-decoration: underline;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options {
+    overflow: hidden;
+    padding: 0;
+    display: block;
+    clear: none;
+    float: right;
+    margin: 6px 10px 0 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {
+    float: left;
+    clear: none;
+    margin: 0;
+    padding: 2px 10px;
+    border-right: 1px solid #dddddd;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:first-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.first {
+    padding-left: 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last {
+    padding-right: 0;
+    border-right: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {
+    border-right-color: #e8c6c7;
+    color: #a41e22;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a {
+    color: #a41e22;
+    text-decoration: none;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a:hover, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a:active, body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a.active {
+    text-decoration: underline;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
+    background-color: #f7eded;
+    border: 1px solid #e8c6c7;
+    border-top: none;
+    padding: 10px;
+    -moz-border-radius-bottomleft: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -o-border-bottom-left-radius: 6px;
+    -ms-border-bottom-left-radius: 6px;
+    -khtml-border-bottom-left-radius: 6px;
+    border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomright: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    -o-border-bottom-right-radius: 6px;
+    -ms-border-bottom-right-radius: 6px;
+    -khtml-border-bottom-right-radius: 6px;
+    border-bottom-right-radius: 6px;
+    margin: 0 0 20px 0;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 {
+    color: #a41e22;
+    font-size: 1.1em;
+    margin: 0;
+    padding: 15px 0 5px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content form input[type='text'].error {
+    outline: 2px solid black;
+    outline-color: #cc0000;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header input.submit {
+    display: block;
+    clear: none;
+    float: left;
+    padding: 6px 8px;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header img {
+    display: block;
+    clear: none;
+    float: right;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a {
+    padding: 4px 0 0 10px;
+    color: #c8787a;
+    display: inline-block;
+    font-size: 0.9em;
+}
+
+body ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.response div.block pre {
+    font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+    padding: 10px;
+    font-size: 0.9em;
+    max-height: 400px;
+    overflow-y: auto;
+}
+
+
+.model-signature {
+    font-family: "Droid Sans", sans-serif;
+    font-size: 1em;
+    line-height: 1.5em;
+}
+
+.model-signature .description div {
+    font-size: 0.9em;
+    line-height: 1.5em;
+    margin-left: 1em;
+}
+
+.model-signature .description .strong {
+    font-weight: bold;
+    color: #000;
+    font-size: .9em;
+}
+
+.model-signature .description .stronger {
+    font-weight: bold;
+    color: #000;
+}
+
+.model-signature .signature-nav a {
+    text-decoration: none;
+    color: #AAA;
+}
+
+.model-signature pre {
+    font-size: .85em;
+    line-height: 1.2em;
+    overflow: auto;
+    max-height: 200px;
+    cursor: pointer;
+}
+
+.model-signature pre:hover {
+    background-color: #ffffdd;
+}
+
+.model-signature .snippet small {
+    font-size: 0.75em;
+}
+
+.model-signature .signature-container {
+    clear: both;
+}
+
+.model-signature .signature-nav a:hover {
+    text-decoration: underline;
+    color: black;
+}
+
+.model-signature .signature-nav .selected {
+    color: black;
+    text-decoration: none;
+}
+
+.model-signature ul.signature-nav {
+    display: block;
+    margin: 0;
+    padding: 0;
+}
+
+.model-signature ul.signature-nav li {
+    float: left;
+    margin: 0 5px 5px 0;
+    padding: 2px 5px 2px 0;
+    border-right: 1px solid #ddd;
+}
+
+.model-signature ul.signature-nav li:last-child {
+    padding-right: 0;
+    border-right: none;
+}
+
+.model-signature .propName {
+  font-weight: bold;
+}
+.model-signature .propType {
+  color: #5555aa;
+}
+.model-signature .propOptKey {
+  font-style: italic;
+}
+.model-signature .propOpt {
+  color: #555;
+}
+
+pre code {
+  background: none;
+}
+
+.content pre {
+  font-size: 12px;
+  margin-top: 5px;
+  padding: 5px;
+}
+
+.content > .content-type > div > label {
+  clear: both;
+  display: block;
+  color: #0F6AB4;
+  font-size: 1.1em;
+  margin: 0;
+  padding: 15px 0 5px;
+}
+
+.swagger-ui-wrap {
+  max-width: 960px;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+.icon-btn {
+  cursor: pointer;
+}
+
+#message-bar {
+  min-height: 30px;
+  text-align: center;
+  padding-top: 10px;
+}
+
+.message-success {
+  color: #89BF04;
+}
+
+.message-fail {
+  color: #cc0000;
+}

二进制
MediaBrowser.Server.Implementations/swagger-ui/images/logo_small.png


二进制
MediaBrowser.Server.Implementations/swagger-ui/images/throbber.gif


+ 26 - 34
MediaBrowser.Server.Implementations/swagger-ui/index.html

@@ -1,52 +1,44 @@
+<!DOCTYPE html>
 <html>
 <html>
 <head>
 <head>
     <title>Swagger UI</title>
     <title>Swagger UI</title>
-    <link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'/>
+    <link href='//fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'/>
+    <link href='css/hightlight.default.css' media='screen' rel='stylesheet' type='text/css'/>
     <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
     <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
-    <script src='lib/jquery.min.js' type='text/javascript'></script>
+    <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
     <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
     <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
     <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
     <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
     <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
     <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
-    <script src='lib/handlebars.runtime-1.0.0.beta.6.js' type='text/javascript'></script>
+    <script src='lib/handlebars-1.0.rc.1.js' type='text/javascript'></script>
     <script src='lib/underscore-min.js' type='text/javascript'></script>
     <script src='lib/underscore-min.js' type='text/javascript'></script>
     <script src='lib/backbone-min.js' type='text/javascript'></script>
     <script src='lib/backbone-min.js' type='text/javascript'></script>
     <script src='lib/swagger.js' type='text/javascript'></script>
     <script src='lib/swagger.js' type='text/javascript'></script>
     <script src='swagger-ui.js' type='text/javascript'></script>
     <script src='swagger-ui.js' type='text/javascript'></script>
-
-    <style type="text/css">
-        .swagger-ui-wrap {
-            max-width: 960px;
-            margin-left: auto;
-            margin-right: auto;
-        }
-
-        .icon-btn {
-            cursor: pointer;
-        }
-
-        #message-bar {
-            min-height: 30px;
-            text-align: center;
-            padding-top: 10px;
-        }
-
-        .message-success {
-            color: #89BF04;
-        }
-
-        .message-fail {
-            color: #cc0000;
-        }
-    </style>
+    <script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
 
 
     <script type="text/javascript">
     <script type="text/javascript">
-        $(function () {
-            window.swaggerUi = new SwaggerUi({
-                discoveryUrl:'../resources',
-                apiKey:"",
+	$(function () {
+	    window.swaggerUi = new SwaggerUi({
+	        discoveryUrl: "../resources",
+                apiKey:"special-key",
                 dom_id:"swagger-ui-container",
                 dom_id:"swagger-ui-container",
                 supportHeaderParams: false,
                 supportHeaderParams: false,
-                supportedSubmitMethods: ['get', 'post', 'put']
+                supportedSubmitMethods: ['get', 'post', 'put'],
+                onComplete: function(swaggerApi, swaggerUi){
+                	if(console) {
+                        console.log("Loaded SwaggerUI")
+                        console.log(swaggerApi);
+                        console.log(swaggerUi);
+                    }
+                  $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
+                },
+                onFailure: function(data) {
+                	if(console) {
+                        console.log("Unable to Load SwaggerUI");
+                        console.log(data);
+                    }
+                },
+                docExpansion: "none"
             });
             });
 
 
             window.swaggerUi.load();
             window.swaggerUi.load();

文件差异内容过多而无法显示
+ 212 - 0
MediaBrowser.Server.Implementations/swagger-ui/lib/handlebars-1.0.rc.1.js


+ 0 - 223
MediaBrowser.Server.Implementations/swagger-ui/lib/handlebars.runtime-1.0.0.beta.6.js

@@ -1,223 +0,0 @@
-// lib/handlebars/base.js
-var Handlebars = {};
-
-Handlebars.VERSION = "1.0.beta.6";
-
-Handlebars.helpers  = {};
-Handlebars.partials = {};
-
-Handlebars.registerHelper = function(name, fn, inverse) {
-  if(inverse) { fn.not = inverse; }
-  this.helpers[name] = fn;
-};
-
-Handlebars.registerPartial = function(name, str) {
-  this.partials[name] = str;
-};
-
-Handlebars.registerHelper('helperMissing', function(arg) {
-  if(arguments.length === 2) {
-    return undefined;
-  } else {
-    throw new Error("Could not find property '" + arg + "'");
-  }
-});
-
-var toString = Object.prototype.toString, functionType = "[object Function]";
-
-Handlebars.registerHelper('blockHelperMissing', function(context, options) {
-  var inverse = options.inverse || function() {}, fn = options.fn;
-
-
-  var ret = "";
-  var type = toString.call(context);
-
-  if(type === functionType) { context = context.call(this); }
-
-  if(context === true) {
-    return fn(this);
-  } else if(context === false || context == null) {
-    return inverse(this);
-  } else if(type === "[object Array]") {
-    if(context.length > 0) {
-      for(var i=0, j=context.length; i<j; i++) {
-        ret = ret + fn(context[i]);
-      }
-    } else {
-      ret = inverse(this);
-    }
-    return ret;
-  } else {
-    return fn(context);
-  }
-});
-
-Handlebars.registerHelper('each', function(context, options) {
-  var fn = options.fn, inverse = options.inverse;
-  var ret = "";
-
-  if(context && context.length > 0) {
-    for(var i=0, j=context.length; i<j; i++) {
-      ret = ret + fn(context[i]);
-    }
-  } else {
-    ret = inverse(this);
-  }
-  return ret;
-});
-
-Handlebars.registerHelper('if', function(context, options) {
-  var type = toString.call(context);
-  if(type === functionType) { context = context.call(this); }
-
-  if(!context || Handlebars.Utils.isEmpty(context)) {
-    return options.inverse(this);
-  } else {
-    return options.fn(this);
-  }
-});
-
-Handlebars.registerHelper('unless', function(context, options) {
-  var fn = options.fn, inverse = options.inverse;
-  options.fn = inverse;
-  options.inverse = fn;
-
-  return Handlebars.helpers['if'].call(this, context, options);
-});
-
-Handlebars.registerHelper('with', function(context, options) {
-  return options.fn(context);
-});
-
-Handlebars.registerHelper('log', function(context) {
-  Handlebars.log(context);
-});
-;
-// lib/handlebars/utils.js
-Handlebars.Exception = function(message) {
-  var tmp = Error.prototype.constructor.apply(this, arguments);
-
-  for (var p in tmp) {
-    if (tmp.hasOwnProperty(p)) { this[p] = tmp[p]; }
-  }
-
-  this.message = tmp.message;
-};
-Handlebars.Exception.prototype = new Error;
-
-// Build out our basic SafeString type
-Handlebars.SafeString = function(string) {
-  this.string = string;
-};
-Handlebars.SafeString.prototype.toString = function() {
-  return this.string.toString();
-};
-
-(function() {
-  var escape = {
-    "<": "&lt;",
-    ">": "&gt;",
-    '"': "&quot;",
-    "'": "&#x27;",
-    "`": "&#x60;"
-  };
-
-  var badChars = /&(?!\w+;)|[<>"'`]/g;
-  var possible = /[&<>"'`]/;
-
-  var escapeChar = function(chr) {
-    return escape[chr] || "&amp;";
-  };
-
-  Handlebars.Utils = {
-    escapeExpression: function(string) {
-      // don't escape SafeStrings, since they're already safe
-      if (string instanceof Handlebars.SafeString) {
-        return string.toString();
-      } else if (string == null || string === false) {
-        return "";
-      }
-
-      if(!possible.test(string)) { return string; }
-      return string.replace(badChars, escapeChar);
-    },
-
-    isEmpty: function(value) {
-      if (typeof value === "undefined") {
-        return true;
-      } else if (value === null) {
-        return true;
-      } else if (value === false) {
-        return true;
-      } else if(Object.prototype.toString.call(value) === "[object Array]" && value.length === 0) {
-        return true;
-      } else {
-        return false;
-      }
-    }
-  };
-})();;
-// lib/handlebars/runtime.js
-Handlebars.VM = {
-  template: function(templateSpec) {
-    // Just add water
-    var container = {
-      escapeExpression: Handlebars.Utils.escapeExpression,
-      invokePartial: Handlebars.VM.invokePartial,
-      programs: [],
-      program: function(i, fn, data) {
-        var programWrapper = this.programs[i];
-        if(data) {
-          return Handlebars.VM.program(fn, data);
-        } else if(programWrapper) {
-          return programWrapper;
-        } else {
-          programWrapper = this.programs[i] = Handlebars.VM.program(fn);
-          return programWrapper;
-        }
-      },
-      programWithDepth: Handlebars.VM.programWithDepth,
-      noop: Handlebars.VM.noop
-    };
-
-    return function(context, options) {
-      options = options || {};
-      return templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);
-    };
-  },
-
-  programWithDepth: function(fn, data, $depth) {
-    var args = Array.prototype.slice.call(arguments, 2);
-
-    return function(context, options) {
-      options = options || {};
-
-      return fn.apply(this, [context, options.data || data].concat(args));
-    };
-  },
-  program: function(fn, data) {
-    return function(context, options) {
-      options = options || {};
-
-      return fn(context, options.data || data);
-    };
-  },
-  noop: function() { return ""; },
-  invokePartial: function(partial, name, context, helpers, partials, data) {
-    options = { helpers: helpers, partials: partials, data: data };
-
-    if(partial === undefined) {
-      throw new Handlebars.Exception("The partial " + name + " could not be found");
-    } else if(partial instanceof Function) {
-      return partial(context, options);
-    } else if (!Handlebars.compile) {
-      throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
-    } else {
-      partials[name] = Handlebars.compile(partial);
-      return partials[name](context, options);
-    }
-  }
-};
-
-Handlebars.template = Handlebars.VM.template;
-;

文件差异内容过多而无法显示
+ 0 - 0
MediaBrowser.Server.Implementations/swagger-ui/lib/highlight.7.3.pack.js


文件差异内容过多而无法显示
+ 1 - 0
MediaBrowser.Server.Implementations/swagger-ui/lib/jquery-1.8.0.min.js


文件差异内容过多而无法显示
+ 0 - 1
MediaBrowser.Server.Implementations/swagger-ui/lib/jquery.min.js


+ 287 - 29
MediaBrowser.Server.Implementations/swagger-ui/lib/swagger.js

@@ -1,6 +1,6 @@
-// Generated by CoffeeScript 1.3.3
+// Generated by CoffeeScript 1.4.0
 (function() {
 (function() {
-  var SwaggerApi, SwaggerOperation, SwaggerRequest, SwaggerResource,
+  var SwaggerApi, SwaggerModel, SwaggerModelProperty, SwaggerOperation, SwaggerRequest, SwaggerResource,
     __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
     __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
 
 
   SwaggerApi = (function() {
   SwaggerApi = (function() {
@@ -40,6 +40,8 @@
       }
       }
       this.failure = options.failure != null ? options.failure : function() {};
       this.failure = options.failure != null ? options.failure : function() {};
       this.progress = options.progress != null ? options.progress : function() {};
       this.progress = options.progress != null ? options.progress : function() {};
+      this.headers = options.headers != null ? options.headers : {};
+      this.booleanValues = options.booleanValues != null ? options.booleanValues : new Array('true', 'false');
       this.discoveryUrl = this.suffixApiKey(this.discoveryUrl);
       this.discoveryUrl = this.suffixApiKey(this.discoveryUrl);
       if (options.success != null) {
       if (options.success != null) {
         this.build();
         this.build();
@@ -51,6 +53,9 @@
       this.progress('fetching resource list: ' + this.discoveryUrl);
       this.progress('fetching resource list: ' + this.discoveryUrl);
       return jQuery.getJSON(this.discoveryUrl, function(response) {
       return jQuery.getJSON(this.discoveryUrl, function(response) {
         var res, resource, _i, _j, _len, _len1, _ref, _ref1;
         var res, resource, _i, _j, _len, _len1, _ref, _ref1;
+        if (response.apiVersion != null) {
+          _this.apiVersion = response.apiVersion;
+        }
         if ((response.basePath != null) && jQuery.trim(response.basePath).length > 0) {
         if ((response.basePath != null) && jQuery.trim(response.basePath).length > 0) {
           _this.basePath = response.basePath;
           _this.basePath = response.basePath;
           if (_this.basePath.match(/^HTTP/i) == null) {
           if (_this.basePath.match(/^HTTP/i) == null) {
@@ -61,8 +66,8 @@
           _this.basePath = _this.discoveryUrl.substring(0, _this.discoveryUrl.lastIndexOf('/'));
           _this.basePath = _this.discoveryUrl.substring(0, _this.discoveryUrl.lastIndexOf('/'));
           log('derived basepath from discoveryUrl as ' + _this.basePath);
           log('derived basepath from discoveryUrl as ' + _this.basePath);
         }
         }
-        _this.resources = {};
-        _this.resourcesArray = [];
+        _this.apis = {};
+        _this.apisArray = [];
         if (response.resourcePath != null) {
         if (response.resourcePath != null) {
           _this.resourcePath = response.resourcePath;
           _this.resourcePath = response.resourcePath;
           res = null;
           res = null;
@@ -76,8 +81,8 @@
             }
             }
           }
           }
           if (res != null) {
           if (res != null) {
-            _this.resources[res.name] = res;
-            _this.resourcesArray.push(res);
+            _this.apis[res.name] = res;
+            _this.apisArray.push(res);
             res.ready = true;
             res.ready = true;
             _this.selfReflect();
             _this.selfReflect();
           }
           }
@@ -86,28 +91,37 @@
           for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
           for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
             resource = _ref1[_j];
             resource = _ref1[_j];
             res = new SwaggerResource(resource, _this);
             res = new SwaggerResource(resource, _this);
-            _this.resources[res.name] = res;
-            _this.resourcesArray.push(res);
+            _this.apis[res.name] = res;
+            _this.apisArray.push(res);
           }
           }
         }
         }
         return _this;
         return _this;
       }).error(function(error) {
       }).error(function(error) {
-        return _this.fail(error.status + ' : ' + error.statusText + ' ' + _this.discoveryUrl);
+        if (_this.discoveryUrl.substring(0, 4) !== 'http') {
+          return _this.fail('Please specify the protocol for ' + _this.discoveryUrl);
+        } else if (error.status === 0) {
+          return _this.fail('Can\'t read from server.  It may not have the appropriate access-control-origin settings.');
+        } else if (error.status === 404) {
+          return _this.fail('Can\'t read swagger JSON from ' + _this.discoveryUrl);
+        } else {
+          return _this.fail(error.status + ' : ' + error.statusText + ' ' + _this.discoveryUrl);
+        }
       });
       });
     };
     };
 
 
     SwaggerApi.prototype.selfReflect = function() {
     SwaggerApi.prototype.selfReflect = function() {
       var resource, resource_name, _ref;
       var resource, resource_name, _ref;
-      if (this.resources == null) {
+      if (this.apis == null) {
         return false;
         return false;
       }
       }
-      _ref = this.resources;
+      _ref = this.apis;
       for (resource_name in _ref) {
       for (resource_name in _ref) {
         resource = _ref[resource_name];
         resource = _ref[resource_name];
         if (resource.ready == null) {
         if (resource.ready == null) {
           return false;
           return false;
         }
         }
       }
       }
+      this.setConsolidatedModels();
       this.ready = true;
       this.ready = true;
       if (this.success != null) {
       if (this.success != null) {
         return this.success();
         return this.success();
@@ -119,6 +133,29 @@
       throw message;
       throw message;
     };
     };
 
 
+    SwaggerApi.prototype.setConsolidatedModels = function() {
+      var model, modelName, resource, resource_name, _i, _len, _ref, _ref1, _results;
+      this.modelsArray = [];
+      this.models = {};
+      _ref = this.apis;
+      for (resource_name in _ref) {
+        resource = _ref[resource_name];
+        for (modelName in resource.models) {
+          if (!(this.models[modelName] != null)) {
+            this.models[modelName] = resource.models[modelName];
+            this.modelsArray.push(resource.models[modelName]);
+          }
+        }
+      }
+      _ref1 = this.modelsArray;
+      _results = [];
+      for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+        model = _ref1[_i];
+        _results.push(model.setReferencedModels(this.models));
+      }
+      return _results;
+    };
+
     SwaggerApi.prototype.suffixApiKey = function(url) {
     SwaggerApi.prototype.suffixApiKey = function(url) {
       var sep;
       var sep;
       if ((this.api_key != null) && jQuery.trim(this.api_key).length > 0 && (url != null)) {
       if ((this.api_key != null) && jQuery.trim(this.api_key).length > 0 && (url != null)) {
@@ -131,7 +168,7 @@
 
 
     SwaggerApi.prototype.help = function() {
     SwaggerApi.prototype.help = function() {
       var operation, operation_name, parameter, resource, resource_name, _i, _len, _ref, _ref1, _ref2;
       var operation, operation_name, parameter, resource, resource_name, _i, _len, _ref, _ref1, _ref2;
-      _ref = this.resources;
+      _ref = this.apis;
       for (resource_name in _ref) {
       for (resource_name in _ref) {
         resource = _ref[resource_name];
         resource = _ref[resource_name];
         console.log(resource_name);
         console.log(resource_name);
@@ -166,8 +203,11 @@
       this.basePath = this.api.basePath;
       this.basePath = this.api.basePath;
       this.operations = {};
       this.operations = {};
       this.operationsArray = [];
       this.operationsArray = [];
+      this.modelsArray = [];
+      this.models = {};
       if ((resourceObj.operations != null) && (this.api.resourcePath != null)) {
       if ((resourceObj.operations != null) && (this.api.resourcePath != null)) {
-        this.api.progress('reading resource ' + this.name + ' operations');
+        this.api.progress('reading resource ' + this.name + ' models and operations');
+        this.addModels(resourceObj.models);
         this.addOperations(resourceObj.path, resourceObj.operations);
         this.addOperations(resourceObj.path, resourceObj.operations);
         this.api[this.name] = this;
         this.api[this.name] = this;
       } else {
       } else {
@@ -182,6 +222,7 @@
             _this.basePath = response.basePath;
             _this.basePath = response.basePath;
             _this.basePath = _this.basePath.replace(/\/$/, '');
             _this.basePath = _this.basePath.replace(/\/$/, '');
           }
           }
+          _this.addModels(response.models);
           if (response.apis) {
           if (response.apis) {
             _ref = response.apis;
             _ref = response.apis;
             for (_i = 0, _len = _ref.length; _i < _len; _i++) {
             for (_i = 0, _len = _ref.length; _i < _len; _i++) {
@@ -193,18 +234,42 @@
           _this.ready = true;
           _this.ready = true;
           return _this.api.selfReflect();
           return _this.api.selfReflect();
         }).error(function(error) {
         }).error(function(error) {
-          return _this.fail(error.status + ' : ' + error.statusText + ' ' + _this.url);
+          return _this.api.fail("Unable to read api '" + _this.name + "' from path " + _this.url + " (server returned " + error.statusText + ")");
         });
         });
       }
       }
     }
     }
 
 
+    SwaggerResource.prototype.addModels = function(models) {
+      var model, modelName, swaggerModel, _i, _len, _ref, _results;
+      if (models != null) {
+        for (modelName in models) {
+          if (!(this.models[modelName] != null)) {
+            swaggerModel = new SwaggerModel(modelName, models[modelName]);
+            this.modelsArray.push(swaggerModel);
+            this.models[modelName] = swaggerModel;
+          }
+        }
+        _ref = this.modelsArray;
+        _results = [];
+        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+          model = _ref[_i];
+          _results.push(model.setReferencedModels(this.models));
+        }
+        return _results;
+      }
+    };
+
     SwaggerResource.prototype.addOperations = function(resource_path, ops) {
     SwaggerResource.prototype.addOperations = function(resource_path, ops) {
-      var o, op, _i, _len, _results;
+      var consumes, o, op, _i, _len, _results;
       if (ops) {
       if (ops) {
         _results = [];
         _results = [];
         for (_i = 0, _len = ops.length; _i < _len; _i++) {
         for (_i = 0, _len = ops.length; _i < _len; _i++) {
           o = ops[_i];
           o = ops[_i];
-          op = new SwaggerOperation(o.nickname, resource_path, o.httpMethod, o.parameters, o.summary, o.notes, this);
+          consumes = o.consumes;
+          if (o.supportedContentTypes) {
+            consumes = o.supportedContentTypes;
+          }
+          op = new SwaggerOperation(o.nickname, resource_path, o.httpMethod, o.parameters, o.summary, o.notes, o.responseClass, o.errorResponses, this, o.consumes, o.produces);
           this.operations[op.nickname] = op;
           this.operations[op.nickname] = op;
           _results.push(this.operationsArray.push(op));
           _results.push(this.operationsArray.push(op));
         }
         }
@@ -231,10 +296,143 @@
 
 
   })();
   })();
 
 
+  SwaggerModel = (function() {
+
+    function SwaggerModel(modelName, obj) {
+      var propertyName;
+      this.name = obj.id != null ? obj.id : modelName;
+      this.properties = [];
+      for (propertyName in obj.properties) {
+        this.properties.push(new SwaggerModelProperty(propertyName, obj.properties[propertyName]));
+      }
+    }
+
+    SwaggerModel.prototype.setReferencedModels = function(allModels) {
+      var prop, _i, _len, _ref, _results;
+      _ref = this.properties;
+      _results = [];
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        prop = _ref[_i];
+        if (allModels[prop.dataType] != null) {
+          _results.push(prop.refModel = allModels[prop.dataType]);
+        } else if ((prop.refDataType != null) && (allModels[prop.refDataType] != null)) {
+          _results.push(prop.refModel = allModels[prop.refDataType]);
+        } else {
+          _results.push(void 0);
+        }
+      }
+      return _results;
+    };
+
+    SwaggerModel.prototype.getMockSignature = function(prefix, modelsToIgnore) {
+      var classClose, classOpen, prop, propertiesStr, returnVal, strong, strongClose, stronger, _i, _j, _len, _len1, _ref, _ref1;
+      propertiesStr = [];
+      _ref = this.properties;
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        prop = _ref[_i];
+        propertiesStr.push(prop.toString());
+      }
+      strong = '<span style="font-weight: bold; color: #000; font-size: 1.0em">';
+      stronger = '<span style="font-weight: bold; color: #000; font-size: 1.1em">';
+      strongClose = '</span>';
+      classOpen = strong + 'class ' + this.name + '(' + strongClose;
+      classClose = strong + ')' + strongClose;
+      returnVal = classOpen + '<span>' + propertiesStr.join('</span>, <span>') + '</span>' + classClose;
+      if (prefix != null) {
+        returnVal = stronger + prefix + strongClose + '<br/>' + returnVal;
+      }
+      if (!modelsToIgnore) {
+        modelsToIgnore = [];
+      }
+      modelsToIgnore.push(this);
+      _ref1 = this.properties;
+      for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+        prop = _ref1[_j];
+        if ((prop.refModel != null) && (modelsToIgnore.indexOf(prop.refModel)) === -1) {
+          returnVal = returnVal + ('<br>' + prop.refModel.getMockSignature(void 0, modelsToIgnore));
+        }
+      }
+      return returnVal;
+    };
+
+    SwaggerModel.prototype.createJSONSample = function(modelToIgnore) {
+      var prop, result, _i, _len, _ref;
+      result = {};
+      _ref = this.properties;
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        prop = _ref[_i];
+        result[prop.name] = prop.getSampleValue(modelToIgnore);
+      }
+      return result;
+    };
+
+    return SwaggerModel;
+
+  })();
+
+  SwaggerModelProperty = (function() {
+
+    function SwaggerModelProperty(name, obj) {
+      this.name = name;
+      this.dataType = obj.type;
+      this.isArray = this.dataType.toLowerCase() === 'array';
+      this.descr = obj.description;
+      if (obj.items != null) {
+        if (obj.items.type != null) {
+          this.refDataType = obj.items.type;
+        }
+        if (obj.items.$ref != null) {
+          this.refDataType = obj.items.$ref;
+        }
+      }
+      this.dataTypeWithRef = this.refDataType != null ? this.dataType + '[' + this.refDataType + ']' : this.dataType;
+      if (obj.allowableValues != null) {
+        this.valueType = obj.allowableValues.valueType;
+        this.values = obj.allowableValues.values;
+        if (this.values != null) {
+          this.valuesString = "'" + this.values.join("' or '") + "'";
+        }
+      }
+    }
+
+    SwaggerModelProperty.prototype.getSampleValue = function(modelToIgnore) {
+      var result;
+      if ((this.refModel != null) && (!(this.refModel === modelToIgnore))) {
+        result = this.refModel.createJSONSample(this.refModel);
+      } else {
+        if (this.isArray) {
+          result = this.refDataType;
+        } else {
+          result = this.dataType;
+        }
+      }
+      if (this.isArray) {
+        return [result];
+      } else {
+        return result;
+      }
+    };
+
+    SwaggerModelProperty.prototype.toString = function() {
+      var str;
+      str = this.name + ': ' + this.dataTypeWithRef;
+      if (this.values != null) {
+        str += " = ['" + this.values.join("' or '") + "']";
+      }
+      if (this.descr != null) {
+        str += ' {' + this.descr + '}';
+      }
+      return str;
+    };
+
+    return SwaggerModelProperty;
+
+  })();
+
   SwaggerOperation = (function() {
   SwaggerOperation = (function() {
 
 
-    function SwaggerOperation(nickname, path, httpMethod, parameters, summary, notes, resource) {
-      var parameter, v, _i, _j, _len, _len1, _ref, _ref1,
+    function SwaggerOperation(nickname, path, httpMethod, parameters, summary, notes, responseClass, errorResponses, resource, consumes, produces) {
+      var parameter, v, _i, _j, _len, _len1, _ref, _ref1, _ref2,
         _this = this;
         _this = this;
       this.nickname = nickname;
       this.nickname = nickname;
       this.path = path;
       this.path = path;
@@ -242,7 +440,11 @@
       this.parameters = parameters != null ? parameters : [];
       this.parameters = parameters != null ? parameters : [];
       this.summary = summary;
       this.summary = summary;
       this.notes = notes;
       this.notes = notes;
+      this.responseClass = responseClass;
+      this.errorResponses = errorResponses;
       this.resource = resource;
       this.resource = resource;
+      this.consumes = consumes;
+      this.produces = produces;
       this["do"] = __bind(this["do"], this);
       this["do"] = __bind(this["do"], this);
 
 
       if (this.nickname == null) {
       if (this.nickname == null) {
@@ -258,10 +460,24 @@
       this.httpMethod = this.httpMethod.toLowerCase();
       this.httpMethod = this.httpMethod.toLowerCase();
       this.isGetMethod = this.httpMethod === "get";
       this.isGetMethod = this.httpMethod === "get";
       this.resourceName = this.resource.name;
       this.resourceName = this.resource.name;
-      _ref = this.parameters;
-      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-        parameter = _ref[_i];
+      if (((_ref = this.responseClass) != null ? _ref.toLowerCase() : void 0) === 'void') {
+        this.responseClass = void 0;
+      }
+      if (this.responseClass != null) {
+        this.responseClassSignature = this.getSignature(this.responseClass, this.resource.models);
+        this.responseSampleJSON = this.getSampleJSON(this.responseClass, this.resource.models);
+      }
+      this.errorResponses = this.errorResponses || [];
+      _ref1 = this.parameters;
+      for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+        parameter = _ref1[_i];
         parameter.name = parameter.name || parameter.dataType;
         parameter.name = parameter.name || parameter.dataType;
+        if (parameter.dataType.toLowerCase() === 'boolean') {
+          parameter.allowableValues = {};
+          parameter.allowableValues.values = this.resource.api.booleanValues;
+        }
+        parameter.signature = this.getSignature(parameter.dataType, this.resource.models);
+        parameter.sampleJSON = this.getSampleJSON(parameter.dataType, this.resource.models);
         if (parameter.allowableValues != null) {
         if (parameter.allowableValues != null) {
           if (parameter.allowableValues.valueType === "RANGE") {
           if (parameter.allowableValues.valueType === "RANGE") {
             parameter.isRange = true;
             parameter.isRange = true;
@@ -270,9 +486,9 @@
           }
           }
           if (parameter.allowableValues.values != null) {
           if (parameter.allowableValues.values != null) {
             parameter.allowableValues.descriptiveValues = [];
             parameter.allowableValues.descriptiveValues = [];
-            _ref1 = parameter.allowableValues.values;
-            for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
-              v = _ref1[_j];
+            _ref2 = parameter.allowableValues.values;
+            for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
+              v = _ref2[_j];
               if ((parameter.defaultValue != null) && parameter.defaultValue === v) {
               if ((parameter.defaultValue != null) && parameter.defaultValue === v) {
                 parameter.allowableValues.descriptiveValues.push({
                 parameter.allowableValues.descriptiveValues.push({
                   value: v,
                   value: v,
@@ -293,6 +509,40 @@
       };
       };
     }
     }
 
 
+    SwaggerOperation.prototype.isListType = function(dataType) {
+      if (dataType.indexOf('[') >= 0) {
+        return dataType.substring(dataType.indexOf('[') + 1, dataType.indexOf(']'));
+      } else {
+        return void 0;
+      }
+    };
+
+    SwaggerOperation.prototype.getSignature = function(dataType, models) {
+      var isPrimitive, listType;
+      listType = this.isListType(dataType);
+      isPrimitive = ((listType != null) && models[listType]) || (models[dataType] != null) ? false : true;
+      if (isPrimitive) {
+        return dataType;
+      } else {
+        if (listType != null) {
+          return models[listType].getMockSignature(dataType);
+        } else {
+          return models[dataType].getMockSignature(dataType);
+        }
+      }
+    };
+
+    SwaggerOperation.prototype.getSampleJSON = function(dataType, models) {
+      var isPrimitive, listType, val;
+      listType = this.isListType(dataType);
+      isPrimitive = ((listType != null) && models[listType]) || (models[dataType] != null) ? false : true;
+      val = isPrimitive ? void 0 : (listType != null ? models[listType].createJSONSample() : models[dataType].createJSONSample());
+      if (val) {
+        val = listType ? [val] : val;
+        return JSON.stringify(val, null, 2);
+      }
+    };
+
     SwaggerOperation.prototype["do"] = function(args, callback, error) {
     SwaggerOperation.prototype["do"] = function(args, callback, error) {
       var body, headers;
       var body, headers;
       if (args == null) {
       if (args == null) {
@@ -333,7 +583,7 @@
     };
     };
 
 
     SwaggerOperation.prototype.urlify = function(args, includeApiKey) {
     SwaggerOperation.prototype.urlify = function(args, includeApiKey) {
-      var param, queryParams, url, _i, _len, _ref;
+      var param, queryParams, reg, url, _i, _len, _ref;
       if (includeApiKey == null) {
       if (includeApiKey == null) {
         includeApiKey = true;
         includeApiKey = true;
       }
       }
@@ -343,7 +593,8 @@
         param = _ref[_i];
         param = _ref[_i];
         if (param.paramType === 'path') {
         if (param.paramType === 'path') {
           if (args[param.name]) {
           if (args[param.name]) {
-            url = url.replace("{" + param.name + "}", encodeURIComponent(args[param.name]));
+            reg = new RegExp('\{' + param.name + '[^\}]*\}', 'gi');
+            url = url.replace(reg, encodeURIComponent(args[param.name]));
             delete args[param.name];
             delete args[param.name];
           } else {
           } else {
             throw "" + param.name + " is a required path param.";
             throw "" + param.name + " is a required path param.";
@@ -354,9 +605,9 @@
         args[this.apiKeyName] = this.resource.api.api_key;
         args[this.apiKeyName] = this.resource.api.api_key;
       }
       }
       if (this.supportHeaderParams()) {
       if (this.supportHeaderParams()) {
-        queryParams = jQuery.param(this.getQueryParams(args));
+        queryParams = jQuery.param(this.getQueryParams(args, includeApiKey));
       } else {
       } else {
-        queryParams = jQuery.param(this.getQueryAndHeaderParams(args));
+        queryParams = jQuery.param(this.getQueryAndHeaderParams(args, includeApiKey));
       }
       }
       if ((queryParams != null) && queryParams.length > 0) {
       if ((queryParams != null) && queryParams.length > 0) {
         url += "?" + queryParams;
         url += "?" + queryParams;
@@ -394,7 +645,7 @@
     };
     };
 
 
     SwaggerOperation.prototype.getMatchingParams = function(paramTypes, args, includeApiKey) {
     SwaggerOperation.prototype.getMatchingParams = function(paramTypes, args, includeApiKey) {
-      var matchingParams, param, _i, _len, _ref;
+      var matchingParams, name, param, value, _i, _len, _ref, _ref1;
       matchingParams = {};
       matchingParams = {};
       _ref = this.parameters;
       _ref = this.parameters;
       for (_i = 0, _len = _ref.length; _i < _len; _i++) {
       for (_i = 0, _len = _ref.length; _i < _len; _i++) {
@@ -406,6 +657,13 @@
       if (includeApiKey && (this.resource.api.api_key != null) && this.resource.api.api_key.length > 0) {
       if (includeApiKey && (this.resource.api.api_key != null) && this.resource.api.api_key.length > 0) {
         matchingParams[this.resource.api.apiKeyName] = this.resource.api.api_key;
         matchingParams[this.resource.api.apiKeyName] = this.resource.api.api_key;
       }
       }
+      if (jQuery.inArray('header', paramTypes) >= 0) {
+        _ref1 = this.resource.api.headers;
+        for (name in _ref1) {
+          value = _ref1[name];
+          matchingParams[name] = value;
+        }
+      }
       return matchingParams;
       return matchingParams;
     };
     };
 
 

文件差异内容过多而无法显示
+ 479 - 88
MediaBrowser.Server.Implementations/swagger-ui/swagger-ui.js


文件差异内容过多而无法显示
+ 0 - 0
MediaBrowser.Server.Implementations/swagger-ui/swagger-ui.min.js


+ 21 - 6
MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj

@@ -138,17 +138,32 @@
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\packages\MediaBrowser.IsoMounting.3.0.51\lib\net45\pfmclrapi.dll</HintPath>
       <HintPath>..\packages\MediaBrowser.IsoMounting.3.0.51\lib\net45\pfmclrapi.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Common, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack">
+      <HintPath>..\packages\ServiceStack.3.9.44\lib\net35\ServiceStack.dll</HintPath>
+    </Reference>
+    <Reference Include="ServiceStack.Common, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Common.3.9.43\lib\net35\ServiceStack.Common.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Common.3.9.44\lib\net35\ServiceStack.Common.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Interfaces, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Interfaces, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Common.3.9.43\lib\net35\ServiceStack.Interfaces.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Common.3.9.44\lib\net35\ServiceStack.Interfaces.dll</HintPath>
+    </Reference>
+    <Reference Include="ServiceStack.OrmLite">
+      <HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.44\lib\ServiceStack.OrmLite.dll</HintPath>
+    </Reference>
+    <Reference Include="ServiceStack.OrmLite.SqlServer">
+      <HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.44\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
+    </Reference>
+    <Reference Include="ServiceStack.Redis">
+      <HintPath>..\packages\ServiceStack.Redis.3.9.44\lib\net35\ServiceStack.Redis.dll</HintPath>
+    </Reference>
+    <Reference Include="ServiceStack.ServiceInterface">
+      <HintPath>..\packages\ServiceStack.3.9.44\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Text, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Text, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Text.3.9.43\lib\net35\ServiceStack.Text.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Text.3.9.44\lib\net35\ServiceStack.Text.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="SimpleInjector, Version=2.2.1.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
     <Reference Include="SimpleInjector, Version=2.2.1.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>

+ 5 - 2
MediaBrowser.ServerApplication/packages.config

@@ -5,7 +5,10 @@
   <package id="MahApps.Metro" version="0.11.0.17-ALPHA" targetFramework="net45" />
   <package id="MahApps.Metro" version="0.11.0.17-ALPHA" targetFramework="net45" />
   <package id="MediaBrowser.IsoMounting" version="3.0.51" targetFramework="net45" />
   <package id="MediaBrowser.IsoMounting" version="3.0.51" targetFramework="net45" />
   <package id="NLog" version="2.0.1.2" targetFramework="net45" />
   <package id="NLog" version="2.0.1.2" targetFramework="net45" />
-  <package id="ServiceStack.Common" version="3.9.43" targetFramework="net45" />
-  <package id="ServiceStack.Text" version="3.9.43" targetFramework="net45" />
+  <package id="ServiceStack" version="3.9.44" targetFramework="net45" />
+  <package id="ServiceStack.Common" version="3.9.44" targetFramework="net45" />
+  <package id="ServiceStack.OrmLite.SqlServer" version="3.9.44" targetFramework="net45" />
+  <package id="ServiceStack.Redis" version="3.9.44" targetFramework="net45" />
+  <package id="ServiceStack.Text" version="3.9.44" targetFramework="net45" />
   <package id="SimpleInjector" version="2.2.1" targetFramework="net45" />
   <package id="SimpleInjector" version="2.2.1" targetFramework="net45" />
 </packages>
 </packages>

+ 9 - 6
MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj

@@ -35,17 +35,17 @@
     <RunPostBuildEvent>Always</RunPostBuildEvent>
     <RunPostBuildEvent>Always</RunPostBuildEvent>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
-    <Reference Include="ServiceStack.Common, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Common, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Common.3.9.43\lib\net35\ServiceStack.Common.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Common.3.9.44\lib\net35\ServiceStack.Common.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Interfaces, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Interfaces, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Common.3.9.43\lib\net35\ServiceStack.Interfaces.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Common.3.9.44\lib\net35\ServiceStack.Interfaces.dll</HintPath>
     </Reference>
     </Reference>
-    <Reference Include="ServiceStack.Text, Version=3.9.43.0, Culture=neutral, processorArchitecture=MSIL">
+    <Reference Include="ServiceStack.Text, Version=3.9.44.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Text.3.9.43\lib\net35\ServiceStack.Text.dll</HintPath>
+      <HintPath>..\packages\ServiceStack.Text.3.9.44\lib\net35\ServiceStack.Text.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System" />
     <Reference Include="System.ComponentModel.Composition" />
     <Reference Include="System.ComponentModel.Composition" />
@@ -111,6 +111,9 @@
     <Content Include="dashboard-ui\css\images\items\searchhints\tv.png">
     <Content Include="dashboard-ui\css\images\items\searchhints\tv.png">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
+    <Content Include="dashboard-ui\css\images\media\settings.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="dashboard-ui\css\images\rotten.png">
     <Content Include="dashboard-ui\css\images\rotten.png">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>

+ 2 - 2
MediaBrowser.WebDashboard/packages.config

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
 <packages>
   <package id="MediaBrowser.ApiClient.Javascript" version="3.0.99" targetFramework="net45" />
   <package id="MediaBrowser.ApiClient.Javascript" version="3.0.99" targetFramework="net45" />
-  <package id="ServiceStack.Common" version="3.9.43" targetFramework="net45" />
-  <package id="ServiceStack.Text" version="3.9.43" targetFramework="net45" />
+  <package id="ServiceStack.Common" version="3.9.44" targetFramework="net45" />
+  <package id="ServiceStack.Text" version="3.9.44" targetFramework="net45" />
 </packages>
 </packages>

部分文件因为文件数量过多而无法显示