diff --git a/MediaBrowser.Api/LocalizationService.cs b/MediaBrowser.Api/LocalizationService.cs
index b3f6cbd976..60270a3895 100644
--- a/MediaBrowser.Api/LocalizationService.cs
+++ b/MediaBrowser.Api/LocalizationService.cs
@@ -10,8 +10,7 @@ namespace MediaBrowser.Api
///
/// Class GetCultures
///
- [Route("/Localization/Cultures", "GET")]
- [Api(Description = "Gets known cultures")]
+ [Route("/Localization/Cultures", "GET", Summary = "Gets known cultures")]
public class GetCultures : IReturn>
{
}
@@ -19,8 +18,7 @@ namespace MediaBrowser.Api
///
/// Class GetCountries
///
- [Route("/Localization/Countries", "GET")]
- [Api(Description = "Gets known countries")]
+ [Route("/Localization/Countries", "GET", Summary = "Gets known countries")]
public class GetCountries : IReturn>
{
}
@@ -28,8 +26,7 @@ namespace MediaBrowser.Api
///
/// Class ParentalRatings
///
- [Route("/Localization/ParentalRatings", "GET")]
- [Api(Description = "Gets known parental ratings")]
+ [Route("/Localization/ParentalRatings", "GET", Summary = "Gets known parental ratings")]
public class GetParentalRatings : IReturn>
{
}
diff --git a/MediaBrowser.Api/NewsService.cs b/MediaBrowser.Api/NewsService.cs
index 99a4d4fa7e..6243bf25f4 100644
--- a/MediaBrowser.Api/NewsService.cs
+++ b/MediaBrowser.Api/NewsService.cs
@@ -5,8 +5,7 @@ using ServiceStack;
namespace MediaBrowser.Api
{
- [Route("/News/Product", "GET")]
- [Api(Description = "Gets the latest product news.")]
+ [Route("/News/Product", "GET", Summary = "Gets the latest product news.")]
public class GetProductNews : IReturn>
{
///
@@ -23,7 +22,7 @@ namespace MediaBrowser.Api
[ApiMember(Name = "Limit", Description = "Optional. The maximum number of records to return", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
public int? Limit { get; set; }
}
-
+
public class NewsService : BaseApiService
{
private readonly INewsService _newsService;
@@ -37,8 +36,8 @@ namespace MediaBrowser.Api
{
var result = _newsService.GetProductNews(new NewsQuery
{
- StartIndex = request.StartIndex,
- Limit = request.Limit
+ StartIndex = request.StartIndex,
+ Limit = request.Limit
});
diff --git a/MediaBrowser.Api/NotificationsService.cs b/MediaBrowser.Api/NotificationsService.cs
index 45a16347bc..a71a85395a 100644
--- a/MediaBrowser.Api/NotificationsService.cs
+++ b/MediaBrowser.Api/NotificationsService.cs
@@ -1,15 +1,14 @@
using MediaBrowser.Controller.Notifications;
using MediaBrowser.Model.Notifications;
+using ServiceStack;
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using ServiceStack;
namespace MediaBrowser.Api
{
- [Route("/Notifications/{UserId}", "GET")]
- [Api(Description = "Gets notifications")]
+ [Route("/Notifications/{UserId}", "GET", Summary = "Gets notifications")]
public class GetNotifications : IReturn
{
[ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
@@ -25,16 +24,14 @@ namespace MediaBrowser.Api
public int? Limit { get; set; }
}
- [Route("/Notifications/{UserId}/Summary", "GET")]
- [Api(Description = "Gets a notification summary for a user")]
+ [Route("/Notifications/{UserId}/Summary", "GET", Summary = "Gets a notification summary for a user")]
public class GetNotificationsSummary : IReturn
{
[ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
public Guid UserId { get; set; }
}
- [Route("/Notifications/{UserId}", "POST")]
- [Api(Description = "Adds a notifications")]
+ [Route("/Notifications/{UserId}", "POST", Summary = "Adds a notifications")]
public class AddUserNotification : IReturn
{
[ApiMember(Name = "Id", Description = "The Id of the new notification. If unspecified one will be provided.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
@@ -61,9 +58,8 @@ namespace MediaBrowser.Api
[ApiMember(Name = "Level", Description = "The notification level", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
public NotificationLevel Level { get; set; }
}
-
- [Route("/Notifications/{UserId}/Read", "POST")]
- [Api(Description = "Marks notifications as read")]
+
+ [Route("/Notifications/{UserId}/Read", "POST", Summary = "Marks notifications as read")]
public class MarkRead : IReturnVoid
{
[ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
@@ -73,8 +69,7 @@ namespace MediaBrowser.Api
public string Ids { get; set; }
}
- [Route("/Notifications/{UserId}/Unread", "POST")]
- [Api(Description = "Marks notifications as unread")]
+ [Route("/Notifications/{UserId}/Unread", "POST", Summary = "Marks notifications as unread")]
public class MarkUnread : IReturnVoid
{
[ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
diff --git a/MediaBrowser.Api/PackageReviewService.cs b/MediaBrowser.Api/PackageReviewService.cs
index b2de908d9f..94ff1b62e2 100644
--- a/MediaBrowser.Api/PackageReviewService.cs
+++ b/MediaBrowser.Api/PackageReviewService.cs
@@ -1,21 +1,20 @@
-using System.Collections.Generic;
-using System.Globalization;
-using System.Net;
-using System.Threading;
-using System.Threading.Tasks;
-using MediaBrowser.Common.Constants;
+using MediaBrowser.Common.Constants;
using MediaBrowser.Common.Net;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Serialization;
using ServiceStack;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
namespace MediaBrowser.Api
{
///
/// Class InstallPackage
///
- [Route("/PackageReviews/{Id}", "POST")]
- [Api(("Creates or updates a package review"))]
+ [Route("/Packages/Reviews/{Id}", "POST", Summary = "Creates or updates a package review")]
public class CreateReviewRequest : IReturnVoid
{
///
@@ -57,8 +56,7 @@ namespace MediaBrowser.Api
///
/// Class InstallPackage
///
- [Route("/PackageReviews/{Id}", "GET")]
- [Api(("Retrieve reviews for a package"))]
+ [Route("/Packages/{Id}/Reviews", "GET", Summary = "Gets reviews for a package")]
public class ReviewRequest : IReturn>
{
///
@@ -114,7 +112,7 @@ namespace MediaBrowser.Api
public object Get(ReviewRequest request)
{
var parms = "?id=" + request.Id;
-
+
if (request.MaxRating > 0)
{
parms += "&max=" + request.MaxRating;
@@ -132,7 +130,7 @@ namespace MediaBrowser.Api
parms += "&title=true";
}
- var result = _httpClient.Get(Constants.MbAdminUrl + "/service/packageReview/retrieve"+parms, CancellationToken.None).Result;
+ var result = _httpClient.Get(Constants.MbAdminUrl + "/service/packageReview/retrieve" + parms, CancellationToken.None).Result;
var reviews = _serializer.DeserializeFromStream>(result);
diff --git a/MediaBrowser.Api/PackageService.cs b/MediaBrowser.Api/PackageService.cs
index 793b666ea0..948a67f16f 100644
--- a/MediaBrowser.Api/PackageService.cs
+++ b/MediaBrowser.Api/PackageService.cs
@@ -14,8 +14,7 @@ namespace MediaBrowser.Api
///
/// Class GetPackage
///
- [Route("/Packages/{Name}", "GET")]
- [Api(("Gets a package, by name or assembly guid"))]
+ [Route("/Packages/{Name}", "GET", Summary = "Gets a package, by name or assembly guid")]
public class GetPackage : IReturn
{
///
@@ -36,8 +35,7 @@ namespace MediaBrowser.Api
///
/// Class GetPackages
///
- [Route("/Packages", "GET")]
- [Api(("Gets available packages"))]
+ [Route("/Packages", "GET", Summary = "Gets available packages")]
public class GetPackages : IReturn>
{
///
@@ -57,8 +55,7 @@ namespace MediaBrowser.Api
///
/// Class GetPackageVersionUpdates
///
- [Route("/Packages/Updates", "GET")]
- [Api(("Gets available package updates for currently installed packages"))]
+ [Route("/Packages/Updates", "GET", Summary = "Gets available package updates for currently installed packages")]
public class GetPackageVersionUpdates : IReturn>
{
///
@@ -72,8 +69,7 @@ namespace MediaBrowser.Api
///
/// Class InstallPackage
///
- [Route("/Packages/Installed/{Name}", "POST")]
- [Api(("Installs a package"))]
+ [Route("/Packages/Installed/{Name}", "POST", Summary = "Installs a package")]
public class InstallPackage : IReturnVoid
{
///
@@ -108,8 +104,7 @@ namespace MediaBrowser.Api
///
/// Class CancelPackageInstallation
///
- [Route("/Packages/Installing/{Id}", "DELETE")]
- [Api(("Cancels a package installation"))]
+ [Route("/Packages/Installing/{Id}", "DELETE", Summary = "Cancels a package installation")]
public class CancelPackageInstallation : IReturnVoid
{
///
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index e27fe1dda6..a6b3b72942 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -9,7 +9,6 @@ using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Drawing;
-using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Library;
@@ -735,13 +734,10 @@ namespace MediaBrowser.Api.Playback
{
if (audioStream != null)
{
- if (audioStream.Channels > 2 && request.AudioCodec.HasValue)
+ if (audioStream.Channels > 2 && string.Equals(request.AudioCodec, "wma", StringComparison.OrdinalIgnoreCase))
{
- if (request.AudioCodec.Value == AudioCodecs.Wma)
- {
- // wmav2 currently only supports two channel output
- return 2;
- }
+ // wmav2 currently only supports two channel output
+ return 2;
}
}
@@ -778,26 +774,26 @@ namespace MediaBrowser.Api.Playback
{
var codec = request.AudioCodec;
- if (codec.HasValue)
+ if (!string.IsNullOrEmpty(codec))
{
- if (codec == AudioCodecs.Aac)
+ if (string.Equals(codec, "aac", StringComparison.OrdinalIgnoreCase))
{
return "aac -strict experimental";
}
- if (codec == AudioCodecs.Mp3)
+ if (string.Equals(codec, "mp3", StringComparison.OrdinalIgnoreCase))
{
return "libmp3lame";
}
- if (codec == AudioCodecs.Vorbis)
+ if (string.Equals(codec, "vorbis", StringComparison.OrdinalIgnoreCase))
{
return "libvorbis";
}
- if (codec == AudioCodecs.Wma)
+ if (string.Equals(codec, "wma", StringComparison.OrdinalIgnoreCase))
{
return "wmav2";
}
- return codec.ToString().ToLower();
+ return codec.ToLower();
}
return "copy";
@@ -812,26 +808,26 @@ namespace MediaBrowser.Api.Playback
{
var codec = request.VideoCodec;
- if (codec.HasValue)
+ if (!string.IsNullOrEmpty(codec))
{
- if (codec == VideoCodecs.H264)
+ if (string.Equals(codec, "h264", StringComparison.OrdinalIgnoreCase))
{
return "libx264";
}
- if (codec == VideoCodecs.Vpx)
+ if (string.Equals(codec, "vpx", StringComparison.OrdinalIgnoreCase))
{
return "libvpx";
}
- if (codec == VideoCodecs.Wmv)
+ if (string.Equals(codec, "wmv", StringComparison.OrdinalIgnoreCase))
{
return "msmpeg4";
}
- if (codec == VideoCodecs.Theora)
+ if (string.Equals(codec, "theora", StringComparison.OrdinalIgnoreCase))
{
return "libtheora";
}
- return codec.ToString().ToLower();
+ return codec.ToLower();
}
return "copy";
@@ -1229,12 +1225,12 @@ namespace MediaBrowser.Api.Playback
{
if (videoRequest != null)
{
- videoRequest.VideoCodec = (VideoCodecs)Enum.Parse(typeof(VideoCodecs), val, true);
+ videoRequest.VideoCodec = val;
}
}
else if (i == 5)
{
- request.AudioCodec = (AudioCodecs)Enum.Parse(typeof(AudioCodecs), val, true);
+ request.AudioCodec = val;
}
else if (i == 6)
{
@@ -1311,7 +1307,7 @@ namespace MediaBrowser.Api.Playback
var url = Request.PathInfo;
- if (!request.AudioCodec.HasValue)
+ if (string.IsNullOrEmpty(request.AudioCodec))
{
request.AudioCodec = InferAudioCodec(url);
}
@@ -1439,7 +1435,7 @@ namespace MediaBrowser.Api.Playback
if (videoRequest != null)
{
- if (!videoRequest.VideoCodec.HasValue)
+ if (string.IsNullOrEmpty(videoRequest.VideoCodec))
{
videoRequest.VideoCodec = InferVideoCodec(url);
}
@@ -1546,41 +1542,41 @@ namespace MediaBrowser.Api.Playback
///
/// The URL.
/// System.Nullable{AudioCodecs}.
- private AudioCodecs? InferAudioCodec(string url)
+ private string InferAudioCodec(string url)
{
var ext = Path.GetExtension(url);
if (string.Equals(ext, ".mp3", StringComparison.OrdinalIgnoreCase))
{
- return AudioCodecs.Mp3;
+ return "mp3";
}
if (string.Equals(ext, ".aac", StringComparison.OrdinalIgnoreCase))
{
- return AudioCodecs.Aac;
+ return "aac";
}
if (string.Equals(ext, ".wma", StringComparison.OrdinalIgnoreCase))
{
- return AudioCodecs.Wma;
+ return "wma";
}
if (string.Equals(ext, ".ogg", StringComparison.OrdinalIgnoreCase))
{
- return AudioCodecs.Vorbis;
+ return "vorbis";
}
if (string.Equals(ext, ".oga", StringComparison.OrdinalIgnoreCase))
{
- return AudioCodecs.Vorbis;
+ return "vorbis";
}
if (string.Equals(ext, ".ogv", StringComparison.OrdinalIgnoreCase))
{
- return AudioCodecs.Vorbis;
+ return "vorbis";
}
if (string.Equals(ext, ".webm", StringComparison.OrdinalIgnoreCase))
{
- return AudioCodecs.Vorbis;
+ return "vorbis";
}
if (string.Equals(ext, ".webma", StringComparison.OrdinalIgnoreCase))
{
- return AudioCodecs.Vorbis;
+ return "vorbis";
}
return null;
@@ -1591,28 +1587,28 @@ namespace MediaBrowser.Api.Playback
///
/// The URL.
/// System.Nullable{VideoCodecs}.
- private VideoCodecs? InferVideoCodec(string url)
+ private string InferVideoCodec(string url)
{
var ext = Path.GetExtension(url);
if (string.Equals(ext, ".asf", StringComparison.OrdinalIgnoreCase))
{
- return VideoCodecs.Wmv;
+ return "wmv";
}
if (string.Equals(ext, ".webm", StringComparison.OrdinalIgnoreCase))
{
- return VideoCodecs.Vpx;
+ return "vpx";
}
if (string.Equals(ext, ".ogg", StringComparison.OrdinalIgnoreCase) || string.Equals(ext, ".ogv", StringComparison.OrdinalIgnoreCase))
{
- return VideoCodecs.Theora;
+ return "theora";
}
if (string.Equals(ext, ".m3u8", StringComparison.OrdinalIgnoreCase) || string.Equals(ext, ".ts", StringComparison.OrdinalIgnoreCase))
{
- return VideoCodecs.H264;
+ return "h264";
}
- return VideoCodecs.Copy;
+ return "copy";
}
}
}
diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
index aec271ff20..eb8f415e0d 100644
--- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
@@ -91,11 +91,11 @@ namespace MediaBrowser.Api.Playback.Hls
{
var state = GetState(request, CancellationToken.None).Result;
- if (!state.VideoRequest.VideoBitRate.HasValue && (!state.VideoRequest.VideoCodec.HasValue || state.VideoRequest.VideoCodec.Value != VideoCodecs.Copy))
+ if (!state.VideoRequest.VideoBitRate.HasValue && (string.IsNullOrEmpty(state.VideoRequest.VideoCodec) || !string.Equals(state.VideoRequest.VideoCodec, "copy", StringComparison.OrdinalIgnoreCase)))
{
throw new ArgumentException("A video bitrate is required");
}
- if (!state.Request.AudioBitRate.HasValue && (!state.Request.AudioCodec.HasValue || state.Request.AudioCodec.Value != AudioCodecs.Copy))
+ if (!state.Request.AudioBitRate.HasValue && (string.IsNullOrEmpty(state.Request.AudioCodec) || !string.Equals(state.Request.AudioCodec, "copy", StringComparison.OrdinalIgnoreCase)))
{
throw new ArgumentException("An audio bitrate is required");
}
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
index 121957ecc9..66e8b0d149 100644
--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
@@ -136,11 +136,11 @@ namespace MediaBrowser.Api.Playback.Hls
{
var state = await GetState(request, CancellationToken.None).ConfigureAwait(false);
- if (!state.VideoRequest.VideoBitRate.HasValue && (!state.VideoRequest.VideoCodec.HasValue || state.VideoRequest.VideoCodec.Value != VideoCodecs.Copy))
+ if (!state.VideoRequest.VideoBitRate.HasValue && (string.IsNullOrEmpty(state.VideoRequest.VideoCodec) || !string.Equals(state.VideoRequest.VideoCodec, "copy", StringComparison.OrdinalIgnoreCase)))
{
throw new ArgumentException("A video bitrate is required");
}
- if (!state.Request.AudioBitRate.HasValue && (!state.Request.AudioCodec.HasValue || state.Request.AudioCodec.Value != AudioCodecs.Copy))
+ if (!state.Request.AudioBitRate.HasValue && (string.IsNullOrEmpty(state.Request.AudioCodec) || !string.Equals(state.Request.AudioCodec, "copy", StringComparison.OrdinalIgnoreCase)))
{
throw new ArgumentException("An audio bitrate is required");
}
diff --git a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
index 8ae61b5219..9cb989fc21 100644
--- a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
+++ b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
@@ -50,39 +50,49 @@ namespace MediaBrowser.Api.Playback.Progressive
var videoRequest = state.Request as VideoStreamRequest;
// Try to infer based on the desired video codec
- if (videoRequest != null && videoRequest.VideoCodec.HasValue)
+ if (videoRequest != null && !string.IsNullOrEmpty(videoRequest.VideoCodec))
{
if (state.IsInputVideo)
{
- switch (videoRequest.VideoCodec.Value)
+ if (string.Equals(videoRequest.VideoCodec, "h264", StringComparison.OrdinalIgnoreCase))
{
- case VideoCodecs.H264:
- return ".ts";
- case VideoCodecs.Theora:
- return ".ogv";
- case VideoCodecs.Vpx:
- return ".webm";
- case VideoCodecs.Wmv:
- return ".asf";
+ return ".ts";
+ }
+ if (string.Equals(videoRequest.VideoCodec, "theora", StringComparison.OrdinalIgnoreCase))
+ {
+ return ".ogv";
+ }
+ if (string.Equals(videoRequest.VideoCodec, "vpx", StringComparison.OrdinalIgnoreCase))
+ {
+ return ".webm";
+ }
+ if (string.Equals(videoRequest.VideoCodec, "wmv", StringComparison.OrdinalIgnoreCase))
+ {
+ return ".asf";
}
}
}
// Try to infer based on the desired audio codec
- if (state.Request.AudioCodec.HasValue)
+ if (!string.IsNullOrEmpty(state.Request.AudioCodec))
{
if (!state.IsInputVideo)
{
- switch (state.Request.AudioCodec.Value)
+ if (string.Equals("aac", state.Request.AudioCodec, StringComparison.OrdinalIgnoreCase))
+ {
+ return ".aac";
+ }
+ if (string.Equals("mp3", state.Request.AudioCodec, StringComparison.OrdinalIgnoreCase))
+ {
+ return ".mp3";
+ }
+ if (string.Equals("vorbis", state.Request.AudioCodec, StringComparison.OrdinalIgnoreCase))
+ {
+ return ".ogg";
+ }
+ if (string.Equals("wma", state.Request.AudioCodec, StringComparison.OrdinalIgnoreCase))
{
- case AudioCodecs.Aac:
- return ".aac";
- case AudioCodecs.Mp3:
- return ".mp3";
- case AudioCodecs.Vorbis:
- return ".ogg";
- case AudioCodecs.Wma:
- return ".wma";
+ return ".wma";
}
}
}
diff --git a/MediaBrowser.Api/Playback/StreamRequest.cs b/MediaBrowser.Api/Playback/StreamRequest.cs
index 2251ce52d3..67948e19ab 100644
--- a/MediaBrowser.Api/Playback/StreamRequest.cs
+++ b/MediaBrowser.Api/Playback/StreamRequest.cs
@@ -26,7 +26,7 @@ namespace MediaBrowser.Api.Playback
///
/// The audio codec.
[ApiMember(Name = "AudioCodec", Description = "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
- public AudioCodecs? AudioCodec { get; set; }
+ public string AudioCodec { get; set; }
///
/// Gets or sets the start time ticks.
@@ -81,7 +81,7 @@ namespace MediaBrowser.Api.Playback
///
/// The video codec.
[ApiMember(Name = "VideoCodec", Description = "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h264, mpeg4, theora, vpx, wmv.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
- public VideoCodecs? VideoCodec { get; set; }
+ public string VideoCodec { get; set; }
///
/// Gets or sets the video bit rate.
diff --git a/MediaBrowser.Api/PluginService.cs b/MediaBrowser.Api/PluginService.cs
index e66f432df8..31463dc3f4 100644
--- a/MediaBrowser.Api/PluginService.cs
+++ b/MediaBrowser.Api/PluginService.cs
@@ -18,8 +18,7 @@ namespace MediaBrowser.Api
///
/// Class Plugins
///
- [Route("/Plugins", "GET")]
- [Api(("Gets a list of currently installed plugins"))]
+ [Route("/Plugins", "GET", Summary = "Gets a list of currently installed plugins")]
public class GetPlugins : IReturn>
{
}
@@ -27,8 +26,7 @@ namespace MediaBrowser.Api
///
/// Class UninstallPlugin
///
- [Route("/Plugins/{Id}", "DELETE")]
- [Api(("Uninstalls a plugin"))]
+ [Route("/Plugins/{Id}", "DELETE", Summary = "Uninstalls a plugin")]
public class UninstallPlugin : IReturnVoid
{
///
@@ -42,8 +40,7 @@ namespace MediaBrowser.Api
///
/// Class GetPluginConfiguration
///
- [Route("/Plugins/{Id}/Configuration", "GET")]
- [Api(("Gets a plugin's configuration"))]
+ [Route("/Plugins/{Id}/Configuration", "GET", Summary = "Gets a plugin's configuration")]
public class GetPluginConfiguration
{
///
@@ -57,8 +54,7 @@ namespace MediaBrowser.Api
///
/// Class UpdatePluginConfiguration
///
- [Route("/Plugins/{Id}/Configuration", "POST")]
- [Api(("Updates a plugin's configuration"))]
+ [Route("/Plugins/{Id}/Configuration", "POST", Summary = "Updates a plugin's configuration")]
public class UpdatePluginConfiguration : IRequiresRequestStream, IReturnVoid
{
///
@@ -78,8 +74,7 @@ namespace MediaBrowser.Api
///
/// Class GetPluginSecurityInfo
///
- [Route("/Plugins/SecurityInfo", "GET")]
- [Api(("Gets plugin registration information"))]
+ [Route("/Plugins/SecurityInfo", "GET", Summary = "Gets plugin registration information")]
public class GetPluginSecurityInfo : IReturn
{
}
@@ -87,14 +82,12 @@ namespace MediaBrowser.Api
///
/// Class UpdatePluginSecurityInfo
///
- [Route("/Plugins/SecurityInfo", "POST")]
- [Api("Updates plugin registration information")]
+ [Route("/Plugins/SecurityInfo", "POST", Summary = "Updates plugin registration information")]
public class UpdatePluginSecurityInfo : PluginSecurityInfo, IReturnVoid
{
}
- [Route("/Plugins/RegistrationRecords/{Name}", "GET")]
- [Api("Gets registration status for a feature")]
+ [Route("/Plugins/RegistrationRecords/{Name}", "GET", Summary = "Gets registration status for a feature")]
public class GetRegistrationStatus
{
[ApiMember(Name = "Name", Description = "Feature Name", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
diff --git a/MediaBrowser.Dlna/PlayTo/PlayToManager.cs b/MediaBrowser.Dlna/PlayTo/PlayToManager.cs
index 6279fb1cb6..d7460c352e 100644
--- a/MediaBrowser.Dlna/PlayTo/PlayToManager.cs
+++ b/MediaBrowser.Dlna/PlayTo/PlayToManager.cs
@@ -135,7 +135,7 @@ namespace MediaBrowser.Dlna.PlayTo
_logger.Info("SSDP listener - Task completed");
}
- catch (OperationCanceledException c)
+ catch (OperationCanceledException)
{
}
catch (Exception e)
@@ -154,7 +154,7 @@ namespace MediaBrowser.Dlna.PlayTo
{
await CreateController(uri).ConfigureAwait(false);
}
- catch (OperationCanceledException c)
+ catch (OperationCanceledException)
{
}
catch (Exception ex)
@@ -179,7 +179,7 @@ namespace MediaBrowser.Dlna.PlayTo
await Task.Delay(10000).ConfigureAwait(false);
}
}
- catch (OperationCanceledException c)
+ catch (OperationCanceledException)
{
}
catch (Exception ex)
diff --git a/MediaBrowser.Model/Dto/StreamOptions.cs b/MediaBrowser.Model/Dto/StreamOptions.cs
index 17fd06cb6a..c38707e536 100644
--- a/MediaBrowser.Model/Dto/StreamOptions.cs
+++ b/MediaBrowser.Model/Dto/StreamOptions.cs
@@ -10,7 +10,7 @@
/// Omit to copy
///
/// The video codec.
- public VideoCodecs? VideoCodec { get; set; }
+ public string VideoCodec { get; set; }
///
/// Gets or sets the video bit rate.
@@ -113,7 +113,7 @@
/// Omit to copy the original stream
///
/// The audio encoding format.
- public AudioCodecs? AudioCodec { get; set; }
+ public string AudioCodec { get; set; }
///
/// Gets or sets the item id.
@@ -158,68 +158,4 @@
/// The device id.
public string DeviceId { get; set; }
}
-
- ///
- /// These are the codecs the api is capable of encoding to
- ///
- public enum AudioCodecs
- {
- ///
- /// The aac
- ///
- Aac,
- ///
- /// The MP3
- ///
- Mp3,
- ///
- /// The vorbis
- ///
- Vorbis,
- ///
- /// The wma
- ///
- Wma,
- ///
- /// The copy
- ///
- Copy
- }
-
- ///
- /// Enum VideoCodecs
- ///
- public enum VideoCodecs
- {
- H263,
-
- ///
- /// The H264
- ///
- H264,
-
- ///
- /// The mpeg4
- ///
- Mpeg4,
-
- ///
- /// The theora
- ///
- Theora,
-
- ///
- /// The VPX
- ///
- Vpx,
-
- ///
- /// The WMV
- ///
- Wmv,
- ///
- /// The copy
- ///
- Copy
- }
}
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
index ad2852a914..098d1295f1 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
@@ -88,7 +88,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
CreateRules(device);
}
- catch (Exception ex)
+ catch (Exception)
{
//_logger.ErrorException("Error creating port forwarding rules", ex);
}
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs
index dec1a10310..e49244edf0 100644
--- a/MediaBrowser.ServerApplication/ApplicationHost.cs
+++ b/MediaBrowser.ServerApplication/ApplicationHost.cs
@@ -266,7 +266,7 @@ namespace MediaBrowser.ServerApplication
{
MigrateUserFolders();
}
- catch (IOException ex)
+ catch (IOException)
{
}
diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js
index 765cae6128..ea1905bad5 100644
--- a/MediaBrowser.WebDashboard/ApiClient.js
+++ b/MediaBrowser.WebDashboard/ApiClient.js
@@ -3809,7 +3809,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
var deferred = $.Deferred();
var msg = [itemId, canSeek, queueableMediaTypes];
-
+
if (mediaSourceId) {
msg.push(mediaSourceId);
}
@@ -4029,7 +4029,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
self.createPackageReview = function (review) {
- var url = self.getUrl("PackageReviews/" + review.id, review);
+ var url = self.getUrl("Packages/Reviews/" + review.id, review);
return self.ajax({
type: "POST",
@@ -4058,7 +4058,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
options.ForceTitle = true;
}
- var url = self.getUrl("PackageReviews/" + packageId, options);
+ var url = self.getUrl("Packages/" + packageId + "Reviews", options);
return self.ajax({
type: "GET",
diff --git a/MediaBrowser.WebDashboard/packages.config b/MediaBrowser.WebDashboard/packages.config
index 7396527bb3..a5074d3c88 100644
--- a/MediaBrowser.WebDashboard/packages.config
+++ b/MediaBrowser.WebDashboard/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file