Jelajahi Sumber

restored audio

LukePulverenti 12 tahun lalu
induk
melakukan
3751e14eb1
39 mengubah file dengan 1221 tambahan dan 3801 penghapusan
  1. 9 4
      MediaBrowser.Api/MediaBrowser.Api.csproj
  2. 624 0
      MediaBrowser.Api/Playback/BaseStreamingService.cs
  3. 86 0
      MediaBrowser.Api/Playback/Progressive/AudioService.cs
  4. 151 0
      MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
  5. 86 0
      MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs
  6. 51 47
      MediaBrowser.Api/Playback/Progressive/VideoService.cs
  7. 73 0
      MediaBrowser.Api/Playback/StreamRequest.cs
  8. 34 0
      MediaBrowser.Api/Playback/StreamState.cs
  9. 0 1
      MediaBrowser.Api/PluginService.cs
  10. 0 5
      MediaBrowser.Api/ScheduledTasks/ScheduledTasksWebSocketListener.cs
  11. 0 110
      MediaBrowser.Api/Streaming/AudioHandler.cs
  12. 0 152
      MediaBrowser.Api/Streaming/BaseProgressiveStreamingHandler.cs
  13. 17 13
      MediaBrowser.Common.Implementations/BaseApplicationHost.cs
  14. 10 1
      MediaBrowser.Common.Implementations/HttpServer/HttpServer.cs
  15. 2 0
      MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
  16. 0 2
      MediaBrowser.Common.Implementations/ServerManager/ServerManager.cs
  17. 24 23
      MediaBrowser.Controller/Localization/LocalizedStrings.cs
  18. 2 2
      MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs
  19. 0 154
      MediaBrowser.Networking/MediaBrowser.Networking.csproj
  20. 0 31
      MediaBrowser.Networking/Properties/AssemblyInfo.cs
  21. 0 41
      MediaBrowser.Networking/README.txt
  22. 0 15
      MediaBrowser.Networking/packages.config
  23. 0 959
      MediaBrowser.Networking/swagger-ui/css/screen.css
  24. TEMPAT SAMPAH
      MediaBrowser.Networking/swagger-ui/images/pet_store_api.png
  25. TEMPAT SAMPAH
      MediaBrowser.Networking/swagger-ui/images/wordnik_api.png
  26. 0 88
      MediaBrowser.Networking/swagger-ui/index.html
  27. 0 38
      MediaBrowser.Networking/swagger-ui/lib/backbone-min.js
  28. 0 223
      MediaBrowser.Networking/swagger-ui/lib/handlebars.runtime-1.0.0.beta.6.js
  29. 0 8
      MediaBrowser.Networking/swagger-ui/lib/jquery.ba-bbq.min.js
  30. 0 1
      MediaBrowser.Networking/swagger-ui/lib/jquery.min.js
  31. 0 1
      MediaBrowser.Networking/swagger-ui/lib/jquery.slideto.min.js
  32. 0 8
      MediaBrowser.Networking/swagger-ui/lib/jquery.wiggle.min.js
  33. 0 507
      MediaBrowser.Networking/swagger-ui/lib/swagger.js
  34. 0 32
      MediaBrowser.Networking/swagger-ui/lib/underscore-min.js
  35. 0 1309
      MediaBrowser.Networking/swagger-ui/swagger-ui.js
  36. 0 0
      MediaBrowser.Networking/swagger-ui/swagger-ui.min.js
  37. 19 17
      MediaBrowser.Server.Implementations/Sqlite/SQLiteRepository.cs
  38. 2 1
      MediaBrowser.ServerApplication/ApplicationHost.cs
  39. 31 8
      MediaBrowser.WebDashboard/Html/scripts/site.js

+ 9 - 4
MediaBrowser.Api/MediaBrowser.Api.csproj

@@ -84,14 +84,18 @@
     <Compile Include="Library\LibraryStructureService.cs" />
     <Compile Include="LocalizationService.cs" />
     <Compile Include="PackageService.cs" />
+    <Compile Include="Playback\Progressive\AudioService.cs" />
+    <Compile Include="Playback\Progressive\BaseProgressiveStreamingService.cs" />
+    <Compile Include="Playback\BaseStreamingService.cs" />
+    <Compile Include="Playback\Progressive\ProgressiveStreamWriter.cs" />
     <Compile Include="Playback\StreamRequest.cs" />
+    <Compile Include="Playback\StreamState.cs" />
+    <Compile Include="Playback\Progressive\VideoService.cs" />
     <Compile Include="PluginService.cs" />
     <Compile Include="ScheduledTasks\ScheduledTaskService.cs" />
     <Compile Include="ScheduledTasks\ScheduledTasksWebSocketListener.cs" />
     <Compile Include="SystemService.cs" />
-    <Compile Include="Streaming\AudioHandler.cs" />
     <Compile Include="Streaming\BaseHlsPlaylistHandler.cs" />
-    <Compile Include="Streaming\BaseProgressiveStreamingHandler.cs" />
     <Compile Include="Streaming\BaseStreamingHandler.cs" />
     <Compile Include="UserLibrary\BaseItemsByNameService.cs" />
     <Compile Include="UserLibrary\GenresService.cs" />
@@ -104,7 +108,6 @@
     <Compile Include="Streaming\HlsAudioPlaylistHandler.cs" />
     <Compile Include="Streaming\HlsSegmentHandler.cs" />
     <Compile Include="Streaming\HlsVideoPlaylistHandler.cs" />
-    <Compile Include="Streaming\VideoHandler.cs" />
     <Compile Include="Plugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="WeatherService.cs" />
@@ -136,7 +139,9 @@
     <EmbeddedResource Include="Javascript\ApiClient.js" />
     <Content Include="options.xml" />
   </ItemGroup>
-  <ItemGroup />
+  <ItemGroup>
+    <Folder Include="Playback\Hls\" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
     <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\CorePlugins\" /y</PostBuildEvent>

+ 624 - 0
MediaBrowser.Api/Playback/BaseStreamingService.cs

@@ -0,0 +1,624 @@
+using MediaBrowser.Common.Extensions;
+using MediaBrowser.Common.Implementations.HttpServer;
+using MediaBrowser.Common.IO;
+using MediaBrowser.Controller;
+using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Library;
+using MediaBrowser.Model.Drawing;
+using MediaBrowser.Model.Dto;
+using MediaBrowser.Model.Entities;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace MediaBrowser.Api.Playback
+{
+    /// <summary>
+    /// Class BaseStreamingService
+    /// </summary>
+    public abstract class BaseStreamingService : BaseRestService
+    {
+        /// <summary>
+        /// Gets or sets the application paths.
+        /// </summary>
+        /// <value>The application paths.</value>
+        protected IServerApplicationPaths ApplicationPaths { get; set; }
+
+        /// <summary>
+        /// Gets the server kernel.
+        /// </summary>
+        /// <value>The server kernel.</value>
+        protected Kernel ServerKernel
+        {
+            get { return Kernel as Kernel; }
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="BaseStreamingService" /> class.
+        /// </summary>
+        /// <param name="appPaths">The app paths.</param>
+        protected BaseStreamingService(IServerApplicationPaths appPaths)
+        {
+            ApplicationPaths = appPaths;
+        }
+
+        /// <summary>
+        /// Gets the command line arguments.
+        /// </summary>
+        /// <param name="outputPath">The output path.</param>
+        /// <param name="state">The state.</param>
+        /// <returns>System.String.</returns>
+        protected abstract string GetCommandLineArguments(string outputPath, StreamState state);
+
+        /// <summary>
+        /// Gets the type of the transcoding job.
+        /// </summary>
+        /// <value>The type of the transcoding job.</value>
+        protected abstract TranscodingJobType TranscodingJobType { get; }
+
+        /// <summary>
+        /// Gets the output file extension.
+        /// </summary>
+        /// <param name="state">The state.</param>
+        /// <returns>System.String.</returns>
+        protected virtual string GetOutputFileExtension(StreamState state)
+        {
+            return Path.GetExtension(state.Url);
+        }
+
+        /// <summary>
+        /// Gets the output file path.
+        /// </summary>
+        /// <param name="state">The state.</param>
+        /// <returns>System.String.</returns>
+        protected string GetOutputFilePath(StreamState state)
+        {
+            var folder = ApplicationPaths.FFMpegStreamCachePath;
+            return Path.Combine(folder, GetCommandLineArguments("dummy\\dummy", state).GetMD5() + GetOutputFileExtension(state).ToLower());
+        }
+
+        /// <summary>
+        /// The fast seek offset seconds
+        /// </summary>
+        private const int FastSeekOffsetSeconds = 1;
+
+        /// <summary>
+        /// Gets the fast seek command line parameter.
+        /// </summary>
+        /// <param name="request">The request.</param>
+        /// <returns>System.String.</returns>
+        /// <value>The fast seek command line parameter.</value>
+        protected string GetFastSeekCommandLineParameter(StreamRequest request)
+        {
+            var time = request.StartTimeTicks;
+
+            if (time.HasValue)
+            {
+                var seconds = TimeSpan.FromTicks(time.Value).TotalSeconds - FastSeekOffsetSeconds;
+
+                if (seconds > 0)
+                {
+                    return string.Format("-ss {0}", seconds);
+                }
+            }
+
+            return string.Empty;
+        }
+
+        /// <summary>
+        /// Gets the slow seek command line parameter.
+        /// </summary>
+        /// <param name="request">The request.</param>
+        /// <returns>System.String.</returns>
+        /// <value>The slow seek command line parameter.</value>
+        protected string GetSlowSeekCommandLineParameter(StreamRequest request)
+        {
+            var time = request.StartTimeTicks;
+
+            if (time.HasValue)
+            {
+                if (TimeSpan.FromTicks(time.Value).TotalSeconds - FastSeekOffsetSeconds > 0)
+                {
+                    return string.Format(" -ss {0}", FastSeekOffsetSeconds);
+                }
+            }
+
+            return string.Empty;
+        }
+
+        /// <summary>
+        /// Gets the map args.
+        /// </summary>
+        /// <param name="state">The state.</param>
+        /// <returns>System.String.</returns>
+        protected string GetMapArgs(StreamState state)
+        {
+            var args = string.Empty;
+
+            if (state.VideoStream != null)
+            {
+                args += string.Format("-map 0:{0}", state.VideoStream.Index);
+            }
+            else
+            {
+                args += "-map -0:v";
+            }
+
+            if (state.AudioStream != null)
+            {
+                args += string.Format(" -map 0:{0}", state.AudioStream.Index);
+            }
+            else
+            {
+                args += " -map -0:a";
+            }
+
+            if (state.SubtitleStream == null)
+            {
+                args += " -map -0:s";
+            }
+
+            return args;
+        }
+
+        /// <summary>
+        /// Determines which stream will be used for playback
+        /// </summary>
+        /// <param name="allStream">All stream.</param>
+        /// <param name="desiredIndex">Index of the desired.</param>
+        /// <param name="type">The type.</param>
+        /// <param name="returnFirstIfNoIndex">if set to <c>true</c> [return first if no index].</param>
+        /// <returns>MediaStream.</returns>
+        private MediaStream GetMediaStream(IEnumerable<MediaStream> allStream, int? desiredIndex, MediaStreamType type, bool returnFirstIfNoIndex = true)
+        {
+            var streams = allStream.Where(s => s.Type == type).ToList();
+
+            if (desiredIndex.HasValue)
+            {
+                var stream = streams.FirstOrDefault(s => s.Index == desiredIndex.Value);
+
+                if (stream != null)
+                {
+                    return stream;
+                }
+            }
+
+            // Just return the first one
+            return returnFirstIfNoIndex ? streams.FirstOrDefault() : null;
+        }
+
+        /// <summary>
+        /// If we're going to put a fixed size on the command line, this will calculate it
+        /// </summary>
+        /// <param name="state">The state.</param>
+        /// <param name="outputVideoCodec">The output video codec.</param>
+        /// <returns>System.String.</returns>
+        protected string GetOutputSizeParam(StreamState state, string outputVideoCodec)
+        {
+            // http://sonnati.wordpress.com/2012/10/19/ffmpeg-the-swiss-army-knife-of-internet-streaming-part-vi/
+
+            var assSubtitleParam = string.Empty;
+
+            var request = state.Request;
+
+            if (state.SubtitleStream != null)
+            {
+                if (state.SubtitleStream.Codec.IndexOf("srt", StringComparison.OrdinalIgnoreCase) != -1 || state.SubtitleStream.Codec.IndexOf("subrip", StringComparison.OrdinalIgnoreCase) != -1)
+                {
+                    assSubtitleParam = GetTextSubtitleParam((Video)state.Item, state.SubtitleStream, request.StartTimeTicks);
+                }
+            }
+
+            // If fixed dimensions were supplied
+            if (request.Width.HasValue && request.Height.HasValue)
+            {
+                return string.Format(" -vf \"scale={0}:{1}{2}\"", request.Width.Value, request.Height.Value, assSubtitleParam);
+            }
+
+            var isH264Output = outputVideoCodec.Equals("libx264", StringComparison.OrdinalIgnoreCase);
+
+            // If a fixed width was requested
+            if (request.Width.HasValue)
+            {
+                return isH264Output ?
+                    string.Format(" -vf \"scale={0}:trunc(ow/a/2)*2{1}\"", request.Width.Value, assSubtitleParam) :
+                    string.Format(" -vf \"scale={0}:-1{1}\"", request.Width.Value, assSubtitleParam);
+            }
+
+            // If a max width was requested
+            if (request.MaxWidth.HasValue && !request.MaxHeight.HasValue)
+            {
+                return isH264Output ?
+                    string.Format(" -vf \"scale=min(iw\\,{0}):trunc(ow/a/2)*2{1}\"", request.MaxWidth.Value, assSubtitleParam) :
+                    string.Format(" -vf \"scale=min(iw\\,{0}):-1{1}\"", request.MaxWidth.Value, assSubtitleParam);
+            }
+
+            // Need to perform calculations manually
+
+            // Try to account for bad media info
+            var currentHeight = state.VideoStream.Height ?? request.MaxHeight ?? request.Height ?? 0;
+            var currentWidth = state.VideoStream.Width ?? request.MaxWidth ?? request.Width ?? 0;
+
+            var outputSize = DrawingUtils.Resize(currentWidth, currentHeight, request.Width, request.Height, request.MaxWidth, request.MaxHeight);
+
+            // If we're encoding with libx264, it can't handle odd numbered widths or heights, so we'll have to fix that
+            if (isH264Output)
+            {
+                return string.Format(" -vf \"scale=trunc({0}/2)*2:trunc({1}/2)*2{2}\"", outputSize.Width, outputSize.Height, assSubtitleParam);
+            }
+
+            // Otherwise use -vf scale since ffmpeg will ensure internally that the aspect ratio is preserved
+            return string.Format(" -vf \"scale={0}:-1{1}\"", Convert.ToInt32(outputSize.Width), assSubtitleParam);
+        }
+
+        /// <summary>
+        /// Gets the text subtitle param.
+        /// </summary>
+        /// <param name="video">The video.</param>
+        /// <param name="subtitleStream">The subtitle stream.</param>
+        /// <param name="startTimeTicks">The start time ticks.</param>
+        /// <returns>System.String.</returns>
+        protected string GetTextSubtitleParam(Video video, MediaStream subtitleStream, long? startTimeTicks)
+        {
+            var path = subtitleStream.IsExternal ? GetConvertedAssPath(video, subtitleStream) : GetExtractedAssPath(video, subtitleStream);
+
+            if (string.IsNullOrEmpty(path))
+            {
+                return string.Empty;
+            }
+
+            var param = string.Format(",ass={0}", path);
+
+            if (startTimeTicks.HasValue)
+            {
+                var seconds = Convert.ToInt32(TimeSpan.FromTicks(startTimeTicks.Value).TotalSeconds);
+                param += string.Format(",setpts=PTS-{0}/TB", seconds);
+            }
+
+            return param;
+        }
+
+        /// <summary>
+        /// Gets the extracted ass path.
+        /// </summary>
+        /// <param name="video">The video.</param>
+        /// <param name="subtitleStream">The subtitle stream.</param>
+        /// <returns>System.String.</returns>
+        private string GetExtractedAssPath(Video video, MediaStream subtitleStream)
+        {
+            var path = ServerKernel.FFMpegManager.GetSubtitleCachePath(video, subtitleStream.Index, ".ass");
+
+            if (!File.Exists(path))
+            {
+                var success = ServerKernel.FFMpegManager.ExtractTextSubtitle(video, subtitleStream.Index, path, CancellationToken.None).Result;
+
+                if (!success)
+                {
+                    return null;
+                }
+            }
+
+            return path;
+        }
+
+        /// <summary>
+        /// Gets the converted ass path.
+        /// </summary>
+        /// <param name="video">The video.</param>
+        /// <param name="subtitleStream">The subtitle stream.</param>
+        /// <returns>System.String.</returns>
+        private string GetConvertedAssPath(Video video, MediaStream subtitleStream)
+        {
+            var path = ServerKernel.FFMpegManager.GetSubtitleCachePath(video, subtitleStream.Index, ".ass");
+
+            if (!File.Exists(path))
+            {
+                var success = ServerKernel.FFMpegManager.ConvertTextSubtitle(subtitleStream, path, CancellationToken.None).Result;
+
+                if (!success)
+                {
+                    return null;
+                }
+            }
+
+            return path;
+        }
+
+        /// <summary>
+        /// Gets the internal graphical subtitle param.
+        /// </summary>
+        /// <param name="state">The state.</param>
+        /// <param name="outputVideoCodec">The output video codec.</param>
+        /// <returns>System.String.</returns>
+        protected string GetInternalGraphicalSubtitleParam(StreamState state, string outputVideoCodec)
+        {
+            var outputSizeParam = string.Empty;
+
+            var request = state.Request;
+
+            // Add resolution params, if specified
+            if (request.Width.HasValue || request.Height.HasValue || request.MaxHeight.HasValue || request.MaxWidth.HasValue)
+            {
+                outputSizeParam = GetOutputSizeParam(state, outputVideoCodec).TrimEnd('"');
+                outputSizeParam = "," + outputSizeParam.Substring(outputSizeParam.IndexOf("scale", StringComparison.OrdinalIgnoreCase));
+            }
+
+            return string.Format(" -filter_complex \"[0:{0}]format=yuva444p,lut=u=128:v=128:y=gammaval(.3)[sub] ; [0:0] [sub] overlay{1}\"", state.SubtitleStream.Index, outputSizeParam);
+        }
+
+        /// <summary>
+        /// Gets the number of audio channels to specify on the command line
+        /// </summary>
+        /// <param name="request">The request.</param>
+        /// <param name="audioStream">The audio stream.</param>
+        /// <returns>System.Nullable{System.Int32}.</returns>
+        protected int? GetNumAudioChannelsParam(StreamRequest request, MediaStream audioStream)
+        {
+            if (audioStream.Channels > 2 && request.AudioCodec.HasValue)
+            {
+                if (request.AudioCodec.Value == AudioCodecs.Aac)
+                {
+                    // libvo_aacenc currently only supports two channel output
+                    return 2;
+                }
+                if (request.AudioCodec.Value == AudioCodecs.Wma)
+                {
+                    // wmav2 currently only supports two channel output
+                    return 2;
+                }
+            }
+
+            return request.AudioChannels;
+        }
+
+        /// <summary>
+        /// Determines whether the specified stream is H264.
+        /// </summary>
+        /// <param name="stream">The stream.</param>
+        /// <returns><c>true</c> if the specified stream is H264; otherwise, <c>false</c>.</returns>
+        protected bool IsH264(MediaStream stream)
+        {
+            return stream.Codec.IndexOf("264", StringComparison.OrdinalIgnoreCase) != -1 ||
+                   stream.Codec.IndexOf("avc", StringComparison.OrdinalIgnoreCase) != -1;
+        }
+
+        /// <summary>
+        /// Gets the name of the output audio codec
+        /// </summary>
+        /// <param name="request">The request.</param>
+        /// <returns>System.String.</returns>
+        protected string GetAudioCodec(StreamRequest request)
+        {
+            var codec = request.AudioCodec;
+
+            if (codec.HasValue)
+            {
+                if (codec == AudioCodecs.Aac)
+                {
+                    return "libvo_aacenc";
+                }
+                if (codec == AudioCodecs.Mp3)
+                {
+                    return "libmp3lame";
+                }
+                if (codec == AudioCodecs.Vorbis)
+                {
+                    return "libvorbis";
+                }
+                if (codec == AudioCodecs.Wma)
+                {
+                    return "wmav2";
+                }
+            }
+
+            return "copy";
+        }
+
+        /// <summary>
+        /// Gets the name of the output video codec
+        /// </summary>
+        /// <param name="request">The request.</param>
+        /// <returns>System.String.</returns>
+        protected string GetVideoCodec(StreamRequest request)
+        {
+            var codec = request.VideoCodec;
+
+            if (codec.HasValue)
+            {
+                if (codec == VideoCodecs.H264)
+                {
+                    return "libx264";
+                }
+                if (codec == VideoCodecs.Vpx)
+                {
+                    return "libvpx";
+                }
+                if (codec == VideoCodecs.Wmv)
+                {
+                    return "wmv2";
+                }
+                if (codec == VideoCodecs.Theora)
+                {
+                    return "libtheora";
+                }
+            }
+
+            return "copy";
+        }
+
+        /// <summary>
+        /// Gets the input argument.
+        /// </summary>
+        /// <param name="item">The item.</param>
+        /// <param name="isoMount">The iso mount.</param>
+        /// <returns>System.String.</returns>
+        protected string GetInputArgument(BaseItem item, IIsoMount isoMount)
+        {
+            return isoMount == null ?
+                ServerKernel.FFMpegManager.GetInputArgument(item) :
+                ServerKernel.FFMpegManager.GetInputArgument(item as Video, isoMount);
+        }
+
+        /// <summary>
+        /// Starts the FFMPEG.
+        /// </summary>
+        /// <param name="state">The state.</param>
+        /// <param name="outputPath">The output path.</param>
+        /// <returns>Task.</returns>
+        protected async Task StartFFMpeg(StreamState state, string outputPath)
+        {
+            var video = state.Item as Video;
+
+            //if (video != null && video.VideoType == VideoType.Iso &&
+            //    video.IsoType.HasValue && Kernel.IsoManager.CanMount(video.Path))
+            //{
+            //    IsoMount = await Kernel.IsoManager.Mount(video.Path, CancellationToken.None).ConfigureAwait(false);
+            //}
+
+            var process = new Process
+            {
+                StartInfo = new ProcessStartInfo
+                {
+                    CreateNoWindow = true,
+                    UseShellExecute = false,
+
+                    // Must consume both stdout and stderr or deadlocks may occur
+                    RedirectStandardOutput = true,
+                    RedirectStandardError = true,
+
+                    FileName = ServerKernel.FFMpegManager.FFMpegPath,
+                    WorkingDirectory = Path.GetDirectoryName(ServerKernel.FFMpegManager.FFMpegPath),
+                    Arguments = GetCommandLineArguments(outputPath, state),
+
+                    WindowStyle = ProcessWindowStyle.Hidden,
+                    ErrorDialog = false
+                },
+
+                EnableRaisingEvents = true
+            };
+
+            Plugin.Instance.OnTranscodeBeginning(outputPath, TranscodingJobType, process);
+
+            //Logger.Info(process.StartInfo.FileName + " " + process.StartInfo.Arguments);
+
+            var logFilePath = Path.Combine(Kernel.ApplicationPaths.LogDirectoryPath, "ffmpeg-" + Guid.NewGuid() + ".txt");
+
+            // FFMpeg writes debug/error info to stderr. This is useful when debugging so let's put it in the log directory.
+            state.LogFileStream = new FileStream(logFilePath, FileMode.Create, FileAccess.Write, FileShare.Read, StreamDefaults.DefaultFileStreamBufferSize, FileOptions.Asynchronous);
+
+            process.Exited += (sender, args) => OnFFMpegProcessExited(process, state);
+
+            try
+            {
+                process.Start();
+            }
+            catch (Win32Exception ex)
+            {
+                Logger.ErrorException("Error starting ffmpeg", ex);
+
+                Plugin.Instance.OnTranscodeFailedToStart(outputPath, TranscodingJobType);
+
+                state.LogFileStream.Dispose();
+
+                throw;
+            }
+
+            // MUST read both stdout and stderr asynchronously or a deadlock may occurr
+            process.BeginOutputReadLine();
+
+            // Important - don't await the log task or we won't be able to kill ffmpeg when the user stops playback
+            process.StandardError.BaseStream.CopyToAsync(state.LogFileStream);
+
+            // Wait for the file to exist before proceeeding
+            while (!File.Exists(outputPath))
+            {
+                await Task.Delay(100).ConfigureAwait(false);
+            }
+        }
+
+        /// <summary>
+        /// Processes the exited.
+        /// </summary>
+        /// <param name="process">The process.</param>
+        /// <param name="state">The state.</param>
+        protected void OnFFMpegProcessExited(Process process, StreamState state)
+        {
+            if (state.IsoMount != null)
+            {
+                state.IsoMount.Dispose();
+                state.IsoMount = null;
+            }
+
+            var outputFilePath = GetOutputFilePath(state);
+
+            state.LogFileStream.Dispose();
+
+            int? exitCode = null;
+
+            try
+            {
+                exitCode = process.ExitCode;
+                Logger.Info("FFMpeg exited with code {0} for {1}", exitCode.Value, outputFilePath);
+            }
+            catch
+            {
+                Logger.Info("FFMpeg exited with an error for {0}", outputFilePath);
+            }
+
+            process.Dispose();
+
+            Plugin.Instance.OnTranscodingFinished(outputFilePath, TranscodingJobType);
+
+            if (!exitCode.HasValue || exitCode.Value != 0)
+            {
+                Logger.Info("Deleting partial stream file(s) {0}", outputFilePath);
+
+                try
+                {
+                    DeletePartialStreamFiles(outputFilePath);
+                }
+                catch (IOException ex)
+                {
+                    Logger.ErrorException("Error deleting partial stream file(s) {0}", ex, outputFilePath);
+                }
+            }
+            else
+            {
+                Logger.Info("FFMpeg completed and exited normally for {0}", outputFilePath);
+            }
+        }
+
+        /// <summary>
+        /// Deletes the partial stream files.
+        /// </summary>
+        /// <param name="outputFilePath">The output file path.</param>
+        protected abstract void DeletePartialStreamFiles(string outputFilePath);
+
+        /// <summary>
+        /// Gets the state.
+        /// </summary>
+        /// <param name="request">The request.</param>
+        /// <returns>StreamState.</returns>
+        protected StreamState GetState(StreamRequest request)
+        {
+            var item = DtoBuilder.GetItemByClientId(request.Id);
+
+            var media = (IHasMediaStreams)item;
+
+            return new StreamState
+            {
+                Item = item,
+                Request = request,
+                AudioStream = GetMediaStream(media.MediaStreams, request.AudioStreamIndex, MediaStreamType.Audio, true),
+                VideoStream = GetMediaStream(media.MediaStreams, request.VideoStreamIndex, MediaStreamType.Video, true),
+                SubtitleStream = GetMediaStream(media.MediaStreams, request.SubtitleStreamIndex, MediaStreamType.Subtitle, false),
+                Url = Request.PathInfo
+            };
+        }
+    }
+}

+ 86 - 0
MediaBrowser.Api/Playback/Progressive/AudioService.cs

@@ -0,0 +1,86 @@
+using MediaBrowser.Controller;
+using ServiceStack.ServiceHost;
+using System.Collections.Generic;
+
+namespace MediaBrowser.Api.Playback.Progressive
+{
+    /// <summary>
+    /// Class GetAudioStream
+    /// </summary>
+    [Route("/Audio/{Id}.mp3", "GET")]
+    [Route("/Audio/{Id}.wma", "GET")]
+    [Route("/Audio/{Id}.aac", "GET")]
+    [Route("/Audio/{Id}.flac", "GET")]
+    [Route("/Audio/{Id}.ogg", "GET")]
+    [Route("/Audio/{Id}", "GET")]
+    public class GetAudioStream : StreamRequest
+    {
+
+    }
+
+    /// <summary>
+    /// Class AudioService
+    /// </summary>
+    public class AudioService : BaseProgressiveStreamingService
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="BaseProgressiveStreamingService" /> class.
+        /// </summary>
+        /// <param name="appPaths">The app paths.</param>
+        public AudioService(IServerApplicationPaths appPaths)
+            : base(appPaths)
+        {
+        }
+
+        /// <summary>
+        /// Gets the specified request.
+        /// </summary>
+        /// <param name="request">The request.</param>
+        /// <returns>System.Object.</returns>
+        public object Get(GetAudioStream request)
+        {
+            return ProcessRequest(request);
+        }
+
+        /// <summary>
+        /// Gets the command line arguments.
+        /// </summary>
+        /// <param name="outputPath">The output path.</param>
+        /// <param name="state">The state.</param>
+        /// <returns>System.String.</returns>
+        /// <exception cref="System.InvalidOperationException">Only aac and mp3 audio codecs are supported.</exception>
+        protected override string GetCommandLineArguments(string outputPath, StreamState state)
+        {
+            var request = state.Request;
+
+            var audioTranscodeParams = new List<string>();
+
+            if (request.AudioBitRate.HasValue)
+            {
+                audioTranscodeParams.Add("-ab " + request.AudioBitRate.Value);
+            }
+
+            var channels = GetNumAudioChannelsParam(request, state.AudioStream);
+
+            if (channels.HasValue)
+            {
+                audioTranscodeParams.Add("-ac " + channels.Value);
+            }
+
+            if (request.AudioSampleRate.HasValue)
+            {
+                audioTranscodeParams.Add("-ar " + request.AudioSampleRate.Value);
+            }
+
+            const string vn = " -vn";
+
+            return string.Format("{0} -i {1}{2} -threads 0{5} {3} -id3v2_version 3 -write_id3v1 1 \"{4}\"",
+                GetFastSeekCommandLineParameter(request),
+                GetInputArgument(state.Item, state.IsoMount),
+                GetSlowSeekCommandLineParameter(request),
+                string.Join(" ", audioTranscodeParams.ToArray()),
+                outputPath,
+                vn).Trim();
+        }
+    }
+}

+ 151 - 0
MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs

@@ -0,0 +1,151 @@
+using MediaBrowser.Controller;
+using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Entities.Audio;
+using MediaBrowser.Model.Dto;
+using System.IO;
+using System.Threading.Tasks;
+
+namespace MediaBrowser.Api.Playback.Progressive
+{
+    /// <summary>
+    /// Class BaseProgressiveStreamingService
+    /// </summary>
+    public abstract class BaseProgressiveStreamingService : BaseStreamingService
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="BaseProgressiveStreamingService" /> class.
+        /// </summary>
+        /// <param name="appPaths">The app paths.</param>
+        protected BaseProgressiveStreamingService(IServerApplicationPaths appPaths)
+            : base(appPaths)
+        {
+        }
+
+        /// <summary>
+        /// Gets the output file extension.
+        /// </summary>
+        /// <param name="state">The state.</param>
+        /// <returns>System.String.</returns>
+        protected override string GetOutputFileExtension(StreamState state)
+        {
+            var ext = base.GetOutputFileExtension(state);
+
+            if (!string.IsNullOrEmpty(ext))
+            {
+                return ext;
+            }
+
+            // Try to infer based on the desired video codec
+            if (state.Request.VideoCodec.HasValue)
+            {
+                var video = state.Item as Video;
+
+                if (video != null)
+                {
+                    switch (state.Request.VideoCodec.Value)
+                    {
+                        case VideoCodecs.H264:
+                            return ".ts";
+                        case VideoCodecs.Theora:
+                            return ".ogv";
+                        case VideoCodecs.Vpx:
+                            return ".webm";
+                        case VideoCodecs.Wmv:
+                            return ".asf";
+                    }
+                }
+            }
+
+            // Try to infer based on the desired audio codec
+            if (state.Request.AudioCodec.HasValue)
+            {
+                var audio = state.Item as Audio;
+
+                if (audio != null)
+                {
+                    switch (state.Request.AudioCodec.Value)
+                    {
+                        case AudioCodecs.Aac:
+                            return ".aac";
+                        case AudioCodecs.Mp3:
+                            return ".mp3";
+                        case AudioCodecs.Vorbis:
+                            return ".ogg";
+                        case AudioCodecs.Wma:
+                            return ".wma";
+                    }
+                }
+            }
+
+            return null;
+        }
+
+        /// <summary>
+        /// Gets the type of the transcoding job.
+        /// </summary>
+        /// <value>The type of the transcoding job.</value>
+        protected override TranscodingJobType TranscodingJobType
+        {
+            get { return TranscodingJobType.Progressive; }
+        }
+
+        /// <summary>
+        /// Processes the request.
+        /// </summary>
+        /// <param name="request">The request.</param>
+        /// <returns>Task.</returns>
+        protected object ProcessRequest(StreamRequest request)
+        {
+            var state = GetState(request);
+
+            if (request.Static)
+            {
+                return ToStaticFileResult(state.Item.Path);
+            }
+
+            var outputPath = GetOutputFilePath(state);
+
+            if (File.Exists(outputPath) && !Plugin.Instance.HasActiveTranscodingJob(outputPath, TranscodingJobType.Progressive))
+            {
+                return ToStaticFileResult(outputPath);
+            }
+
+            return GetStreamResult(state).Result;
+        }
+
+        /// <summary>
+        /// Gets the stream result.
+        /// </summary>
+        /// <param name="state">The state.</param>
+        /// <returns>Task{System.Object}.</returns>
+        private async Task<ProgressiveStreamWriter> GetStreamResult(StreamState state)
+        {
+            // Use the command line args with a dummy playlist path
+            var outputPath = GetOutputFilePath(state);
+
+            if (!File.Exists(outputPath))
+            {
+                await StartFFMpeg(state, outputPath).ConfigureAwait(false);
+            }
+            else
+            {
+                Plugin.Instance.OnTranscodeBeginRequest(outputPath, TranscodingJobType.Progressive);
+            }
+
+            return new ProgressiveStreamWriter
+            {
+                Path = outputPath,
+                State = state
+            };
+        }
+
+        /// <summary>
+        /// Deletes the partial stream files.
+        /// </summary>
+        /// <param name="outputFilePath">The output file path.</param>
+        protected override void DeletePartialStreamFiles(string outputFilePath)
+        {
+            File.Delete(outputFilePath);
+        }
+    }
+}

+ 86 - 0
MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs

@@ -0,0 +1,86 @@
+using MediaBrowser.Common.IO;
+using MediaBrowser.Model.Logging;
+using ServiceStack.Service;
+using System;
+using System.IO;
+using System.Threading.Tasks;
+
+namespace MediaBrowser.Api.Playback.Progressive
+{
+    public class ProgressiveStreamWriter : IStreamWriter
+    {
+        public string Path { get; set; }
+        public StreamState State { get; set; }
+        public ILogger Logger { get; set; }
+
+        /// <summary>
+        /// Writes to.
+        /// </summary>
+        /// <param name="responseStream">The response stream.</param>
+        public void WriteTo(Stream responseStream)
+        {
+            var task = WriteToAsync(responseStream);
+
+            Task.WaitAll(task);
+        }
+
+        /// <summary>
+        /// Writes to async.
+        /// </summary>
+        /// <param name="responseStream">The response stream.</param>
+        /// <returns>Task.</returns>
+        public async Task WriteToAsync(Stream responseStream)
+        {
+            try
+            {
+                await StreamFile(Path, responseStream).ConfigureAwait(false);
+            }
+            catch (Exception ex)
+            {
+                Logger.ErrorException("Error streaming media", ex);
+            }
+            finally
+            {
+                Plugin.Instance.OnTranscodeEndRequest(Path, TranscodingJobType.Progressive);
+            }
+        }
+
+        /// <summary>
+        /// Streams the file.
+        /// </summary>
+        /// <param name="path">The path.</param>
+        /// <param name="outputStream">The output stream.</param>
+        /// <returns>Task{System.Boolean}.</returns>
+        private async Task StreamFile(string path, Stream outputStream)
+        {
+            var eofCount = 0;
+            long position = 0;
+
+            using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, StreamDefaults.DefaultFileStreamBufferSize, FileOptions.Asynchronous))
+            {
+                while (eofCount < 15)
+                {
+                    await fs.CopyToAsync(outputStream).ConfigureAwait(false);
+
+                    var fsPosition = fs.Position;
+
+                    var bytesRead = fsPosition - position;
+
+                    //Logger.LogInfo("Streamed {0} bytes from file {1}", bytesRead, path);
+
+                    if (bytesRead == 0)
+                    {
+                        eofCount++;
+                        await Task.Delay(100).ConfigureAwait(false);
+                    }
+                    else
+                    {
+                        eofCount = 0;
+                    }
+
+                    position = fsPosition;
+                }
+            }
+        }
+    }
+}

+ 51 - 47
MediaBrowser.Api/Streaming/VideoHandler.cs → MediaBrowser.Api/Playback/Progressive/VideoService.cs

@@ -1,60 +1,59 @@
-using MediaBrowser.Common.IO;
+using MediaBrowser.Controller;
 using MediaBrowser.Controller.Entities;
-using MediaBrowser.Controller.Resolvers;
+using MediaBrowser.Model.Logging;
 using System;
-using System.Linq;
-using System.Net;
 
-namespace MediaBrowser.Api.Streaming
+namespace MediaBrowser.Api.Playback.Progressive
 {
     /// <summary>
-    /// Providers a progressive streaming video api
+    /// Class VideoService
     /// </summary>
-    class VideoHandler : BaseProgressiveStreamingHandler<Video>
+    public class VideoService : BaseProgressiveStreamingService
     {
         /// <summary>
-        /// Handleses the request.
+        /// Initializes a new instance of the <see cref="BaseProgressiveStreamingService" /> class.
         /// </summary>
-        /// <param name="request">The request.</param>
-        /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
-        public override bool HandlesRequest(HttpListenerRequest request)
+        /// <param name="appPaths">The app paths.</param>
+        public VideoService(IServerApplicationPaths appPaths)
+            : base(appPaths)
         {
-            return EntityResolutionHelper.VideoFileExtensions.Any(a => ApiService.IsApiUrlMatch("video" + a, request));
         }
 
         /// <summary>
-        /// Creates arguments to pass to ffmpeg
+        /// Gets the command line arguments.
         /// </summary>
         /// <param name="outputPath">The output path.</param>
-        /// <param name="isoMount">The iso mount.</param>
+        /// <param name="state">The state.</param>
         /// <returns>System.String.</returns>
-        protected override string GetCommandLineArguments(string outputPath, IIsoMount isoMount)
+        protected override string GetCommandLineArguments(string outputPath, StreamState state)
         {
-            var probeSize = Kernel.FFMpegManager.GetProbeSizeArgument(LibraryItem.VideoType, LibraryItem.IsoType);
+            var video = (Video)state.Item;
+
+            var probeSize = ServerKernel.FFMpegManager.GetProbeSizeArgument(video.VideoType, video.IsoType);
 
             // Get the output codec name
-            var videoCodec = GetVideoCodec();
+            var videoCodec = GetVideoCodec(state.Request);
 
             var graphicalSubtitleParam = string.Empty;
 
-            if (SubtitleStream != null)
+            if (state.SubtitleStream != null)
             {
                 // This is for internal graphical subs
-                if (!SubtitleStream.IsExternal && (SubtitleStream.Codec.IndexOf("pgs", StringComparison.OrdinalIgnoreCase) != -1 || SubtitleStream.Codec.IndexOf("dvd", StringComparison.OrdinalIgnoreCase) != -1))
+                if (!state.SubtitleStream.IsExternal && (state.SubtitleStream.Codec.IndexOf("pgs", StringComparison.OrdinalIgnoreCase) != -1 || state.SubtitleStream.Codec.IndexOf("dvd", StringComparison.OrdinalIgnoreCase) != -1))
                 {
-                    graphicalSubtitleParam = GetInternalGraphicalSubtitleParam(SubtitleStream, videoCodec);
+                    graphicalSubtitleParam = GetInternalGraphicalSubtitleParam(state, videoCodec);
                 }
             }
 
             return string.Format("{0} {1} -i {2}{3} -threads 0 {4} {5}{6} {7} \"{8}\"",
                 probeSize,
-                FastSeekCommandLineParameter,
-                GetInputArgument(isoMount),
-                SlowSeekCommandLineParameter,
-                MapArgs,
-                GetVideoArguments(videoCodec),
+                GetFastSeekCommandLineParameter(state.Request),
+                GetInputArgument(video, state.IsoMount),
+                GetSlowSeekCommandLineParameter(state.Request),
+                GetMapArgs(state),
+                GetVideoArguments(state, videoCodec),
                 graphicalSubtitleParam,
-                GetAudioArguments(),
+                GetAudioArguments(state),
                 outputPath
                 ).Trim();
         }
@@ -62,34 +61,38 @@ namespace MediaBrowser.Api.Streaming
         /// <summary>
         /// Gets video arguments to pass to ffmpeg
         /// </summary>
+        /// <param name="state">The state.</param>
+        /// <param name="videoCodec">The video codec.</param>
         /// <returns>System.String.</returns>
-        private string GetVideoArguments(string videoCodec)
+        private string GetVideoArguments(StreamState state, string videoCodec)
         {
             var args = "-vcodec " + videoCodec;
 
+            var request = state.Request;
+
             // If we're encoding video, add additional params
             if (!videoCodec.Equals("copy", StringComparison.OrdinalIgnoreCase))
             {
                 // Add resolution params, if specified
-                if (Width.HasValue || Height.HasValue || MaxHeight.HasValue || MaxWidth.HasValue)
+                if (request.Width.HasValue || request.Height.HasValue || request.MaxHeight.HasValue || request.MaxWidth.HasValue)
                 {
-                    args += GetOutputSizeParam(videoCodec);
+                    args += GetOutputSizeParam(state, videoCodec);
                 }
 
-                if (FrameRate.HasValue)
+                if (request.Framerate.HasValue)
                 {
-                    args += string.Format(" -r {0}", FrameRate.Value);
+                    args += string.Format(" -r {0}", request.Framerate.Value);
                 }
 
                 // Add the audio bitrate
-                var qualityParam = GetVideoQualityParam(videoCodec);
+                var qualityParam = GetVideoQualityParam(request, videoCodec);
 
                 if (!string.IsNullOrEmpty(qualityParam))
                 {
                     args += " " + qualityParam;
                 }
             }
-            else if (IsH264(VideoStream))
+            else if (IsH264(state.VideoStream))
             {
                 args += " -bsf h264_mp4toannexb";
             }
@@ -100,17 +103,20 @@ namespace MediaBrowser.Api.Streaming
         /// <summary>
         /// Gets audio arguments to pass to ffmpeg
         /// </summary>
+        /// <param name="state">The state.</param>
         /// <returns>System.String.</returns>
-        private string GetAudioArguments()
+        private string GetAudioArguments(StreamState state)
         {
             // If the video doesn't have an audio stream, return a default.
-            if (AudioStream == null)
+            if (state.AudioStream == null)
             {
                 return string.Empty;
             }
 
+            var request = state.Request;
+
             // Get the output codec name
-            var codec = GetAudioCodec();
+            var codec = GetAudioCodec(request);
 
             var args = "-acodec " + codec;
 
@@ -118,24 +124,21 @@ namespace MediaBrowser.Api.Streaming
             if (!codec.Equals("copy", StringComparison.OrdinalIgnoreCase))
             {
                 // Add the number of audio channels
-                var channels = GetNumAudioChannelsParam();
+                var channels = GetNumAudioChannelsParam(request, state.AudioStream);
 
                 if (channels.HasValue)
                 {
                     args += " -ac " + channels.Value;
                 }
 
-                // Add the audio sample rate
-                var sampleRate = GetSampleRateParam();
-
-                if (sampleRate.HasValue)
+                if (request.AudioSampleRate.HasValue)
                 {
-                    args += " -ar " + sampleRate.Value;
+                    args += " -ar " + request.AudioSampleRate.Value;
                 }
 
-                if (AudioBitRate.HasValue)
+                if (request.AudioBitRate.HasValue)
                 {
-                    args += " -ab " + AudioBitRate.Value;
+                    args += " -ab " + request.AudioBitRate.Value;
                 }
             }
 
@@ -145,9 +148,10 @@ namespace MediaBrowser.Api.Streaming
         /// <summary>
         /// Gets the video bitrate to specify on the command line
         /// </summary>
+        /// <param name="request">The request.</param>
         /// <param name="videoCodec">The video codec.</param>
         /// <returns>System.String.</returns>
-        private string GetVideoQualityParam(string videoCodec)
+        private string GetVideoQualityParam(StreamRequest request, string videoCodec)
         {
             var args = string.Empty;
 
@@ -168,9 +172,9 @@ namespace MediaBrowser.Api.Streaming
                 args = "-preset superfast";
             }
 
-            if (VideoBitRate.HasValue)
+            if (request.VideoBitRate.HasValue)
             {
-                args += " -b:v " + VideoBitRate;
+                args += " -b:v " + request.VideoBitRate;
             }
 
             return args.Trim();

+ 73 - 0
MediaBrowser.Api/Playback/StreamRequest.cs

@@ -2,38 +2,111 @@
 
 namespace MediaBrowser.Api.Playback
 {
+    /// <summary>
+    /// Class StreamRequest
+    /// </summary>
     public class StreamRequest
     {
+        /// <summary>
+        /// Gets or sets the id.
+        /// </summary>
+        /// <value>The id.</value>
         public string Id { get; set; }
 
+        /// <summary>
+        /// Gets or sets the audio codec.
+        /// </summary>
+        /// <value>The audio codec.</value>
         public AudioCodecs? AudioCodec { get; set; }
 
+        /// <summary>
+        /// Gets or sets the start time ticks.
+        /// </summary>
+        /// <value>The start time ticks.</value>
         public long? StartTimeTicks { get; set; }
 
+        /// <summary>
+        /// Gets or sets the audio bit rate.
+        /// </summary>
+        /// <value>The audio bit rate.</value>
         public int? AudioBitRate { get; set; }
 
+        /// <summary>
+        /// Gets or sets the video codec.
+        /// </summary>
+        /// <value>The video codec.</value>
         public VideoCodecs? VideoCodec { get; set; }
 
+        /// <summary>
+        /// Gets or sets the video bit rate.
+        /// </summary>
+        /// <value>The video bit rate.</value>
         public int? VideoBitRate { get; set; }
 
+        /// <summary>
+        /// Gets or sets the index of the audio stream.
+        /// </summary>
+        /// <value>The index of the audio stream.</value>
         public int? AudioStreamIndex { get; set; }
 
+        /// <summary>
+        /// Gets or sets the index of the video stream.
+        /// </summary>
+        /// <value>The index of the video stream.</value>
         public int? VideoStreamIndex { get; set; }
 
+        /// <summary>
+        /// Gets or sets the index of the subtitle stream.
+        /// </summary>
+        /// <value>The index of the subtitle stream.</value>
         public int? SubtitleStreamIndex { get; set; }
 
+        /// <summary>
+        /// Gets or sets the audio channels.
+        /// </summary>
+        /// <value>The audio channels.</value>
         public int? AudioChannels { get; set; }
 
+        /// <summary>
+        /// Gets or sets the audio sample rate.
+        /// </summary>
+        /// <value>The audio sample rate.</value>
         public int? AudioSampleRate { get; set; }
 
+        /// <summary>
+        /// Gets or sets the width.
+        /// </summary>
+        /// <value>The width.</value>
         public int? Width { get; set; }
 
+        /// <summary>
+        /// Gets or sets the height.
+        /// </summary>
+        /// <value>The height.</value>
         public int? Height { get; set; }
 
+        /// <summary>
+        /// Gets or sets the width of the max.
+        /// </summary>
+        /// <value>The width of the max.</value>
         public int? MaxWidth { get; set; }
 
+        /// <summary>
+        /// Gets or sets the height of the max.
+        /// </summary>
+        /// <value>The height of the max.</value>
         public int? MaxHeight { get; set; }
 
+        /// <summary>
+        /// Gets or sets the framerate.
+        /// </summary>
+        /// <value>The framerate.</value>
         public double? Framerate { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether this <see cref="StreamRequest" /> is static.
+        /// </summary>
+        /// <value><c>true</c> if static; otherwise, <c>false</c>.</value>
+        public bool Static { get; set; }
     }
 }

+ 34 - 0
MediaBrowser.Api/Playback/StreamState.cs

@@ -0,0 +1,34 @@
+using System.IO;
+using MediaBrowser.Common.IO;
+using MediaBrowser.Controller.Entities;
+using MediaBrowser.Model.Entities;
+
+namespace MediaBrowser.Api.Playback
+{
+    public class StreamState
+    {
+        public string Url { get; set; }
+
+        public StreamRequest Request { get; set; }
+
+        /// <summary>
+        /// Gets or sets the log file stream.
+        /// </summary>
+        /// <value>The log file stream.</value>
+        public Stream LogFileStream { get; set; }
+
+        public MediaStream AudioStream { get; set; }
+
+        public MediaStream VideoStream { get; set; }
+
+        public MediaStream SubtitleStream { get; set; }
+
+        public BaseItem Item { get; set; }
+
+        /// <summary>
+        /// Gets or sets the iso mount.
+        /// </summary>
+        /// <value>The iso mount.</value>
+        public IIsoMount IsoMount { get; set; }
+    }
+}

+ 0 - 1
MediaBrowser.Api/PluginService.cs

@@ -96,7 +96,6 @@ namespace MediaBrowser.Api
     /// Class GetPluginSecurityInfo
     /// </summary>
     [Route("/Plugins/SecurityInfo", "GET")]
-    [Restrict(VisibleLocalhostOnly = true)]
     public class GetPluginSecurityInfo : IReturn<PluginSecurityInfo>
     {
     }

+ 0 - 5
MediaBrowser.Api/ScheduledTasks/ScheduledTasksWebSocketListener.cs

@@ -28,11 +28,6 @@ namespace MediaBrowser.Api.ScheduledTasks
             get { return "ScheduledTasksInfo"; }
         }
 
-        /// <summary>
-        /// The _kernel
-        /// </summary>
-        private readonly IKernel _kernel;
-
         /// <summary>
         /// Initializes a new instance of the <see cref="ScheduledTasksWebSocketListener" /> class.
         /// </summary>

+ 0 - 110
MediaBrowser.Api/Streaming/AudioHandler.cs

@@ -1,110 +0,0 @@
-using MediaBrowser.Common.IO;
-using MediaBrowser.Common.Net.Handlers;
-using MediaBrowser.Controller.Entities.Audio;
-using MediaBrowser.Controller.Resolvers;
-using MediaBrowser.Model.Dto;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-
-namespace MediaBrowser.Api.Streaming
-{
-    /// <summary>
-    /// Providers a progressive streaming audio api
-    /// </summary>
-    public class AudioHandler : BaseProgressiveStreamingHandler<Audio>
-    {
-        /// <summary>
-        /// Handleses the request.
-        /// </summary>
-        /// <param name="request">The request.</param>
-        /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
-        public override bool HandlesRequest(HttpListenerRequest request)
-        {
-            return EntityResolutionHelper.AudioFileExtensions.Any(a => ApiService.IsApiUrlMatch("audio" + a, request));
-        }
-
-        /// <summary>
-        /// Gets the audio codec.
-        /// </summary>
-        /// <value>The audio codec.</value>
-        /// <exception cref="InvalidOperationException"></exception>
-        protected override AudioCodecs? AudioCodec
-        {
-            get
-            {
-                var ext = OutputFileExtension;
-
-                if (ext.Equals(".aac", StringComparison.OrdinalIgnoreCase) || ext.Equals(".m4a", StringComparison.OrdinalIgnoreCase))
-                {
-                    return AudioCodecs.Aac;
-                }
-                if (ext.Equals(".mp3", StringComparison.OrdinalIgnoreCase))
-                {
-                    return AudioCodecs.Mp3;
-                }
-                if (ext.Equals(".wma", StringComparison.OrdinalIgnoreCase))
-                {
-                    return AudioCodecs.Wma;
-                }
-                if (ext.Equals(".oga", StringComparison.OrdinalIgnoreCase) || ext.Equals(".ogg", StringComparison.OrdinalIgnoreCase))
-                {
-                    return AudioCodecs.Vorbis;
-                }
-
-                throw new InvalidOperationException();
-            }
-        }
-
-        /// <summary>
-        /// Creates arguments to pass to ffmpeg
-        /// </summary>
-        /// <param name="outputPath">The output path.</param>
-        /// <param name="isoMount">The iso mount.</param>
-        /// <returns>System.String.</returns>
-        /// <exception cref="System.InvalidOperationException">Only aac and mp3 audio codecs are supported.</exception>
-        /// <exception cref="InvalidOperationException">Only aac and mp3 audio codecs are supported.</exception>
-        /// <exception cref="ArgumentException">Only aac and mp3 audio codecs are supported.</exception>
-        protected override string GetCommandLineArguments(string outputPath, IIsoMount isoMount)
-        {
-            var audioTranscodeParams = new List<string>();
-
-            var outputFormat = AudioCodec;
-
-            if (outputFormat != AudioCodecs.Aac && outputFormat != AudioCodecs.Mp3)
-            {
-                throw new InvalidOperationException("Only aac and mp3 audio codecs are supported.");
-            }
-
-            if (AudioBitRate.HasValue)
-            {
-                audioTranscodeParams.Add("-ab " + AudioBitRate.Value);
-            }
-
-            var channels = GetNumAudioChannelsParam();
-
-            if (channels.HasValue)
-            {
-                audioTranscodeParams.Add("-ac " + channels.Value);
-            }
-
-            var sampleRate = GetSampleRateParam();
-
-            if (sampleRate.HasValue)
-            {
-                audioTranscodeParams.Add("-ar " + sampleRate.Value);
-            }
-
-            const string vn = " -vn";
-
-            return string.Format("{0} -i {1}{2} -threads 0{5} {3} -id3v2_version 3 -write_id3v1 1 \"{4}\"",
-                FastSeekCommandLineParameter,
-                GetInputArgument(isoMount),
-                SlowSeekCommandLineParameter,
-                string.Join(" ", audioTranscodeParams.ToArray()),
-                outputPath,
-                vn).Trim();
-        }
-    }
-}

+ 0 - 152
MediaBrowser.Api/Streaming/BaseProgressiveStreamingHandler.cs

@@ -1,152 +0,0 @@
-using MediaBrowser.Common.Extensions;
-using MediaBrowser.Common.IO;
-using MediaBrowser.Common.Net.Handlers;
-using MediaBrowser.Controller.Entities;
-using MediaBrowser.Model.Entities;
-using System;
-using System.IO;
-using System.Net;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.Api.Streaming
-{
-    /// <summary>
-    /// Class BaseMediaHandler
-    /// </summary>
-    /// <typeparam name="TBaseItemType">The type of the T base item type.</typeparam>
-    public abstract class BaseProgressiveStreamingHandler<TBaseItemType> : BaseStreamingHandler<TBaseItemType>
-        where TBaseItemType : BaseItem, IHasMediaStreams, new()
-    {
-        /// <summary>
-        /// Gets the type of the transcoding job.
-        /// </summary>
-        /// <value>The type of the transcoding job.</value>
-        protected override TranscodingJobType TranscodingJobType
-        {
-            get { return TranscodingJobType.Progressive; }
-        }
-
-        /// <summary>
-        /// Processes the request.
-        /// </summary>
-        /// <param name="ctx">The CTX.</param>
-        /// <returns>Task.</returns>
-        public override Task ProcessRequest(HttpListenerContext ctx)
-        {
-            HttpListenerContext = ctx;
-
-            if (!RequiresConversion())
-            {
-                return new StaticFileHandler(Kernel)
-                {
-                    Path = LibraryItem.Path
-
-                }.ProcessRequest(ctx);
-            }
-
-            var outputPath = OutputFilePath;
-
-            if (File.Exists(outputPath) && !Plugin.Instance.HasActiveTranscodingJob(outputPath, TranscodingJobType.Progressive))
-            {
-                return new StaticFileHandler(Kernel)
-                {
-                    Path = outputPath
-
-                }.ProcessRequest(ctx);
-            }
-
-            return base.ProcessRequest(ctx);
-        }
-
-        /// <summary>
-        /// Requireses the conversion.
-        /// </summary>
-        /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
-        protected bool RequiresConversion()
-        {
-            return !GetBoolQueryStringParam("static");
-        }
-
-        /// <summary>
-        /// Writes the response to output stream.
-        /// </summary>
-        /// <param name="stream">The stream.</param>
-        /// <param name="responseInfo">The response info.</param>
-        /// <param name="contentLength">Length of the content.</param>
-        /// <returns>Task.</returns>
-        protected override async Task WriteResponseToOutputStream(Stream stream, ResponseInfo responseInfo, long? contentLength)
-        {
-            // Use the command line args with a dummy playlist path
-            var outputPath = OutputFilePath;
-
-            if (!File.Exists(outputPath))
-            {
-                await StartFFMpeg(outputPath).ConfigureAwait(false);
-            }
-            else
-            {
-                Plugin.Instance.OnTranscodeBeginRequest(outputPath, TranscodingJobType.Progressive);
-            }
-
-            try
-            {
-                await StreamFile(outputPath, stream).ConfigureAwait(false);
-            }
-            catch (Exception ex)
-            {
-                //Logger.ErrorException("Error streaming media", ex);
-            }
-            finally
-            {
-                Plugin.Instance.OnTranscodeEndRequest(outputPath, TranscodingJobType.Progressive);
-            }
-        }
-
-        /// <summary>
-        /// Streams the file.
-        /// </summary>
-        /// <param name="path">The path.</param>
-        /// <param name="outputStream">The output stream.</param>
-        /// <returns>Task{System.Boolean}.</returns>
-        private async Task StreamFile(string path, Stream outputStream)
-        {
-            var eofCount = 0;
-            long position = 0;
-
-            using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, StreamDefaults.DefaultFileStreamBufferSize, FileOptions.Asynchronous))
-            {
-                while (eofCount < 15)
-                {
-                    await fs.CopyToAsync(outputStream).ConfigureAwait(false);
-
-                    var fsPosition = fs.Position;
-
-                    var bytesRead = fsPosition - position;
-
-                    //Logger.LogInfo("Streamed {0} bytes from file {1}", bytesRead, path);
-
-                    if (bytesRead == 0)
-                    {
-                        eofCount++;
-                        await Task.Delay(100).ConfigureAwait(false);
-                    }
-                    else
-                    {
-                        eofCount = 0;
-                    }
-
-                    position = fsPosition;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Deletes the partial stream files.
-        /// </summary>
-        /// <param name="outputFilePath">The output file path.</param>
-        protected override void DeletePartialStreamFiles(string outputFilePath)
-        {
-            File.Delete(outputFilePath);
-        }
-    }
-}

+ 17 - 13
MediaBrowser.Common.Implementations/BaseApplicationHost.cs

@@ -1,17 +1,17 @@
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using MediaBrowser.Common.Kernel;
+using MediaBrowser.Common.Kernel;
 using MediaBrowser.Model.Logging;
 using MediaBrowser.Model.Serialization;
 using SimpleInjector;
 using System;
 using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
 using System.Threading;
 
 namespace MediaBrowser.Common.Implementations
 {
-    public abstract class BaseApplicationHost : IDisposable
+    public abstract class BaseApplicationHost
     {
         /// <summary>
         /// Gets or sets the logger.
@@ -314,18 +314,22 @@ namespace MediaBrowser.Common.Implementations
         /// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
         protected virtual void Dispose(bool dispose)
         {
-            var type = GetType();
+            if (dispose)
+            {
+                var type = GetType();
 
-            Logger.Info("Disposing " + type.Name);
+                Logger.Info("Disposing " + type.Name);
 
-            foreach (var part in DisposableParts.Distinct().Where(i => i.GetType() != type).ToList())
-            {
-                Logger.Info("Disposing " + part.GetType().Name);
+                var parts = DisposableParts.Distinct().Where(i => i.GetType() != type).ToList();
+                DisposableParts.Clear();
 
-                part.Dispose();
-            }
+                foreach (var part in parts)
+                {
+                    Logger.Info("Disposing " + part.GetType().Name);
 
-            DisposableParts.Clear();
+                    part.Dispose();
+                }
+            }
         }
     }
 }

+ 10 - 1
MediaBrowser.Common.Implementations/HttpServer/HttpServer.cs

@@ -518,7 +518,7 @@ namespace MediaBrowser.Common.Implementations.HttpServer
     /// <summary>
     /// Class ContainerAdapter
     /// </summary>
-    class ContainerAdapter : IContainerAdapter
+    class ContainerAdapter : IContainerAdapter, IRelease
     {
         /// <summary>
         /// The _app host
@@ -552,5 +552,14 @@ namespace MediaBrowser.Common.Implementations.HttpServer
         {
             return _appHost.TryResolve<T>();
         }
+
+        /// <summary>
+        /// Releases the specified instance.
+        /// </summary>
+        /// <param name="instance">The instance.</param>
+        public void Release(object instance)
+        {
+            // Leave this empty so SS doesn't try to dispose our objects
+        }
     }
 }

+ 2 - 0
MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs

@@ -71,6 +71,8 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
             JsonSerializer = jsonSerializer;
             Logger = logger;
             ServerManager = serverManager;
+
+            ReloadTriggerEvents(true);
         }
 
         /// <summary>

+ 0 - 2
MediaBrowser.Common.Implementations/ServerManager/ServerManager.cs

@@ -411,8 +411,6 @@ namespace MediaBrowser.Common.Implementations.ServerManager
 
             if (HttpServer != null)
             {
-                _logger.Info("Disposing Http Server");
-
                 HttpServer.WebSocketConnected -= HttpServer_WebSocketConnected;
                 HttpServer.Dispose();
             }

+ 24 - 23
MediaBrowser.Controller/Localization/LocalizedStrings.cs

@@ -80,30 +80,31 @@ namespace MediaBrowser.Controller.Localization
         /// <returns>LocalizedStringData.</returns>
         protected LocalizedStringData LoadFromFile(string file, Type t)
         {
-            var xs = new XmlSerializer(t);
-            var strings = (LocalizedStringData)Activator.CreateInstance(t);
-            strings.FileName = file;
-            Logger.Info("Using String Data from {0}", file);
-            if (File.Exists(file))
-            {
-                using (var fs = new FileStream(file, FileMode.Open, FileAccess.Read))
-                {
-                    strings = (BaseStrings)xs.Deserialize(fs);
-                }
-            }
-            else
-            {
-                strings.Save(); //brand new - save it
-            }
+            return new BaseStrings {FileName = file};
+            //var xs = new XmlSerializer(t);
+            //var strings = (LocalizedStringData)Activator.CreateInstance(t);
+            //strings.FileName = file;
+            //Logger.Info("Using String Data from {0}", file);
+            //if (File.Exists(file))
+            //{
+            //    using (var fs = new FileStream(file, FileMode.Open, FileAccess.Read))
+            //    {
+            //        strings = (LocalizedStringData)xs.Deserialize(fs);
+            //    }
+            //}
+            //else
+            //{
+            //    strings.Save(); //brand new - save it
+            //}
+
+            //if (strings.ThisVersion != strings.Version && file.ToLower().Contains("-en.xml"))
+            //{
+            //    //only re-save the english version as that is the one defined internally
+            //    strings = new BaseStrings {FileName = file};
+            //    strings.Save();
+            //}
+            //return strings;
 
-            if (strings.ThisVersion != strings.Version && file.ToLower().Contains("-en.xml"))
-            {
-                //only re-save the english version as that is the one defined internally
-                strings = new BaseStrings {FileName = file};
-                //strings.Save();
-            }
-            return strings;
-            
         }
 
         /// <summary>

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

@@ -145,7 +145,7 @@ namespace MediaBrowser.Controller.Providers.Movies
                     return jsonSerializer.DeserializeFromStream<TmdbSettingsResult>(json);
                 }
             }
-            catch (HttpException e)
+            catch (HttpException)
             {
                 return new TmdbSettingsResult
                 {
@@ -297,7 +297,7 @@ namespace MediaBrowser.Controller.Providers.Movies
                     await FetchMovieData(item, cancellationToken).ConfigureAwait(false);
                     SetLastRefreshed(item, DateTime.UtcNow);
                 }
-                catch (MovieDbProviderException e)
+                catch (MovieDbProviderException)
                 {
                     SetLastRefreshed(item, DateTime.UtcNow, ProviderRefreshStatus.CompletedWithErrors);
                 }

+ 0 - 154
MediaBrowser.Networking/MediaBrowser.Networking.csproj

@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{7C11010E-179A-49B7-BFB2-F1656F5E71AD}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>MediaBrowser.Networking</RootNamespace>
-    <AssemblyName>MediaBrowser.Networking</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
-    <RestorePackages>true</RestorePackages>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="Alchemy, Version=2.2.0.238, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\Alchemy.2.2.1\lib\net40\Alchemy.dll</HintPath>
-    </Reference>
-    <Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack, Version=3.9.37.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.3.9.37\lib\net35\ServiceStack.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Api.Swagger, Version=3.9.35.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Api.Swagger.3.9.35\lib\net35\ServiceStack.Api.Swagger.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Common, Version=3.9.37.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Common.3.9.37\lib\net35\ServiceStack.Common.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Interfaces, Version=3.9.37.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Common.3.9.37\lib\net35\ServiceStack.Interfaces.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Logging.NLog, Version=1.0.6.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Logging.NLog.1.0.6.0\lib\net35\ServiceStack.Logging.NLog.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.OrmLite, Version=3.9.37.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.37\lib\ServiceStack.OrmLite.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.OrmLite.SqlServer">
-      <HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.37\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Redis">
-      <HintPath>..\packages\ServiceStack.Redis.3.9.37\lib\net35\ServiceStack.Redis.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.ServiceInterface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.3.9.37\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
-    </Reference>
-    <Reference Include="ServiceStack.Text, Version=3.9.37.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\ServiceStack.Text.3.9.37\lib\net35\ServiceStack.Text.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Management" />
-    <Reference Include="System.Net" />
-    <Reference Include="System.Net.Http" />
-    <Reference Include="System.Net.Http.WebRequest" />
-    <Reference Include="System.Reactive.Core, Version=2.1.30214.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\Rx-Core.2.1.30214.0\lib\Net45\System.Reactive.Core.dll</HintPath>
-    </Reference>
-    <Reference Include="System.Reactive.Interfaces, Version=2.1.30214.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\packages\Rx-Interfaces.2.1.30214.0\lib\Net45\System.Reactive.Interfaces.dll</HintPath>
-    </Reference>
-    <Reference Include="System.Reactive.Linq">
-      <HintPath>..\packages\Rx-Linq.2.1.30214.0\lib\Net45\System.Reactive.Linq.dll</HintPath>
-    </Reference>
-    <Reference Include="System.Web" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="..\SharedVersion.cs">
-      <Link>Properties\SharedVersion.cs</Link>
-    </Compile>
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">
-      <Project>{9142eefa-7570-41e1-bfcc-468bb571af2f}</Project>
-      <Name>MediaBrowser.Common</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj">
-      <Project>{7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b}</Project>
-      <Name>MediaBrowser.Model</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="packages.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <Content Include="README.txt" />
-    <Content Include="swagger-ui\css\screen.css" />
-    <Content Include="swagger-ui\images\pet_store_api.png" />
-    <Content Include="swagger-ui\images\wordnik_api.png" />
-    <Content Include="swagger-ui\index.html" />
-    <Content Include="swagger-ui\lib\backbone-min.js" />
-    <Content Include="swagger-ui\lib\handlebars.runtime-1.0.0.beta.6.js" />
-    <Content Include="swagger-ui\lib\jquery.ba-bbq.min.js" />
-    <Content Include="swagger-ui\lib\jquery.min.js" />
-    <Content Include="swagger-ui\lib\jquery.slideto.min.js" />
-    <Content Include="swagger-ui\lib\jquery.wiggle.min.js" />
-    <Content Include="swagger-ui\lib\swagger.js" />
-    <Content Include="swagger-ui\lib\underscore-min.js" />
-    <Content Include="swagger-ui\swagger-ui.js" />
-    <Content Include="swagger-ui\swagger-ui.min.js" />
-  </ItemGroup>
-  <ItemGroup />
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <PropertyGroup>
-    <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\Nuget\dlls\" /y /d /r /i</PostBuildEvent>
-  </PropertyGroup>
-  <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>

+ 0 - 31
MediaBrowser.Networking/Properties/AssemblyInfo.cs

@@ -1,31 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("MediaBrowser.Networking")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("MediaBrowser.Networking")]
-[assembly: AssemblyCopyright("Copyright ©  2013")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("01f56324-c175-4237-9204-aefda50bcf8d")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//

+ 0 - 41
MediaBrowser.Networking/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!

+ 0 - 15
MediaBrowser.Networking/packages.config

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="Alchemy" version="2.2.1" targetFramework="net45" />
-  <package id="NLog" version="2.0.0.2000" 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-Linq" version="2.1.30214.0" targetFramework="net45" />
-  <package id="ServiceStack" version="3.9.37" targetFramework="net45" />
-  <package id="ServiceStack.Api.Swagger" version="3.9.35" targetFramework="net45" />
-  <package id="ServiceStack.Common" version="3.9.37" targetFramework="net45" />
-  <package id="ServiceStack.Logging.NLog" version="1.0.6.0" targetFramework="net45" />
-  <package id="ServiceStack.OrmLite.SqlServer" version="3.9.37" targetFramework="net45" />
-  <package id="ServiceStack.Redis" version="3.9.37" targetFramework="net45" />
-  <package id="ServiceStack.Text" version="3.9.37" targetFramework="net45" />
-</packages>

+ 0 - 959
MediaBrowser.Networking/swagger-ui/css/screen.css

@@ -1,959 +0,0 @@
-html, body, div, span, applet, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-a, abbr, acronym, address, big, cite, code,
-del, dfn, em, img, ins, kbd, q, s, samp,
-small, strike, strong, sub, sup, tt, var,
-b, u, i, center,
-dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, embed,
-figure, figcaption, footer, header, hgroup,
-menu, nav, output, ruby, section, summary,
-time, mark, audio, video {
-  margin: 0;
-  padding: 0;
-  border: 0;
-  font-size: 100%;
-  font: inherit;
-  vertical-align: baseline; }
-
-body {
-  line-height: 1; }
-
-ol, ul {
-  list-style: none; }
-
-table {
-  border-collapse: collapse;
-  border-spacing: 0; }
-
-caption, th, td {
-  text-align: left;
-  font-weight: normal;
-  vertical-align: middle; }
-
-q, blockquote {
-  quotes: none; }
-  q:before, q:after, blockquote:before, blockquote:after {
-    content: "";
-    content: none; }
-
-a img {
-  border: none; }
-
-article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
-  display: block; }
-
-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; }
-h1 span.divider, h2 span.divider, h3 span.divider, h4 span.divider, h5 span.divider, h6 span.divider {
-  color: #aaaaaa; }
-
-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; }
-
-h2 {
-  color: #89bf04;
-  color: black;
-  font-size: 1.3em;
-  padding: 10px 0 10px 0; }
-  h2 a {
-    color: black; }
-  h2 span.sub {
-    font-size: 0.7em;
-    color: #999999;
-    font-style: italic; }
-    h2 span.sub a {
-      color: #777777; }
-
-h3 {
-  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 {
-    display: block;
-    clear: none;
-    float: left;
-    -moz-box-sizing: border-box;
-    -webkit-box-sizing: border-box;
-    -ms-box-sizing: border-box;
-    box-sizing: border-box;
-    width: 60%; }
-  div.heading_with_menu ul {
-    display: block;
-    clear: none;
-    float: right;
-    -moz-box-sizing: border-box;
-    -webkit-box-sizing: border-box;
-    -ms-box-sizing: border-box;
-    box-sizing: border-box;
-    margin-top: 10px; }
-
-.body-textarea {
-  width: 300px;
-  height: 100px;
-}
-
-p {
-  line-height: 1.4em;
-  padding: 0 0 10px 0;
-  color: #333333; }
-
-ol {
-  margin: 0px 0 10px 0;
-  padding: 0 0 0 18px;
-  list-style-type: decimal; }
-  ol li {
-    padding: 5px 0px;
-    font-size: 0.9em;
-    color: #333333; }
-
-.markdown h3 {
-  color: #547f00; }
-.markdown h4 {
-  color: #666666; }
-.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; }
-.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; }
-.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 {
-    padding: 3px 0px;
-    line-height: 1.4em;
-    color: #333333; }
-
-div.gist {
-  margin: 20px 0 25px 0 !important; }
-
-p.big, div.big p {
-  font-size: 1 em;
-  margin-bottom: 10px; }
-
-span.weak {
-  color: #666666; }
-span.blank, span.empty {
-  color: #888888;
-  font-style: italic; }
-
-a {
-  color: #547f00; }
-
-strong {
-  font-family: "Droid Sans", sans-serif;
-  font-weight: bold;
-  font-weight: bold; }
-
-.code {
-  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; }
-
-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; }
-
-.required {
-  font-weight: bold; }
-
-table.fullwidth {
-  width: 100%; }
-table thead tr th {
-  padding: 5px;
-  font-size: 0.9em;
-  color: #666666;
-  border-bottom: 1px solid #999999; }
-table tbody tr.offset {
-  background-color: #f5f5f5; }
-table tbody tr td {
-  padding: 6px;
-  font-size: 0.9em;
-  border-bottom: 1px solid #cccccc;
-  vertical-align: top;
-  line-height: 1.3em; }
-table tbody tr:last-child td {
-  border-bottom: none; }
-table tbody tr.offset {
-  background-color: #f0f0f0; }
-
-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 {
-    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; }
-form.formtastic fieldset.inputs ol li p.inline-hints {
-  margin-left: 0;
-  font-style: italic;
-  font-size: 0.9em;
-  margin: 0; }
-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 {
-    padding-left: 3px;
-    color: #888888; }
-form.formtastic fieldset.inputs ol li.required label {
-  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 {
-  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 {
-  font-family: "Droid Sans", sans-serif;
-  height: 250px;
-  padding: 4px;
-  display: block;
-  clear: both; }
-form.formtastic fieldset.inputs ol li.select select {
-  display: block;
-  clear: both; }
-form.formtastic fieldset.inputs ol li.boolean {
-  float: none;
-  clear: both;
-  overflow: hidden;
-  display: block; }
-  form.formtastic fieldset.inputs ol li.boolean input {
-    display: block;
-    float: left;
-    clear: none;
-    margin: 0 5px 0 0; }
-  form.formtastic fieldset.inputs ol li.boolean label {
-    display: block;
-    float: left;
-    clear: none;
-    margin: 0;
-    padding: 0; }
-form.formtastic fieldset.buttons {
-  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 {
-  width: 500px !important; }
-
-body {
-  font-family: "Droid Sans", sans-serif; }
-  body #content_message {
-    margin: 10px 15px;
-    font-style: italic;
-    color: #999999; }
-  body #header {
-    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 {
-    margin: 0 15px 40px 15px;
-    padding: 10px 0;
-    font-size: 0.8em;
-    border-top: 1px solid #dddddd;
-    font-family: "Droid Sans", sans-serif;
-    color: #999999;
-    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: 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; }

TEMPAT SAMPAH
MediaBrowser.Networking/swagger-ui/images/pet_store_api.png


TEMPAT SAMPAH
MediaBrowser.Networking/swagger-ui/images/wordnik_api.png


+ 0 - 88
MediaBrowser.Networking/swagger-ui/index.html

@@ -1,88 +0,0 @@
-<html>
-<head>
-    <title>Swagger UI</title>
-    <link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' 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.slideto.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/handlebars.runtime-1.0.0.beta.6.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/swagger.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 type="text/javascript">
-        $(function () {
-            window.swaggerUi = new SwaggerUi({
-                discoveryUrl:'../api/resources',
-                apiKey:"",
-                dom_id:"swagger-ui-container",
-                supportHeaderParams: false,
-                supportedSubmitMethods: ['get', 'post', 'put']
-            });
-
-            window.swaggerUi.load();
-        });
-
-    </script>
-</head>
-
-<body>
-<div id='header'>
-    <div class="swagger-ui-wrap">
-        <a id="logo" href="http://swagger.wordnik.com">swagger</a>
-
-        <form id='api_selector'>
-            <div class='input icon-btn'>
-                <img id="show-pet-store-icon" src="images/pet_store_api.png" title="Show Swagger Petstore Example Apis">
-            </div>
-            <div class='input icon-btn'>
-                <img id="show-wordnik-dev-icon" src="images/wordnik_api.png" title="Show Wordnik Developer Apis">
-            </div>
-            <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl"
-                                      type="text"/></div>
-            <div class='input'><input placeholder="api_key" id="input_apiKey" name="apiKey" type="text"/></div>
-            <div class='input'><a id="explore" href="#">Explore</a></div>
-        </form>
-    </div>
-</div>
-
-<div id="message-bar" class="swagger-ui-wrap">
-    &nbsp;
-</div>
-
-<div id="swagger-ui-container" class="swagger-ui-wrap">
-
-</div>
-
-</body>
-
-</html>

+ 0 - 38
MediaBrowser.Networking/swagger-ui/lib/backbone-min.js

@@ -1,38 +0,0 @@
-// Backbone.js 0.9.2
-
-// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
-// Backbone may be freely distributed under the MIT license.
-// For all details and documentation:
-// http://backbonejs.org
-(function(){var l=this,y=l.Backbone,z=Array.prototype.slice,A=Array.prototype.splice,g;g="undefined"!==typeof exports?exports:l.Backbone={};g.VERSION="0.9.2";var f=l._;!f&&"undefined"!==typeof require&&(f=require("underscore"));var i=l.jQuery||l.Zepto||l.ender;g.setDomLibrary=function(a){i=a};g.noConflict=function(){l.Backbone=y;return this};g.emulateHTTP=!1;g.emulateJSON=!1;var p=/\s+/,k=g.Events={on:function(a,b,c){var d,e,f,g,j;if(!b)return this;a=a.split(p);for(d=this._callbacks||(this._callbacks=
-{});e=a.shift();)f=(j=d[e])?j.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:j?j.next:f};return this},off:function(a,b,c){var d,e,h,g,j,q;if(e=this._callbacks){if(!a&&!b&&!c)return delete this._callbacks,this;for(a=a?a.split(p):f.keys(e);d=a.shift();)if(h=e[d],delete e[d],h&&(b||c))for(g=h.tail;(h=h.next)!==g;)if(j=h.callback,q=h.context,b&&j!==b||c&&q!==c)this.on(d,j,q);return this}},trigger:function(a){var b,c,d,e,f,g;if(!(d=this._callbacks))return this;f=d.all;a=a.split(p);for(g=
-z.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,g);if(c=f){e=c.tail;for(b=[b].concat(g);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return this}};k.bind=k.on;k.unbind=k.off;var o=g.Model=function(a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=n(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.changed={};this._silent=
-{};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(o.prototype,k,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return this._escapedAttributes[a]=f.escape(null==
-b?"":""+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return this;d instanceof o&&(d=d.attributes);if(c.unset)for(e in d)d[e]=void 0;if(!this._validate(d,c))return!1;this.idAttribute in d&&(this.id=d[this.idAttribute]);var b=c.changes={},h=this.attributes,g=this._escapedAttributes,j=this._previousAttributes||{};for(e in d){a=d[e];if(!f.isEqual(h[e],a)||c.unset&&f.has(h,e))delete g[e],(c.silent?this._silent:
-b)[e]=!0;c.unset?delete h[e]:h[e]=a;!f.isEqual(j[e],a)||f.has(h,e)!=f.has(j,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete this.changed[e],delete this._pending[e])}c.silent||this.change(c);return this},unset:function(a,b){(b||(b={})).unset=!0;return this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return this.set(f.clone(this.attributes),a)},fetch:function(a){var a=a?f.clone(a):{},b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)};
-a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,"read",this,a)},save:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d&&!this.set(d,c.wait?a:c))return!1;var h=this,i=c.success;c.success=function(a,b,e){b=h.parse(a,e);if(c.wait){delete c.wait;b=f.extend(d||{},b)}if(!h.set(b,c))return false;i?i(h,a):h.trigger("sync",h,a,c)};c.error=g.wrapError(c.error,
-h,c);b=this.isNew()?"create":"update";b=(this.sync||g.sync).call(this,b,this,c);c.wait&&this.set(e,a);return b},destroy:function(a){var a=a?f.clone(a):{},b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(this.isNew())return d(),!1;a.success=function(e){a.wait&&d();c?c(b,e):b.trigger("sync",b,e,a)};a.error=g.wrapError(a.error,b,a);var e=(this.sync||g.sync).call(this,"delete",this,a);a.wait||d();return e},url:function(){var a=n(this,"urlRoot")||n(this.collection,"url")||t();
-return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},change:function(a){a||(a={});var b=this._changing;this._changing=!0;for(var c in this._silent)this._pending[c]=!0;var d=f.extend({},a.changes,this._silent);this._silent={};for(c in d)this.trigger("change:"+c,this,this.get(c),a);if(b)return this;for(;!f.isEmpty(this._pending);){this._pending=
-{};this.trigger("change",this,a);for(c in this.changed)!this._pending[c]&&!this._silent[c]&&delete this.changed[c];this._previousAttributes=f.clone(this.attributes)}this._changing=!1;return this},hasChanged:function(a){return!arguments.length?!f.isEmpty(this.changed):f.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?f.clone(this.changed):!1;var b,c=!1,d=this._previousAttributes,e;for(e in a)if(!f.isEqual(d[e],b=a[e]))(c||(c={}))[e]=b;return c},previous:function(a){return!arguments.length||
-!this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return!0;var a=f.extend({},this.attributes,a),c=this.validate(a,b);if(!c)return!0;b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b);return!1}});var r=g.Collection=function(a,b){b||(b={});b.model&&(this.model=b.model);b.comparator&&(this.comparator=b.comparator);
-this._reset();this.initialize.apply(this,arguments);a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(r.prototype,k,{model:o,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},add:function(a,b){var c,d,e,g,i,j={},k={},l=[];b||(b={});a=f.isArray(a)?a.slice():[a];c=0;for(d=a.length;c<d;c++){if(!(e=a[c]=this._prepareModel(a[c],b)))throw Error("Can't add an invalid model to a collection");g=e.cid;i=e.id;j[g]||this._byCid[g]||null!=i&&(k[i]||this._byId[i])?
-l.push(c):j[g]=k[i]=e}for(c=l.length;c--;)a.splice(l[c],1);c=0;for(d=a.length;c<d;c++)(e=a[c]).on("all",this._onModelEvent,this),this._byCid[e.cid]=e,null!=e.id&&(this._byId[e.id]=e);this.length+=d;A.apply(this.models,[null!=b.at?b.at:this.models.length,0].concat(a));this.comparator&&this.sort({silent:!0});if(b.silent)return this;c=0;for(d=this.models.length;c<d;c++)if(j[(e=this.models[c]).cid])b.index=c,e.trigger("add",e,this,b);return this},remove:function(a,b){var c,d,e,g;b||(b={});a=f.isArray(a)?
-a.slice():[a];c=0;for(d=a.length;c<d;c++)if(g=this.getByCid(a[c])||this.get(a[c]))delete this._byId[g.id],delete this._byCid[g.cid],e=this.indexOf(g),this.models.splice(e,1),this.length--,b.silent||(b.index=e,g.trigger("remove",g,this,b)),this._removeReference(g);return this},push:function(a,b){a=this._prepareModel(a,b);this.add(a,b);return a},pop:function(a){var b=this.at(this.length-1);this.remove(b,a);return b},unshift:function(a,b){a=this._prepareModel(a,b);this.add(a,f.extend({at:0},b));return a},
-shift:function(a){var b=this.at(0);this.remove(b,a);return b},get:function(a){return null==a?void 0:this._byId[null!=a.id?a.id:a]},getByCid:function(a){return a&&this._byCid[a.cid||a]},at:function(a){return this.models[a]},where:function(a){return f.isEmpty(a)?[]:this.filter(function(b){for(var c in a)if(a[c]!==b.get(c))return!1;return!0})},sort:function(a){a||(a={});if(!this.comparator)throw Error("Cannot sort a set without a comparator");var b=f.bind(this.comparator,this);1==this.comparator.length?
-this.models=this.sortBy(b):this.models.sort(b);a.silent||this.trigger("reset",this,a);return this},pluck:function(a){return f.map(this.models,function(b){return b.get(a)})},reset:function(a,b){a||(a=[]);b||(b={});for(var c=0,d=this.models.length;c<d;c++)this._removeReference(this.models[c]);this._reset();this.add(a,f.extend({silent:!0},b));b.silent||this.trigger("reset",this,b);return this},fetch:function(a){a=a?f.clone(a):{};void 0===a.parse&&(a.parse=!0);var b=this,c=a.success;a.success=function(d,
-e,f){b[a.add?"add":"reset"](b.parse(d,f),a);c&&c(b,d)};a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,"read",this,a)},create:function(a,b){var c=this,b=b?f.clone(b):{},a=this._prepareModel(a,b);if(!a)return!1;b.wait||c.add(a,b);var d=b.success;b.success=function(e,f){b.wait&&c.add(e,b);d?d(e,f):e.trigger("sync",a,f,b)};a.save(null,b);return a},parse:function(a){return a},chain:function(){return f(this.models).chain()},_reset:function(){this.length=0;this.models=[];this._byId=
-{};this._byCid={}},_prepareModel:function(a,b){b||(b={});a instanceof o?a.collection||(a.collection=this):(b.collection=this,a=new this.model(a,b),a._validate(a.attributes,b)||(a=!1));return a},_removeReference:function(a){this==a.collection&&delete a.collection;a.off("all",this._onModelEvent,this)},_onModelEvent:function(a,b,c,d){("add"==a||"remove"==a)&&c!=this||("destroy"==a&&this.remove(b,d),b&&a==="change:"+b.idAttribute&&(delete this._byId[b.previous(b.idAttribute)],this._byId[b.id]=b),this.trigger.apply(this,
-arguments))}});f.each("forEach,each,map,reduce,reduceRight,find,detect,filter,select,reject,every,all,some,any,include,contains,invoke,max,min,sortBy,sortedIndex,toArray,size,first,initial,rest,last,without,indexOf,shuffle,lastIndexOf,isEmpty,groupBy".split(","),function(a){r.prototype[a]=function(){return f[a].apply(f,[this.models].concat(f.toArray(arguments)))}});var u=g.Router=function(a){a||(a={});a.routes&&(this.routes=a.routes);this._bindRoutes();this.initialize.apply(this,arguments)},B=/:\w+/g,
-C=/\*\w+/g,D=/[-[\]{}()+?.,\\^$|#\s]/g;f.extend(u.prototype,k,{initialize:function(){},route:function(a,b,c){g.history||(g.history=new m);f.isRegExp(a)||(a=this._routeToRegExp(a));c||(c=this[b]);g.history.route(a,f.bind(function(d){d=this._extractParameters(a,d);c&&c.apply(this,d);this.trigger.apply(this,["route:"+b].concat(d));g.history.trigger("route",this,b,d)},this));return this},navigate:function(a,b){g.history.navigate(a,b)},_bindRoutes:function(){if(this.routes){var a=[],b;for(b in this.routes)a.unshift([b,
-this.routes[b]]);b=0;for(var c=a.length;b<c;b++)this.route(a[b][0],a[b][1],this[a[b][1]])}},_routeToRegExp:function(a){a=a.replace(D,"\\$&").replace(B,"([^/]+)").replace(C,"(.*?)");return RegExp("^"+a+"$")},_extractParameters:function(a,b){return a.exec(b).slice(1)}});var m=g.History=function(){this.handlers=[];f.bindAll(this,"checkUrl")},s=/^[#\/]/,E=/msie [\w.]+/;m.started=!1;f.extend(m.prototype,k,{interval:50,getHash:function(a){return(a=(a?a.location:window.location).href.match(/#(.*)$/))?a[1]:
-""},getFragment:function(a,b){if(null==a)if(this._hasPushState||b){var a=window.location.pathname,c=window.location.search;c&&(a+=c)}else a=this.getHash();a.indexOf(this.options.root)||(a=a.substr(this.options.root.length));return a.replace(s,"")},start:function(a){if(m.started)throw Error("Backbone.history has already been started");m.started=!0;this.options=f.extend({},{root:"/"},this.options,a);this._wantsHashChange=!1!==this.options.hashChange;this._wantsPushState=!!this.options.pushState;this._hasPushState=
-!(!this.options.pushState||!window.history||!window.history.pushState);var a=this.getFragment(),b=document.documentMode;if(b=E.exec(navigator.userAgent.toLowerCase())&&(!b||7>=b))this.iframe=i('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(a);this._hasPushState?i(window).bind("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!b?i(window).bind("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,
-this.interval));this.fragment=a;a=window.location;b=a.pathname==this.options.root;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!b)return this.fragment=this.getFragment(null,!0),window.location.replace(this.options.root+"#"+this.fragment),!0;this._wantsPushState&&this._hasPushState&&b&&a.hash&&(this.fragment=this.getHash().replace(s,""),window.history.replaceState({},document.title,a.protocol+"//"+a.host+this.options.root+this.fragment));if(!this.options.silent)return this.loadUrl()},
-stop:function(){i(window).unbind("popstate",this.checkUrl).unbind("hashchange",this.checkUrl);clearInterval(this._checkUrlInterval);m.started=!1},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();a==this.fragment&&this.iframe&&(a=this.getFragment(this.getHash(this.iframe)));if(a==this.fragment)return!1;this.iframe&&this.navigate(a);this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(a){var b=this.fragment=this.getFragment(a);return f.any(this.handlers,
-function(a){if(a.route.test(b))return a.callback(b),!0})},navigate:function(a,b){if(!m.started)return!1;if(!b||!0===b)b={trigger:b};var c=(a||"").replace(s,"");this.fragment!=c&&(this._hasPushState?(0!=c.indexOf(this.options.root)&&(c=this.options.root+c),this.fragment=c,window.history[b.replace?"replaceState":"pushState"]({},document.title,c)):this._wantsHashChange?(this.fragment=c,this._updateHash(window.location,c,b.replace),this.iframe&&c!=this.getFragment(this.getHash(this.iframe))&&(b.replace||
-this.iframe.document.open().close(),this._updateHash(this.iframe.location,c,b.replace))):window.location.assign(this.options.root+a),b.trigger&&this.loadUrl(a))},_updateHash:function(a,b,c){c?a.replace(a.toString().replace(/(javascript:|#).*$/,"")+"#"+b):a.hash=b}});var v=g.View=function(a){this.cid=f.uniqueId("view");this._configure(a||{});this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()},F=/^(\S+)\s*(.*)$/,w="model,collection,el,id,attributes,className,tagName".split(",");
-f.extend(v.prototype,k,{tagName:"div",$:function(a){return this.$el.find(a)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();return this},make:function(a,b,c){a=document.createElement(a);b&&i(a).attr(b);c&&i(a).html(c);return a},setElement:function(a,b){this.$el&&this.undelegateEvents();this.$el=a instanceof i?a:i(a);this.el=this.$el[0];!1!==b&&this.delegateEvents();return this},delegateEvents:function(a){if(a||(a=n(this,"events"))){this.undelegateEvents();
-for(var b in a){var c=a[b];f.isFunction(c)||(c=this[a[b]]);if(!c)throw Error('Method "'+a[b]+'" does not exist');var d=b.match(F),e=d[1],d=d[2],c=f.bind(c,this),e=e+(".delegateEvents"+this.cid);""===d?this.$el.bind(e,c):this.$el.delegate(d,e,c)}}},undelegateEvents:function(){this.$el.unbind(".delegateEvents"+this.cid)},_configure:function(a){this.options&&(a=f.extend({},this.options,a));for(var b=0,c=w.length;b<c;b++){var d=w[b];a[d]&&(this[d]=a[d])}this.options=a},_ensureElement:function(){if(this.el)this.setElement(this.el,
-!1);else{var a=n(this,"attributes")||{};this.id&&(a.id=this.id);this.className&&(a["class"]=this.className);this.setElement(this.make(this.tagName,a),!1)}}});o.extend=r.extend=u.extend=v.extend=function(a,b){var c=G(this,a,b);c.extend=this.extend;return c};var H={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};g.sync=function(a,b,c){var d=H[a];c||(c={});var e={type:d,dataType:"json"};c.url||(e.url=n(b,"url")||t());if(!c.data&&b&&("create"==a||"update"==a))e.contentType="application/json",
-e.data=JSON.stringify(b.toJSON());g.emulateJSON&&(e.contentType="application/x-www-form-urlencoded",e.data=e.data?{model:e.data}:{});if(g.emulateHTTP&&("PUT"===d||"DELETE"===d))g.emulateJSON&&(e.data._method=d),e.type="POST",e.beforeSend=function(a){a.setRequestHeader("X-HTTP-Method-Override",d)};"GET"!==e.type&&!g.emulateJSON&&(e.processData=!1);return i.ajax(f.extend(e,c))};g.wrapError=function(a,b,c){return function(d,e){e=d===b?e:d;a?a(b,e,c):b.trigger("error",b,e,c)}};var x=function(){},G=function(a,
-b,c){var d;d=b&&b.hasOwnProperty("constructor")?b.constructor:function(){a.apply(this,arguments)};f.extend(d,a);x.prototype=a.prototype;d.prototype=new x;b&&f.extend(d.prototype,b);c&&f.extend(d,c);d.prototype.constructor=d;d.__super__=a.prototype;return d},n=function(a,b){return!a||!a[b]?null:f.isFunction(a[b])?a[b]():a[b]},t=function(){throw Error('A "url" property or function must be specified');}}).call(this);

+ 0 - 223
MediaBrowser.Networking/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;
-;

File diff ditekan karena terlalu besar
+ 0 - 8
MediaBrowser.Networking/swagger-ui/lib/jquery.ba-bbq.min.js


File diff ditekan karena terlalu besar
+ 0 - 1
MediaBrowser.Networking/swagger-ui/lib/jquery.min.js


+ 0 - 1
MediaBrowser.Networking/swagger-ui/lib/jquery.slideto.min.js

@@ -1 +0,0 @@
-(function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery);

+ 0 - 8
MediaBrowser.Networking/swagger-ui/lib/jquery.wiggle.min.js

@@ -1,8 +0,0 @@
-/*
-jQuery Wiggle
-Author: WonderGroup, Jordan Thomas
-URL: http://labs.wondergroup.com/demos/mini-ui/index.html
-License: MIT (http://en.wikipedia.org/wiki/MIT_License)
-*/
-jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('<div class="wiggle-wrap"></div>').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);}
-if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});};

+ 0 - 507
MediaBrowser.Networking/swagger-ui/lib/swagger.js

@@ -1,507 +0,0 @@
-// Generated by CoffeeScript 1.3.3
-(function() {
-  var SwaggerApi, SwaggerOperation, SwaggerRequest, SwaggerResource,
-    __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
-
-  SwaggerApi = (function() {
-
-    SwaggerApi.prototype.discoveryUrl = "http://api.wordnik.com/v4/resources.json";
-
-    SwaggerApi.prototype.debug = false;
-
-    SwaggerApi.prototype.api_key = null;
-
-    SwaggerApi.prototype.basePath = null;
-
-    function SwaggerApi(options) {
-      if (options == null) {
-        options = {};
-      }
-      if (options.discoveryUrl != null) {
-        this.discoveryUrl = options.discoveryUrl;
-      }
-      if (options.debug != null) {
-        this.debug = options.debug;
-      }
-      this.apiKeyName = options.apiKeyName != null ? options.apiKeyName : 'api_key';
-      if (options.apiKey != null) {
-        this.api_key = options.apiKey;
-      }
-      if (options.api_key != null) {
-        this.api_key = options.api_key;
-      }
-      if (options.verbose != null) {
-        this.verbose = options.verbose;
-      }
-      this.supportHeaderParams = options.supportHeaderParams != null ? options.supportHeaderParams : false;
-      this.supportedSubmitMethods = options.supportedSubmitMethods != null ? options.supportedSubmitMethods : ['get'];
-      if (options.success != null) {
-        this.success = options.success;
-      }
-      this.failure = options.failure != null ? options.failure : function() {};
-      this.progress = options.progress != null ? options.progress : function() {};
-      this.discoveryUrl = this.suffixApiKey(this.discoveryUrl);
-      if (options.success != null) {
-        this.build();
-      }
-    }
-
-    SwaggerApi.prototype.build = function() {
-      var _this = this;
-      this.progress('fetching resource list: ' + this.discoveryUrl);
-      return jQuery.getJSON(this.discoveryUrl, function(response) {
-        var res, resource, _i, _j, _len, _len1, _ref, _ref1;
-        if ((response.basePath != null) && jQuery.trim(response.basePath).length > 0) {
-          _this.basePath = response.basePath;
-          if (_this.basePath.match(/^HTTP/i) == null) {
-            _this.fail("discoveryUrl basePath must be a URL.");
-          }
-          _this.basePath = _this.basePath.replace(/\/$/, '');
-        } else {
-          _this.basePath = _this.discoveryUrl.substring(0, _this.discoveryUrl.lastIndexOf('/'));
-          log('derived basepath from discoveryUrl as ' + _this.basePath);
-        }
-        _this.resources = {};
-        _this.resourcesArray = [];
-        if (response.resourcePath != null) {
-          _this.resourcePath = response.resourcePath;
-          res = null;
-          _ref = response.apis;
-          for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-            resource = _ref[_i];
-            if (res === null) {
-              res = new SwaggerResource(resource, _this);
-            } else {
-              res.addOperations(resource.path, resource.operations);
-            }
-          }
-          if (res != null) {
-            _this.resources[res.name] = res;
-            _this.resourcesArray.push(res);
-            res.ready = true;
-            _this.selfReflect();
-          }
-        } else {
-          _ref1 = response.apis;
-          for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
-            resource = _ref1[_j];
-            res = new SwaggerResource(resource, _this);
-            _this.resources[res.name] = res;
-            _this.resourcesArray.push(res);
-          }
-        }
-        return _this;
-      }).error(function(error) {
-        return _this.fail(error.status + ' : ' + error.statusText + ' ' + _this.discoveryUrl);
-      });
-    };
-
-    SwaggerApi.prototype.selfReflect = function() {
-      var resource, resource_name, _ref;
-      if (this.resources == null) {
-        return false;
-      }
-      _ref = this.resources;
-      for (resource_name in _ref) {
-        resource = _ref[resource_name];
-        if (resource.ready == null) {
-          return false;
-        }
-      }
-      this.ready = true;
-      if (this.success != null) {
-        return this.success();
-      }
-    };
-
-    SwaggerApi.prototype.fail = function(message) {
-      this.failure(message);
-      throw message;
-    };
-
-    SwaggerApi.prototype.suffixApiKey = function(url) {
-      var sep;
-      if ((this.api_key != null) && jQuery.trim(this.api_key).length > 0 && (url != null)) {
-        sep = url.indexOf('?') > 0 ? '&' : '?';
-        return url + sep + this.apiKeyName + '=' + this.api_key;
-      } else {
-        return url;
-      }
-    };
-
-    SwaggerApi.prototype.help = function() {
-      var operation, operation_name, parameter, resource, resource_name, _i, _len, _ref, _ref1, _ref2;
-      _ref = this.resources;
-      for (resource_name in _ref) {
-        resource = _ref[resource_name];
-        console.log(resource_name);
-        _ref1 = resource.operations;
-        for (operation_name in _ref1) {
-          operation = _ref1[operation_name];
-          console.log("  " + operation.nickname);
-          _ref2 = operation.parameters;
-          for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
-            parameter = _ref2[_i];
-            console.log("    " + parameter.name + (parameter.required ? ' (required)' : '') + " - " + parameter.description);
-          }
-        }
-      }
-      return this;
-    };
-
-    return SwaggerApi;
-
-  })();
-
-  SwaggerResource = (function() {
-
-    function SwaggerResource(resourceObj, api) {
-      var parts,
-        _this = this;
-      this.api = api;
-      this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path;
-      this.description = resourceObj.description;
-      parts = this.path.split("/");
-      this.name = parts[parts.length - 1].replace('.{format}', '');
-      this.basePath = this.api.basePath;
-      this.operations = {};
-      this.operationsArray = [];
-      if ((resourceObj.operations != null) && (this.api.resourcePath != null)) {
-        this.api.progress('reading resource ' + this.name + ' operations');
-        this.addOperations(resourceObj.path, resourceObj.operations);
-        this.api[this.name] = this;
-      } else {
-        if (this.path == null) {
-          this.api.fail("SwaggerResources must have a path.");
-        }
-        this.url = this.api.suffixApiKey(this.api.basePath + this.path.replace('{format}', 'json'));
-        this.api.progress('fetching resource ' + this.name + ': ' + this.url);
-        jQuery.getJSON(this.url, function(response) {
-          var endpoint, _i, _len, _ref;
-          if ((response.basePath != null) && jQuery.trim(response.basePath).length > 0) {
-            _this.basePath = response.basePath;
-            _this.basePath = _this.basePath.replace(/\/$/, '');
-          }
-          if (response.apis) {
-            _ref = response.apis;
-            for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-              endpoint = _ref[_i];
-              _this.addOperations(endpoint.path, endpoint.operations);
-            }
-          }
-          _this.api[_this.name] = _this;
-          _this.ready = true;
-          return _this.api.selfReflect();
-        }).error(function(error) {
-          return _this.fail(error.status + ' : ' + error.statusText + ' ' + _this.url);
-        });
-      }
-    }
-
-    SwaggerResource.prototype.addOperations = function(resource_path, ops) {
-      var o, op, _i, _len, _results;
-      if (ops) {
-        _results = [];
-        for (_i = 0, _len = ops.length; _i < _len; _i++) {
-          o = ops[_i];
-          op = new SwaggerOperation(o.nickname, resource_path, o.httpMethod, o.parameters, o.summary, o.notes, this);
-          this.operations[op.nickname] = op;
-          _results.push(this.operationsArray.push(op));
-        }
-        return _results;
-      }
-    };
-
-    SwaggerResource.prototype.help = function() {
-      var operation, operation_name, parameter, _i, _len, _ref, _ref1;
-      _ref = this.operations;
-      for (operation_name in _ref) {
-        operation = _ref[operation_name];
-        console.log("  " + operation.nickname);
-        _ref1 = operation.parameters;
-        for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
-          parameter = _ref1[_i];
-          console.log("    " + parameter.name + (parameter.required ? ' (required)' : '') + " - " + parameter.description);
-        }
-      }
-      return this;
-    };
-
-    return SwaggerResource;
-
-  })();
-
-  SwaggerOperation = (function() {
-
-    function SwaggerOperation(nickname, path, httpMethod, parameters, summary, notes, resource) {
-      var parameter, v, _i, _j, _len, _len1, _ref, _ref1,
-        _this = this;
-      this.nickname = nickname;
-      this.path = path;
-      this.httpMethod = httpMethod;
-      this.parameters = parameters != null ? parameters : [];
-      this.summary = summary;
-      this.notes = notes;
-      this.resource = resource;
-      this["do"] = __bind(this["do"], this);
-
-      if (this.nickname == null) {
-        this.resource.api.fail("SwaggerOperations must have a nickname.");
-      }
-      if (this.path == null) {
-        this.resource.api.fail("SwaggerOperation " + nickname + " is missing path.");
-      }
-      if (this.httpMethod == null) {
-        this.resource.api.fail("SwaggerOperation " + nickname + " is missing httpMethod.");
-      }
-      this.path = this.path.replace('{format}', 'json');
-      this.httpMethod = this.httpMethod.toLowerCase();
-      this.isGetMethod = this.httpMethod === "get";
-      this.resourceName = this.resource.name;
-      _ref = this.parameters;
-      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-        parameter = _ref[_i];
-        parameter.name = parameter.name || parameter.dataType;
-        if (parameter.allowableValues != null) {
-          if (parameter.allowableValues.valueType === "RANGE") {
-            parameter.isRange = true;
-          } else {
-            parameter.isList = true;
-          }
-          if (parameter.allowableValues.values != null) {
-            parameter.allowableValues.descriptiveValues = [];
-            _ref1 = parameter.allowableValues.values;
-            for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
-              v = _ref1[_j];
-              if ((parameter.defaultValue != null) && parameter.defaultValue === v) {
-                parameter.allowableValues.descriptiveValues.push({
-                  value: v,
-                  isDefault: true
-                });
-              } else {
-                parameter.allowableValues.descriptiveValues.push({
-                  value: v,
-                  isDefault: false
-                });
-              }
-            }
-          }
-        }
-      }
-      this.resource[this.nickname] = function(args, callback, error) {
-        return _this["do"](args, callback, error);
-      };
-    }
-
-    SwaggerOperation.prototype["do"] = function(args, callback, error) {
-      var body, headers;
-      if (args == null) {
-        args = {};
-      }
-      if ((typeof args) === "function") {
-        error = callback;
-        callback = args;
-        args = {};
-      }
-      if (error == null) {
-        error = function(xhr, textStatus, error) {
-          return console.log(xhr, textStatus, error);
-        };
-      }
-      if (callback == null) {
-        callback = function(data) {
-          return console.log(data);
-        };
-      }
-      if (args.headers != null) {
-        headers = args.headers;
-        delete args.headers;
-      }
-      if (args.body != null) {
-        body = args.body;
-        delete args.body;
-      }
-      return new SwaggerRequest(this.httpMethod, this.urlify(args), headers, body, callback, error, this);
-    };
-
-    SwaggerOperation.prototype.pathJson = function() {
-      return this.path.replace("{format}", "json");
-    };
-
-    SwaggerOperation.prototype.pathXml = function() {
-      return this.path.replace("{format}", "xml");
-    };
-
-    SwaggerOperation.prototype.urlify = function(args, includeApiKey) {
-      var param, queryParams, url, _i, _len, _ref;
-      if (includeApiKey == null) {
-        includeApiKey = true;
-      }
-      url = this.resource.basePath + this.pathJson();
-      _ref = this.parameters;
-      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-        param = _ref[_i];
-        if (param.paramType === 'path') {
-          if (args[param.name]) {
-            url = url.replace("{" + param.name + "}", encodeURIComponent(args[param.name]));
-            delete args[param.name];
-          } else {
-            throw "" + param.name + " is a required path param.";
-          }
-        }
-      }
-      if (includeApiKey && (this.resource.api.api_key != null) && this.resource.api.api_key.length > 0) {
-        args[this.apiKeyName] = this.resource.api.api_key;
-      }
-      if (this.supportHeaderParams()) {
-        queryParams = jQuery.param(this.getQueryParams(args));
-      } else {
-        queryParams = jQuery.param(this.getQueryAndHeaderParams(args));
-      }
-      if ((queryParams != null) && queryParams.length > 0) {
-        url += "?" + queryParams;
-      }
-      return url;
-    };
-
-    SwaggerOperation.prototype.supportHeaderParams = function() {
-      return this.resource.api.supportHeaderParams;
-    };
-
-    SwaggerOperation.prototype.supportedSubmitMethods = function() {
-      return this.resource.api.supportedSubmitMethods;
-    };
-
-    SwaggerOperation.prototype.getQueryAndHeaderParams = function(args, includeApiKey) {
-      if (includeApiKey == null) {
-        includeApiKey = true;
-      }
-      return this.getMatchingParams(['query', 'header'], args, includeApiKey);
-    };
-
-    SwaggerOperation.prototype.getQueryParams = function(args, includeApiKey) {
-      if (includeApiKey == null) {
-        includeApiKey = true;
-      }
-      return this.getMatchingParams(['query'], args, includeApiKey);
-    };
-
-    SwaggerOperation.prototype.getHeaderParams = function(args, includeApiKey) {
-      if (includeApiKey == null) {
-        includeApiKey = true;
-      }
-      return this.getMatchingParams(['header'], args, includeApiKey);
-    };
-
-    SwaggerOperation.prototype.getMatchingParams = function(paramTypes, args, includeApiKey) {
-      var matchingParams, param, _i, _len, _ref;
-      matchingParams = {};
-      _ref = this.parameters;
-      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-        param = _ref[_i];
-        if ((jQuery.inArray(param.paramType, paramTypes) >= 0) && args[param.name]) {
-          matchingParams[param.name] = args[param.name];
-        }
-      }
-      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;
-      }
-      return matchingParams;
-    };
-
-    SwaggerOperation.prototype.help = function() {
-      var parameter, _i, _len, _ref;
-      _ref = this.parameters;
-      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-        parameter = _ref[_i];
-        console.log("    " + parameter.name + (parameter.required ? ' (required)' : '') + " - " + parameter.description);
-      }
-      return this;
-    };
-
-    return SwaggerOperation;
-
-  })();
-
-  SwaggerRequest = (function() {
-
-    function SwaggerRequest(type, url, headers, body, successCallback, errorCallback, operation) {
-      var obj,
-        _this = this;
-      this.type = type;
-      this.url = url;
-      this.headers = headers;
-      this.body = body;
-      this.successCallback = successCallback;
-      this.errorCallback = errorCallback;
-      this.operation = operation;
-      if (this.type == null) {
-        throw "SwaggerRequest type is required (get/post/put/delete).";
-      }
-      if (this.url == null) {
-        throw "SwaggerRequest url is required.";
-      }
-      if (this.successCallback == null) {
-        throw "SwaggerRequest successCallback is required.";
-      }
-      if (this.errorCallback == null) {
-        throw "SwaggerRequest error callback is required.";
-      }
-      if (this.operation == null) {
-        throw "SwaggerRequest operation is required.";
-      }
-      if (this.operation.resource.api.verbose) {
-        console.log(this.asCurl());
-      }
-      this.headers || (this.headers = {});
-      if (this.operation.resource.api.api_key != null) {
-        this.headers[this.apiKeyName] = this.operation.resource.api.api_key;
-      }
-      if (this.headers.mock == null) {
-        obj = {
-          type: this.type,
-          url: this.url,
-          data: JSON.stringify(this.body),
-          dataType: 'json',
-          error: function(xhr, textStatus, error) {
-            return _this.errorCallback(xhr, textStatus, error);
-          },
-          success: function(data) {
-            return _this.successCallback(data);
-          }
-        };
-        if (obj.type.toLowerCase() === "post" || obj.type.toLowerCase() === "put") {
-          obj.contentType = "application/json";
-        }
-        jQuery.ajax(obj);
-      }
-    }
-
-    SwaggerRequest.prototype.asCurl = function() {
-      var header_args, k, v;
-      header_args = (function() {
-        var _ref, _results;
-        _ref = this.headers;
-        _results = [];
-        for (k in _ref) {
-          v = _ref[k];
-          _results.push("--header \"" + k + ": " + v + "\"");
-        }
-        return _results;
-      }).call(this);
-      return "curl " + (header_args.join(" ")) + " " + this.url;
-    };
-
-    return SwaggerRequest;
-
-  })();
-
-  window.SwaggerApi = SwaggerApi;
-
-  window.SwaggerResource = SwaggerResource;
-
-  window.SwaggerOperation = SwaggerOperation;
-
-  window.SwaggerRequest = SwaggerRequest;
-
-}).call(this);

+ 0 - 32
MediaBrowser.Networking/swagger-ui/lib/underscore-min.js

@@ -1,32 +0,0 @@
-// Underscore.js 1.3.3
-// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
-// Underscore is freely distributable under the MIT license.
-// Portions of Underscore are inspired or borrowed from Prototype,
-// Oliver Steele's Functional, and John Resig's Micro-Templating.
-// For all details and documentation:
-// http://documentcloud.github.com/underscore
-(function(){function r(a,c,d){if(a===c)return 0!==a||1/a==1/c;if(null==a||null==c)return a===c;a._chain&&(a=a._wrapped);c._chain&&(c=c._wrapped);if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return!1;switch(e){case "[object String]":return a==""+c;case "[object Number]":return a!=+a?c!=+c:0==a?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
-c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if("object"!=typeof a||"object"!=typeof c)return!1;for(var f=d.length;f--;)if(d[f]==a)return!0;d.push(a);var f=0,g=!0;if("[object Array]"==e){if(f=a.length,g=f==c.length)for(;f--&&(g=f in a==f in c&&r(a[f],c[f],d)););}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return!1;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&r(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,h)&&!f--)break;
-g=!f}}d.pop();return g}var s=this,I=s._,o={},k=Array.prototype,p=Object.prototype,i=k.slice,J=k.unshift,l=p.toString,K=p.hasOwnProperty,y=k.forEach,z=k.map,A=k.reduce,B=k.reduceRight,C=k.filter,D=k.every,E=k.some,q=k.indexOf,F=k.lastIndexOf,p=Array.isArray,L=Object.keys,t=Function.prototype.bind,b=function(a){return new m(a)};"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(exports=module.exports=b),exports._=b):s._=b;b.VERSION="1.3.3";var j=b.each=b.forEach=function(a,
-c,d){if(a!=null)if(y&&a.forEach===y)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===o)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===o)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(z&&a.map===z)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(A&&
-a.reduce===A){e&&(c=b.bind(c,e));return f?a.reduce(c,d):a.reduce(c)}j(a,function(a,b,i){if(f)d=c.call(e,d,a,b,i);else{d=a;f=true}});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(B&&a.reduceRight===B){e&&(c=b.bind(c,e));return f?a.reduceRight(c,d):a.reduceRight(c)}var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=function(a,
-c,b){var e;G(a,function(a,g,h){if(c.call(b,a,g,h)){e=a;return true}});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(C&&a.filter===C)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(D&&a.every===D)return a.every(c,b);j(a,function(a,g,h){if(!(e=e&&c.call(b,
-a,g,h)))return o});return!!e};var G=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(E&&a.some===E)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return o});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;if(q&&a.indexOf===q)return a.indexOf(c)!=-1;return b=G(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
-function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a)&&a[0]===+a[0])return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a)&&a[0]===+a[0])return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&
-(e={value:a,computed:b})});return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){d=Math.floor(Math.random()*(f+1));b[f]=b[d];b[d]=a});return b};b.sortBy=function(a,c,d){var e=b.isFunction(c)?c:function(a){return a[c]};return b.pluck(b.map(a,function(a,b,c){return{value:a,criteria:e.call(d,a,b,c)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c===void 0?1:d===void 0?-1:c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};
-j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:b.isArray(a)||b.isArguments(a)?i.call(a):a.toArray&&b.isFunction(a.toArray)?a.toArray():b.values(a)};b.size=function(a){return b.isArray(a)?a.length:b.keys(a).length};b.first=b.head=b.take=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,
-0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,
-e=[];a.length<3&&(c=true);b.reduce(d,function(d,g,h){if(c?b.last(d)!==g||!d.length:!b.include(d,g)){d.push(g);e.push(a[h])}return d},[]);return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1),true);return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=
-i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,d){if(a==null)return-1;var e;if(d){d=b.sortedIndex(a,c);return a[d]===c?d:-1}if(q&&a.indexOf===q)return a.indexOf(c);d=0;for(e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(F&&a.lastIndexOf===F)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){if(arguments.length<=
-1){b=a||0;a=0}for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;){g[f++]=a;a=a+d}return g};var H=function(){};b.bind=function(a,c){var d,e;if(a.bind===t&&t)return t.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));H.prototype=a.prototype;var b=new H,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=
-i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(null,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i,j=b.debounce(function(){h=
-g=false},c);return function(){d=this;e=arguments;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);j()},c));g?h=true:i=a.apply(d,e);j();g=true;return i}};b.debounce=function(a,b,d){var e;return function(){var f=this,g=arguments;d&&!e&&a.apply(f,g);clearTimeout(e);e=setTimeout(function(){e=null;d||a.apply(f,g)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));
-return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=L||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&
-c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.pick=function(a){var c={};j(b.flatten(i.call(arguments,1)),function(b){b in a&&(c[b]=a[b])});return c};b.defaults=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return r(a,b,[])};b.isEmpty=
-function(a){if(a==null)return true;if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=p||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};b.isArguments=function(a){return l.call(a)=="[object Arguments]"};b.isArguments(arguments)||(b.isArguments=function(a){return!(!a||!b.has(a,"callee"))});b.isFunction=function(a){return l.call(a)=="[object Function]"};
-b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isFinite=function(a){return b.isNumber(a)&&isFinite(a)};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,
-b){return K.call(a,b)};b.noConflict=function(){s._=I;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};b.result=function(a,c){if(a==null)return null;var d=a[c];return b.isFunction(d)?d.call(a):d};b.mixin=function(a){j(b.functions(a),function(c){M(c,b[c]=a[c])})};var N=0;b.uniqueId=
-function(a){var b=N++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var u=/.^/,n={"\\":"\\","'":"'",r:"\r",n:"\n",t:"\t",u2028:"\u2028",u2029:"\u2029"},v;for(v in n)n[n[v]]=v;var O=/\\|'|\r|\n|\t|\u2028|\u2029/g,P=/\\(\\|'|r|n|t|u2028|u2029)/g,w=function(a){return a.replace(P,function(a,b){return n[b]})};b.template=function(a,c,d){d=b.defaults(d||{},b.templateSettings);a="__p+='"+a.replace(O,function(a){return"\\"+n[a]}).replace(d.escape||
-u,function(a,b){return"'+\n_.escape("+w(b)+")+\n'"}).replace(d.interpolate||u,function(a,b){return"'+\n("+w(b)+")+\n'"}).replace(d.evaluate||u,function(a,b){return"';\n"+w(b)+"\n;__p+='"})+"';\n";d.variable||(a="with(obj||{}){\n"+a+"}\n");var a="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+a+"return __p;\n",e=new Function(d.variable||"obj","_",a);if(c)return e(c,b);c=function(a){return e.call(this,a,b)};c.source="function("+(d.variable||"obj")+"){\n"+a+"}";return c};
-b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var x=function(a,c){return c?b(a).chain():a},M=function(a,c){m.prototype[a]=function(){var a=i.call(arguments);J.call(a,this._wrapped);return x(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return x(d,
-this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return x(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);

+ 0 - 1309
MediaBrowser.Networking/swagger-ui/swagger-ui.js

@@ -1,1309 +0,0 @@
-$(function() {
-
-	// Helper function for vertically aligning DOM elements
-	// http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
-	$.fn.vAlign = function() {
-		return this.each(function(i){
-		var ah = $(this).height();
-		var ph = $(this).parent().height();
-		var mh = (ph - ah) / 2;
-		$(this).css('margin-top', mh);
-		});
-	};
-
-	$.fn.stretchFormtasticInputWidthToParent = function() {
-		return this.each(function(i){
-		var p_width = $(this).closest("form").innerWidth();
-		var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest("form").css('padding-right'), 10);
-		var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
-		$(this).css('width', p_width - p_padding - this_padding);
-		});
-	};
-
-	$('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent();
-
-	// Vertically center these paragraphs
-	// Parent may need a min-height for this to work..
-	$('ul.downplayed li div.content p').vAlign();
-
-	// When a sandbox form is submitted..
-	$("form.sandbox").submit(function(){
-
-		var error_free = true;
-
-		// Cycle through the forms required inputs
- 		$(this).find("input.required").each(function() {
-
-			// Remove any existing error styles from the input
-			$(this).removeClass('error');
-
-			// Tack the error style on if the input is empty..
-			if ($(this).val() == '') {
-				$(this).addClass('error');
-				$(this).wiggle();
-				error_free = false;
-			}
-
-		});
-
-		return error_free;
-	});
-
-});
-
-function clippyCopiedCallback(a) {
-  $('#api_key_copied').fadeIn().delay(1000).fadeOut();
-
-  // var b = $("#clippy_tooltip_" + a);
-  // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() {
-  //   b.attr("title", "copy to clipboard")
-  // },
-  // 500))
-}
-
-// Logging function that accounts for browsers that don't have window.console
-function log() {
-  if (window.console) console.log.apply(console,arguments);
-}
-  
-var Docs = {
-
-	shebang: function() {
-
-		// If shebang has an operation nickname in it..
-		// e.g. /docs/#!/words/get_search
-		var fragments = $.param.fragment().split('/');
-		fragments.shift(); // get rid of the bang
-
-		switch (fragments.length) {
-			case 1:
-				// Expand all operations for the resource and scroll to it
-//				log('shebang resource:' + fragments[0]);
-				var dom_id = 'resource_' + fragments[0];
-
-				Docs.expandEndpointListForResource(fragments[0]);
-				$("#"+dom_id).slideto({highlight: false});
-				break;
-			case 2:
-				// Refer to the endpoint DOM element, e.g. #words_get_search
-//				log('shebang endpoint: ' + fragments.join('_'));
-
-                // Expand Resource
-                Docs.expandEndpointListForResource(fragments[0]);
-                $("#"+dom_id).slideto({highlight: false});
-
-                // Expand operation
-				var li_dom_id = fragments.join('_');
-				var li_content_dom_id = li_dom_id + "_content";
-
-//                log("li_dom_id " + li_dom_id);
-//                log("li_content_dom_id " + li_content_dom_id);
-
-				Docs.expandOperation($('#'+li_content_dom_id));
-				$('#'+li_dom_id).slideto({highlight: false});
-				break;
-		}
-
-	},
-
-	toggleEndpointListForResource: function(resource) {
-		var elem = $('li#resource_' + resource + ' ul.endpoints');
-		if (elem.is(':visible')) {
-			Docs.collapseEndpointListForResource(resource);
-		} else {
-			Docs.expandEndpointListForResource(resource);
-		}
-	},
-
-	// Expand resource
-	expandEndpointListForResource: function(resource) {
-		$('#resource_' + resource).addClass('active');
-
-		var elem = $('li#resource_' + resource + ' ul.endpoints');
-		elem.slideDown();
-	},
-
-	// Collapse resource and mark as explicitly closed
-	collapseEndpointListForResource: function(resource) {
-		$('#resource_' + resource).removeClass('active');
-
-		var elem = $('li#resource_' + resource + ' ul.endpoints');
-		elem.slideUp();
-	},
-
-	expandOperationsForResource: function(resource) {
-		// Make sure the resource container is open..
-		Docs.expandEndpointListForResource(resource);
-		$('li#resource_' + resource + ' li.operation div.content').each(function() {
-			Docs.expandOperation($(this));
-		});
-	},
-
-	collapseOperationsForResource: function(resource) {
-		// Make sure the resource container is open..
-		Docs.expandEndpointListForResource(resource);
-		$('li#resource_' + resource + ' li.operation div.content').each(function() {
-			Docs.collapseOperation($(this));
-		});
-	},
-
-	expandOperation: function(elem) {
-		elem.slideDown();
-	},
-
-	collapseOperation: function(elem) {
-		elem.slideUp();
-	}
-
-};(function() {
-  var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['main'] = template(function (Handlebars,depth0,helpers,partials,data) {
-  helpers = helpers || Handlebars.helpers;
-  var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
-
-
-  buffer += "\n<div class='container' id='resources_container'>\n    <ul id='resources'>\n    </ul>\n\n    <div class=\"footer\">\n        <br>\n        <br>\n        <h4 style=\"color: #999\">[<span style=\"font-variant: small-caps\">base url</span>: ";
-  foundHelper = helpers.basePath;
-  stack1 = foundHelper || depth0.basePath;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "basePath", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "]</h4>\n    </div>\n</div>";
-  return buffer;});
-})();
-
-(function() {
-  var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['operation'] = template(function (Handlebars,depth0,helpers,partials,data) {
-  helpers = helpers || Handlebars.helpers;
-  var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
-
-function program1(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n                <h4>Implementation Notes</h4>\n                <p>";
-  foundHelper = helpers.notes;
-  stack1 = foundHelper || depth0.notes;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "notes", { hash: {} }); }
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "</p>\n                ";
-  return buffer;}
-
-function program3(depth0,data) {
-  
-  
-  return "\n                    ";}
-
-function program5(depth0,data) {
-  
-  
-  return "\n                    <div class='sandbox_header'>\n                        <input class='submit' name='commit' type='button' value='Try it out!' />\n                        <a href='#' class='response_hider' style='display:none'>Hide Response</a>\n                        <img alt='Throbber' class='response_throbber' src='http://swagger.wordnik.com/images/throbber.gif' style='display:none' />\n                    </div>\n                    ";}
-
-  buffer += "\n    <ul class='operations' >\n        <li class='";
-  foundHelper = helpers.httpMethod;
-  stack1 = foundHelper || depth0.httpMethod;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
-  buffer += escapeExpression(stack1) + " operation' id='";
-  foundHelper = helpers.resourceName;
-  stack1 = foundHelper || depth0.resourceName;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "resourceName", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "_";
-  foundHelper = helpers.nickname;
-  stack1 = foundHelper || depth0.nickname;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "nickname", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "_";
-  foundHelper = helpers.httpMethod;
-  stack1 = foundHelper || depth0.httpMethod;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'>\n            <div class='heading'>\n                <h3>\n                  <span class='http_method'>\n                    <a href='#!/";
-  foundHelper = helpers.resourceName;
-  stack1 = foundHelper || depth0.resourceName;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "resourceName", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "/";
-  foundHelper = helpers.nickname;
-  stack1 = foundHelper || depth0.nickname;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "nickname", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "_";
-  foundHelper = helpers.httpMethod;
-  stack1 = foundHelper || depth0.httpMethod;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "' class=\"toggleOperation\">";
-  foundHelper = helpers.httpMethod;
-  stack1 = foundHelper || depth0.httpMethod;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</a>\n                  </span>\n                  <span class='path'>\n                    <a href='#!/";
-  foundHelper = helpers.resourceName;
-  stack1 = foundHelper || depth0.resourceName;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "resourceName", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "/";
-  foundHelper = helpers.nickname;
-  stack1 = foundHelper || depth0.nickname;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "nickname", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "_";
-  foundHelper = helpers.httpMethod;
-  stack1 = foundHelper || depth0.httpMethod;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "' class=\"toggleOperation\">";
-  foundHelper = helpers.pathJson;
-  stack1 = foundHelper || depth0.pathJson;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "pathJson", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</a>\n                  </span>\n                </h3>\n                <ul class='options'>\n                    <li>\n                        <a href='#!/";
-  foundHelper = helpers.resourceName;
-  stack1 = foundHelper || depth0.resourceName;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "resourceName", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "/";
-  foundHelper = helpers.nickname;
-  stack1 = foundHelper || depth0.nickname;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "nickname", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "_";
-  foundHelper = helpers.httpMethod;
-  stack1 = foundHelper || depth0.httpMethod;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "' class=\"toggleOperation\">";
-  foundHelper = helpers.summary;
-  stack1 = foundHelper || depth0.summary;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "summary", { hash: {} }); }
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "</a>\n                    </li>\n                </ul>\n            </div>\n            <div class='content' id='";
-  foundHelper = helpers.resourceName;
-  stack1 = foundHelper || depth0.resourceName;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "resourceName", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "_";
-  foundHelper = helpers.nickname;
-  stack1 = foundHelper || depth0.nickname;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "nickname", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "_";
-  foundHelper = helpers.httpMethod;
-  stack1 = foundHelper || depth0.httpMethod;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "httpMethod", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "_content' style='display:none'>\n                ";
-  foundHelper = helpers.notes;
-  stack1 = foundHelper || depth0.notes;
-  stack2 = helpers['if'];
-  tmp1 = self.program(1, program1, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.noop;
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n                <form accept-charset='UTF-8' action='#' class='sandbox' method='post'>\n                    <div style='margin:0;padding:0;display:inline'></div>\n                    <h4>Parameters</h4>\n                    <table class='fullwidth'>\n                        <thead>\n                        <tr>\n                            <th>Parameter</th>\n                            <th>Value</th>\n                            <th>Description</th>\n                        </tr>\n                        </thead>\n                        <tbody class=\"operation-params\">\n\n                        </tbody>\n                    </table>\n                    ";
-  foundHelper = helpers.isReadOnly;
-  stack1 = foundHelper || depth0.isReadOnly;
-  stack2 = helpers['if'];
-  tmp1 = self.program(3, program3, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.program(5, program5, data);
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n                </form>\n                <div class='response' style='display:none'>\n                    <h4>Request URL</h4>\n                    <div class='block request_url'></div>\n                    <h4>Response Body</h4>\n                    <div class='block response_body'></div>\n                    <h4>Response Code</h4>\n                    <div class='block response_code'></div>\n                    <h4>Response Headers</h4>\n                    <div class='block response_headers'></div>\n                </div>\n            </div>\n        </li>\n    </ul>\n";
-  return buffer;});
-})();
-
-(function() {
-  var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['param'] = template(function (Handlebars,depth0,helpers,partials,data) {
-  helpers = helpers || Handlebars.helpers;
-  var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
-
-function program1(depth0,data) {
-  
-  var buffer = "", stack1, stack2;
-  buffer += "\n		";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  stack2 = helpers['if'];
-  tmp1 = self.program(2, program2, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.program(4, program4, data);
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n		\n	";
-  return buffer;}
-function program2(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n			<textarea class='body-textarea' name='";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'>";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</textarea>\n		";
-  return buffer;}
-
-function program4(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n		    <textarea class='body-textarea' name='";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'></textarea>\n		";
-  return buffer;}
-
-function program6(depth0,data) {
-  
-  var buffer = "", stack1, stack2;
-  buffer += "\n		";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  stack2 = helpers['if'];
-  tmp1 = self.program(7, program7, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.program(9, program9, data);
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n	";
-  return buffer;}
-function program7(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n			<input minlength='0' name='";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "' placeholder='' type='text' value='";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'/>\n		";
-  return buffer;}
-
-function program9(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n		    <input minlength='0' name='";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "' placeholder='' type='text' value=''/>\n		";
-  return buffer;}
-
-  buffer += "<td class='code'>";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</td>\n<td>\n	\n	";
-  foundHelper = helpers.isBody;
-  stack1 = foundHelper || depth0.isBody;
-  stack2 = helpers['if'];
-  tmp1 = self.program(1, program1, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.program(6, program6, data);
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n\n</td>\n<td width='500'>";
-  foundHelper = helpers.description;
-  stack1 = foundHelper || depth0.description;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "</td>\n\n";
-  return buffer;});
-})();
-
-(function() {
-  var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['param_list'] = template(function (Handlebars,depth0,helpers,partials,data) {
-  helpers = helpers || Handlebars.helpers;
-  var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
-
-function program1(depth0,data) {
-  
-  
-  return "\n        ";}
-
-function program3(depth0,data) {
-  
-  var buffer = "", stack1, stack2;
-  buffer += "\n            ";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  stack2 = helpers['if'];
-  tmp1 = self.program(4, program4, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.program(6, program6, data);
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n        ";
-  return buffer;}
-function program4(depth0,data) {
-  
-  
-  return "\n            ";}
-
-function program6(depth0,data) {
-  
-  
-  return "\n                <option selected=\"\" value=''></option>\n            ";}
-
-function program8(depth0,data) {
-  
-  var buffer = "", stack1, stack2;
-  buffer += "\n            ";
-  foundHelper = helpers.isDefault;
-  stack1 = foundHelper || depth0.isDefault;
-  stack2 = helpers['if'];
-  tmp1 = self.program(9, program9, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.program(11, program11, data);
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n        ";
-  return buffer;}
-function program9(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n                <option value='";
-  foundHelper = helpers.value;
-  stack1 = foundHelper || depth0.value;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "value", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'>";
-  foundHelper = helpers.value;
-  stack1 = foundHelper || depth0.value;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "value", { hash: {} }); }
-  buffer += escapeExpression(stack1) + " (default)</option>\n            ";
-  return buffer;}
-
-function program11(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n                <option value='";
-  foundHelper = helpers.value;
-  stack1 = foundHelper || depth0.value;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "value", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'>";
-  foundHelper = helpers.value;
-  stack1 = foundHelper || depth0.value;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "value", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</option>\n            ";
-  return buffer;}
-
-  buffer += "<td class='code'>";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</td>\n<td>\n    <select name='";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'>\n        ";
-  foundHelper = helpers.required;
-  stack1 = foundHelper || depth0.required;
-  stack2 = helpers['if'];
-  tmp1 = self.program(1, program1, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.program(3, program3, data);
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n        ";
-  foundHelper = helpers.allowableValues;
-  stack1 = foundHelper || depth0.allowableValues;
-  stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.descriptiveValues);
-  stack2 = helpers.each;
-  tmp1 = self.program(8, program8, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.noop;
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n    </select>\n</td>\n<td width='500'>";
-  foundHelper = helpers.description;
-  stack1 = foundHelper || depth0.description;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "</td>\n\n";
-  return buffer;});
-})();
-
-(function() {
-  var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['param_readonly'] = template(function (Handlebars,depth0,helpers,partials,data) {
-  helpers = helpers || Handlebars.helpers;
-  var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
-
-function program1(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n        <textarea class='body-textarea' readonly='readonly' name='";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'>";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</textarea>\n    ";
-  return buffer;}
-
-function program3(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n        ";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "\n    ";
-  return buffer;}
-
-  buffer += "<td class='code'>";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</td>\n<td>\n    ";
-  foundHelper = helpers.isBody;
-  stack1 = foundHelper || depth0.isBody;
-  stack2 = helpers['if'];
-  tmp1 = self.program(1, program1, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.program(3, program3, data);
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n</td>\n<td width='500'>";
-  foundHelper = helpers.description;
-  stack1 = foundHelper || depth0.description;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "</td>\n\n";
-  return buffer;});
-})();
-
-(function() {
-  var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['param_readonly_required'] = template(function (Handlebars,depth0,helpers,partials,data) {
-  helpers = helpers || Handlebars.helpers;
-  var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
-
-function program1(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n        <textarea class='body-textarea'  readonly='readonly' placeholder='(required)' name='";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'>";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</textarea>\n    ";
-  return buffer;}
-
-function program3(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n        ";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "\n    ";
-  return buffer;}
-
-  buffer += "<td class='code required'>";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</td>\n<td>\n    ";
-  foundHelper = helpers.isBody;
-  stack1 = foundHelper || depth0.isBody;
-  stack2 = helpers['if'];
-  tmp1 = self.program(1, program1, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.program(3, program3, data);
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n</td>\n<td width='500'>";
-  foundHelper = helpers.description;
-  stack1 = foundHelper || depth0.description;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "</td>\n";
-  return buffer;});
-})();
-
-(function() {
-  var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['param_required'] = template(function (Handlebars,depth0,helpers,partials,data) {
-  helpers = helpers || Handlebars.helpers;
-  var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
-
-function program1(depth0,data) {
-  
-  var buffer = "", stack1, stack2;
-  buffer += "\n		";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  stack2 = helpers['if'];
-  tmp1 = self.program(2, program2, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.program(4, program4, data);
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n		\n	";
-  return buffer;}
-function program2(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n			<textarea class='body-textarea' placeholder='(required)' name='";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'>";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</textarea>\n		";
-  return buffer;}
-
-function program4(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n		    <textarea class='body-textarea' placeholder='(required)' name='";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'></textarea>\n		";
-  return buffer;}
-
-function program6(depth0,data) {
-  
-  var buffer = "", stack1, stack2;
-  buffer += "\n		";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  stack2 = helpers['if'];
-  tmp1 = self.program(7, program7, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.program(9, program9, data);
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n	";
-  return buffer;}
-function program7(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n		    <input class='required' minlength='1' name='";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "' placeholder='(required)' type='text' value='";
-  foundHelper = helpers.defaultValue;
-  stack1 = foundHelper || depth0.defaultValue;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "defaultValue", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'/>\n		";
-  return buffer;}
-
-function program9(depth0,data) {
-  
-  var buffer = "", stack1;
-  buffer += "\n		    <input class='required' minlength='1' name='";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "' placeholder='(required)' type='text' value=''/>\n		";
-  return buffer;}
-
-  buffer += "<td class='code required'>";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</td>\n<td>\n	";
-  foundHelper = helpers.isBody;
-  stack1 = foundHelper || depth0.isBody;
-  stack2 = helpers['if'];
-  tmp1 = self.program(1, program1, data);
-  tmp1.hash = {};
-  tmp1.fn = tmp1;
-  tmp1.inverse = self.program(6, program6, data);
-  stack1 = stack2.call(depth0, stack1, tmp1);
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "\n</td>\n<td width='500'>\n    <strong>";
-  foundHelper = helpers.description;
-  stack1 = foundHelper || depth0.description;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }
-  if(stack1 || stack1 === 0) { buffer += stack1; }
-  buffer += "</strong>\n</td>\n";
-  return buffer;});
-})();
-
-(function() {
-  var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
-templates['resource'] = template(function (Handlebars,depth0,helpers,partials,data) {
-  helpers = helpers || Handlebars.helpers;
-  var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;
-
-
-  buffer += "<div class='heading'>\n    <h2>\n        <a href='#!/";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "' onclick=\"Docs.toggleEndpointListForResource('";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "');\">/";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "</a>\n    </h2>\n    <ul class='options'>\n        <li>\n            <a href='#!/";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "' id='endpointListTogger_";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'\n               onclick=\"Docs.toggleEndpointListForResource('";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "');\">Show/Hide</a>\n        </li>\n        <li>\n            <a href='#' onclick=\"Docs.collapseOperationsForResource('";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'); return false;\">\n                List Operations\n            </a>\n        </li>\n        <li>\n            <a href='#' onclick=\"Docs.expandOperationsForResource('";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'); return false;\">\n                Expand Operations\n            </a>\n        </li>\n        <li>\n            <a href='";
-  foundHelper = helpers.url;
-  stack1 = foundHelper || depth0.url;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "url", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "'>Raw</a>\n        </li>\n    </ul>\n</div>\n<ul class='endpoints' id='";
-  foundHelper = helpers.name;
-  stack1 = foundHelper || depth0.name;
-  if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
-  else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "name", { hash: {} }); }
-  buffer += escapeExpression(stack1) + "_endpoint_list' style='display:none'>\n\n</ul>\n";
-  return buffer;});
-})();
-
-
-
-// Generated by CoffeeScript 1.3.3
-(function() {
-  var HeaderView, MainView, OperationView, ParameterView, ResourceView, SwaggerUi,
-    __hasProp = {}.hasOwnProperty,
-    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
-  SwaggerUi = (function(_super) {
-
-    __extends(SwaggerUi, _super);
-
-    function SwaggerUi() {
-      return SwaggerUi.__super__.constructor.apply(this, arguments);
-    }
-
-    SwaggerUi.prototype.routes = {
-      '': 'load'
-    };
-
-    SwaggerUi.prototype.dom_id = "swagger_ui";
-
-    SwaggerUi.prototype.options = null;
-
-    SwaggerUi.prototype.api = null;
-
-    SwaggerUi.prototype.headerView = null;
-
-    SwaggerUi.prototype.mainView = null;
-
-    SwaggerUi.prototype.initialize = function(options) {
-      var _this = this;
-      if (options == null) {
-        options = {};
-      }
-      if (options.dom_id != null) {
-        this.dom_id = options.dom_id;
-        delete options.dom_id;
-      }
-      if (!($('#' + this.dom_id) != null)) {
-        $('body').append('<div id="' + this.dom_id + '"></div>');
-      }
-      this.options = options;
-      this.options.success = function() {
-        return _this.render();
-      };
-      this.options.progress = function(d) {
-        return _this.showMessage(d);
-      };
-      this.options.failure = function(d) {
-        return _this.onLoadFailure(d);
-      };
-      this.headerView = new HeaderView({
-        el: $('#header')
-      });
-      return this.headerView.on('update-swagger-ui', function(data) {
-        return _this.updateSwaggerUi(data);
-      });
-    };
-
-    SwaggerUi.prototype.updateSwaggerUi = function(data) {
-      this.options.discoveryUrl = data.discoveryUrl;
-      this.options.apiKey = data.apiKey;
-      return this.load();
-    };
-
-    SwaggerUi.prototype.load = function() {
-      var _ref;
-      if ((_ref = this.mainView) != null) {
-        _ref.clear();
-      }
-      this.headerView.update(this.options.discoveryUrl, this.options.apiKey);
-      this.api = new SwaggerApi(this.options);
-      return Backbone.history.start({
-        pushState: true
-      });
-    };
-
-    SwaggerUi.prototype.render = function() {
-      var _this = this;
-      this.showMessage('Finished Loading Resource Information. Rendering Swagger UI...');
-      this.mainView = new MainView({
-        model: this.api,
-        el: $('#' + this.dom_id)
-      }).render();
-      this.showMessage();
-      return setTimeout(function() {
-        return Docs.shebang();
-      }, 400);
-    };
-
-    SwaggerUi.prototype.showMessage = function(data) {
-      if (data == null) {
-        data = '';
-      }
-      $('#message-bar').removeClass('message-fail');
-      $('#message-bar').addClass('message-success');
-      return $('#message-bar').html(data);
-    };
-
-    SwaggerUi.prototype.onLoadFailure = function(data) {
-      if (data == null) {
-        data = '';
-      }
-      $('#message-bar').removeClass('message-success');
-      $('#message-bar').addClass('message-fail');
-      return $('#message-bar').html(data);
-    };
-
-    return SwaggerUi;
-
-  })(Backbone.Router);
-
-  window.SwaggerUi = SwaggerUi;
-
-  HeaderView = (function(_super) {
-
-    __extends(HeaderView, _super);
-
-    function HeaderView() {
-      return HeaderView.__super__.constructor.apply(this, arguments);
-    }
-
-    HeaderView.prototype.events = {
-      'click #show-pet-store-icon': 'showPetStore',
-      'click #show-wordnik-dev-icon': 'showWordnikDev',
-      'click #explore': 'showCustom',
-      'keyup #input_baseUrl': 'showCustomOnKeyup',
-      'keyup #input_apiKey': 'showCustomOnKeyup'
-    };
-
-    HeaderView.prototype.initialize = function() {};
-
-    HeaderView.prototype.showPetStore = function(e) {
-      return this.trigger('update-swagger-ui', {
-        discoveryUrl: "http://petstore.swagger.wordnik.com/api/resources.json",
-        apiKey: "special-key"
-      });
-    };
-
-    HeaderView.prototype.showWordnikDev = function(e) {
-      return this.trigger('update-swagger-ui', {
-        discoveryUrl: "http://api.wordnik.com/v4/resources.json",
-        apiKey: ""
-      });
-    };
-
-    HeaderView.prototype.showCustomOnKeyup = function(e) {
-      if (e.keyCode === 13) {
-        return this.showCustom();
-      }
-    };
-
-    HeaderView.prototype.showCustom = function(e) {
-      if (e != null) {
-        e.preventDefault();
-      }
-      return this.trigger('update-swagger-ui', {
-        discoveryUrl: $('#input_baseUrl').val(),
-        apiKey: $('#input_apiKey').val()
-      });
-    };
-
-    HeaderView.prototype.update = function(url, apiKey, trigger) {
-      if (trigger == null) {
-        trigger = false;
-      }
-      $('#input_baseUrl').val(url);
-      $('#input_apiKey').val(apiKey);
-      if (trigger) {
-        return this.trigger('update-swagger-ui', {
-          discoveryUrl: url,
-          apiKey: apiKey
-        });
-      }
-    };
-
-    return HeaderView;
-
-  })(Backbone.View);
-
-  MainView = (function(_super) {
-
-    __extends(MainView, _super);
-
-    function MainView() {
-      return MainView.__super__.constructor.apply(this, arguments);
-    }
-
-    MainView.prototype.initialize = function() {};
-
-    MainView.prototype.render = function() {
-      var resource, _i, _len, _ref;
-      $(this.el).html(Handlebars.templates.main(this.model));
-      _ref = this.model.resourcesArray;
-      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-        resource = _ref[_i];
-        this.addResource(resource);
-      }
-      return this;
-    };
-
-    MainView.prototype.addResource = function(resource) {
-      var resourceView;
-      resourceView = new ResourceView({
-        model: resource,
-        tagName: 'li',
-        id: 'resource_' + resource.name,
-        className: 'resource'
-      });
-      return $('#resources').append(resourceView.render().el);
-    };
-
-    MainView.prototype.clear = function() {
-      return $(this.el).html('');
-    };
-
-    return MainView;
-
-  })(Backbone.View);
-
-  ResourceView = (function(_super) {
-
-    __extends(ResourceView, _super);
-
-    function ResourceView() {
-      return ResourceView.__super__.constructor.apply(this, arguments);
-    }
-
-    ResourceView.prototype.initialize = function() {};
-
-    ResourceView.prototype.render = function() {
-      var operation, _i, _len, _ref;
-      $(this.el).html(Handlebars.templates.resource(this.model));
-      _ref = this.model.operationsArray;
-      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-        operation = _ref[_i];
-        this.addOperation(operation);
-      }
-      return this;
-    };
-
-    ResourceView.prototype.addOperation = function(operation) {
-      var operationView;
-      operationView = new OperationView({
-        model: operation,
-        tagName: 'li',
-        className: 'endpoint'
-      });
-      return $('.endpoints', $(this.el)).append(operationView.render().el);
-    };
-
-    return ResourceView;
-
-  })(Backbone.View);
-
-  OperationView = (function(_super) {
-
-    __extends(OperationView, _super);
-
-    function OperationView() {
-      return OperationView.__super__.constructor.apply(this, arguments);
-    }
-
-    OperationView.prototype.events = {
-      'click .submit': 'submitOperation',
-      'click .response_hider': 'hideResponse',
-      'click .toggleOperation': 'toggleOperationContent'
-    };
-
-    OperationView.prototype.initialize = function() {};
-
-    OperationView.prototype.render = function() {
-      var isMethodSubmissionSupported, param, _i, _len, _ref;
-      isMethodSubmissionSupported = jQuery.inArray(this.model.httpMethod, this.model.supportedSubmitMethods()) >= 0;
-      if (!isMethodSubmissionSupported) {
-        this.model.isReadOnly = true;
-      }
-      $(this.el).html(Handlebars.templates.operation(this.model));
-      _ref = this.model.parameters;
-      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-        param = _ref[_i];
-        this.addParameter(param);
-      }
-      return this;
-    };
-
-    OperationView.prototype.addParameter = function(param) {
-      var paramView;
-      paramView = new ParameterView({
-        model: param,
-        tagName: 'tr',
-        readOnly: this.model.isReadOnly
-      });
-      return $('.operation-params', $(this.el)).append(paramView.render().el);
-    };
-
-    OperationView.prototype.submitOperation = function() {
-      var bodyParam, error_free, form, headerParams, invocationUrl, map, o, obj, param, _i, _j, _len, _len1, _ref, _ref1,
-        _this = this;
-      form = $('.sandbox', $(this.el));
-      error_free = true;
-      form.find("input.required").each(function() {
-        var _this = this;
-        $(this).removeClass("error");
-        if (jQuery.trim($(this).val()) === "") {
-          $(this).addClass("error");
-          $(this).wiggle({
-            callback: function() {
-              return $(_this).focus();
-            }
-          });
-          return error_free = false;
-        }
-      });
-      if (error_free) {
-        map = {};
-        _ref = form.serializeArray();
-        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
-          o = _ref[_i];
-          if ((o.value != null) && jQuery.trim(o.value).length > 0) {
-            map[o.name] = o.value;
-          }
-        }
-        bodyParam = null;
-        _ref1 = this.model.parameters;
-        for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
-          param = _ref1[_j];
-          if (param.paramType === 'body') {
-            bodyParam = map[param.name];
-          }
-        }
-        log("bodyParam = " + bodyParam);
-        headerParams = null;
-        invocationUrl = this.model.supportHeaderParams() ? (headerParams = this.model.getHeaderParams(map), this.model.urlify(map, false)) : this.model.urlify(map, true);
-        log('submitting ' + invocationUrl);
-        $(".request_url", $(this.el)).html("<pre>" + invocationUrl + "</pre>");
-        $(".response_throbber", $(this.el)).show();
-        obj = {
-          type: this.model.httpMethod,
-          url: invocationUrl,
-          headers: headerParams,
-          data: bodyParam,
-          dataType: 'json',
-          error: function(xhr, textStatus, error) {
-            return _this.showErrorStatus(xhr, textStatus, error);
-          },
-          success: function(data) {
-            return _this.showResponse(data);
-          },
-          complete: function(data) {
-            return _this.showCompleteStatus(data);
-          }
-        };
-        if (obj.type.toLowerCase() === "post" || obj.type.toLowerCase() === "put") {
-          obj.contentType = "application/json";
-        }
-        return jQuery.ajax(obj);
-      }
-    };
-
-    OperationView.prototype.hideResponse = function(e) {
-      if (e != null) {
-        e.preventDefault();
-      }
-      $(".response", $(this.el)).slideUp();
-      return $(".response_hider", $(this.el)).fadeOut();
-    };
-
-    OperationView.prototype.showResponse = function(response) {
-      var prettyJson;
-      prettyJson = JSON.stringify(response, null, "\t").replace(/\n/g, "<br>");
-      return $(".response_body", $(this.el)).html(prettyJson);
-    };
-
-    OperationView.prototype.showErrorStatus = function(data) {
-      return this.showStatus(data);
-    };
-
-    OperationView.prototype.showCompleteStatus = function(data) {
-      return this.showStatus(data);
-    };
-
-    OperationView.prototype.showStatus = function(data) {
-      var response_body;
-      try {
-        response_body = "<pre>" + JSON.stringify(JSON.parse(data.responseText), null, 2).replace(/\n/g, "<br>") + "</pre>";
-      } catch (error) {
-        response_body = "<span style='color:red'>&nbsp;&nbsp;&nbsp;[unable to parse as json; raw response below]</span><br><pre>" + data.responseText + "</pre>";
-      }
-      $(".response_code", $(this.el)).html("<pre>" + data.status + "</pre>");
-      $(".response_body", $(this.el)).html(response_body);
-      $(".response_headers", $(this.el)).html("<pre>" + data.getAllResponseHeaders() + "</pre>");
-      $(".response", $(this.el)).slideDown();
-      $(".response_hider", $(this.el)).show();
-      return $(".response_throbber", $(this.el)).hide();
-    };
-
-    OperationView.prototype.toggleOperationContent = function() {
-      var elem;
-      elem = $('#' + this.model.resourceName + "_" + this.model.nickname + "_" + this.model.httpMethod + "_content");
-      if (elem.is(':visible')) {
-        return Docs.collapseOperation(elem);
-      } else {
-        return Docs.expandOperation(elem);
-      }
-    };
-
-    return OperationView;
-
-  })(Backbone.View);
-
-  ParameterView = (function(_super) {
-
-    __extends(ParameterView, _super);
-
-    function ParameterView() {
-      return ParameterView.__super__.constructor.apply(this, arguments);
-    }
-
-    ParameterView.prototype.initialize = function() {};
-
-    ParameterView.prototype.render = function() {
-      var template;
-      if (this.model.paramType === 'body') {
-        this.model.isBody = true;
-      }
-      template = this.template();
-      $(this.el).html(template(this.model));
-      return this;
-    };
-
-    ParameterView.prototype.template = function() {
-      if (this.model.isList) {
-        return Handlebars.templates.param_list;
-      } else {
-        if (this.options.readOnly) {
-          if (this.model.required) {
-            return Handlebars.templates.param_readonly_required;
-          } else {
-            return Handlebars.templates.param_readonly;
-          }
-        } else {
-          if (this.model.required) {
-            return Handlebars.templates.param_required;
-          } else {
-            return Handlebars.templates.param;
-          }
-        }
-      }
-    };
-
-    return ParameterView;
-
-  })(Backbone.View);
-
-}).call(this);

File diff ditekan karena terlalu besar
+ 0 - 0
MediaBrowser.Networking/swagger-ui/swagger-ui.min.js


+ 19 - 17
MediaBrowser.Server.Implementations/Sqlite/SQLiteRepository.cs

@@ -143,20 +143,28 @@ namespace MediaBrowser.Server.Implementations.Sqlite
         {
             if (dispose)
             {
-                Logger.Info("Disposing " + GetType().Name);
-
                 try
                 {
-                    // If we're not already flushing, do it now
-                    if (!IsFlushing)
-                    {
-                        Flush(null);
-                    }
-
-                    // Don't dispose in the middle of a flush
-                    while (IsFlushing)
+                    if (connection != null)
                     {
-                        Thread.Sleep(50);
+                        // If we're not already flushing, do it now
+                        if (!IsFlushing)
+                        {
+                            Flush(null);
+                        }
+
+                        // Don't dispose in the middle of a flush
+                        while (IsFlushing)
+                        {
+                            Thread.Sleep(50);
+                        }
+                        
+                        if (connection.IsOpen())
+                        {
+                            connection.Close();
+                        }
+
+                        connection.Dispose();
                     }
 
                     if (FlushTimer != null)
@@ -165,12 +173,6 @@ namespace MediaBrowser.Server.Implementations.Sqlite
                         FlushTimer = null;
                     }
 
-                    if (connection.IsOpen())
-                    {
-                        connection.Close();
-                    }
-
-                    connection.Dispose();
                 }
                 catch (Exception ex)
                 {

+ 2 - 1
MediaBrowser.ServerApplication/ApplicationHost.cs

@@ -7,10 +7,10 @@ using MediaBrowser.Common.Implementations.Logging;
 using MediaBrowser.Common.Implementations.NetworkManagement;
 using MediaBrowser.Common.Implementations.ScheduledTasks;
 using MediaBrowser.Common.Implementations.Serialization;
-using MediaBrowser.Common.IO;
 using MediaBrowser.Common.Implementations.ServerManager;
 using MediaBrowser.Common.Implementations.Udp;
 using MediaBrowser.Common.Implementations.WebSocket;
+using MediaBrowser.Common.IO;
 using MediaBrowser.Common.Kernel;
 using MediaBrowser.Common.Net;
 using MediaBrowser.Common.ScheduledTasks;
@@ -72,6 +72,7 @@ namespace MediaBrowser.ServerApplication
         public ApplicationHost()
             : base()
         {
+            Logger.Info("ApplicationHost!!!!!!!!!!!!!!!!!!!!");
             Kernel = new Kernel(this, ServerApplicationPaths, _xmlSerializer, Logger);
             
             var networkManager = new NetworkManager();

+ 31 - 8
MediaBrowser.WebDashboard/Html/scripts/site.js

@@ -568,16 +568,16 @@ var Dashboard = {
         Dashboard.showLoadingMsg();
 
         var promise;
-                
+
         if (path === "Network") {
-                promise = ApiClient.getNetworkComputers();
-            }
+            promise = ApiClient.getNetworkComputers();
+        }
         else if (path) {
-                promise = ApiClient.getDirectoryContents(path, { includeDirectories: true });
-            } else {
+            promise = ApiClient.getDirectoryContents(path, { includeDirectories: true });
+        } else {
             promise = ApiClient.getDrives();
-                }
-        
+        }
+
         promise.done(function (folders) {
 
             $('#txtDirectoryPickerPath', page).val(path || "");
@@ -633,7 +633,30 @@ var Dashboard = {
     getPluginSecurityInfo: function () {
 
         if (!Dashboard.getPluginSecurityInfoPromise) {
-            Dashboard.getPluginSecurityInfoPromise = ApiClient.getPluginSecurityInfo();
+
+            var deferred = $.Deferred();
+
+            // Don't let this blow up the dashboard when it fails
+            $.ajax({
+                type: "GET",
+                url: ApiClient.getUrl("Plugins/SecurityInfo"),
+                dataType: 'json',
+
+                error: function () {
+                    // Don't show normal dashboard errors
+                }
+
+            }).done(function (result) {
+                deferred.resolveWith(null, [[result]]);
+            }).fail(function () {
+
+                console.log('Error getting plugin security info');
+
+                deferred.resolveWith(null, [[{ IsMBSupporter: false }]]);
+
+            });
+
+            Dashboard.getPluginSecurityInfoPromise = deferred;
         }
 
         return Dashboard.getPluginSecurityInfoPromise;

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini