removed codec enums

This commit is contained in:
Luke Pulverenti 2014-03-23 16:07:02 -04:00
parent 87aee1625d
commit 7438aa6dfa
17 changed files with 117 additions and 198 deletions

View File

@ -10,8 +10,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class GetCultures
/// </summary>
[Route("/Localization/Cultures", "GET")]
[Api(Description = "Gets known cultures")]
[Route("/Localization/Cultures", "GET", Summary = "Gets known cultures")]
public class GetCultures : IReturn<List<CultureDto>>
{
}
@ -19,8 +18,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class GetCountries
/// </summary>
[Route("/Localization/Countries", "GET")]
[Api(Description = "Gets known countries")]
[Route("/Localization/Countries", "GET", Summary = "Gets known countries")]
public class GetCountries : IReturn<List<CountryInfo>>
{
}
@ -28,8 +26,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class ParentalRatings
/// </summary>
[Route("/Localization/ParentalRatings", "GET")]
[Api(Description = "Gets known parental ratings")]
[Route("/Localization/ParentalRatings", "GET", Summary = "Gets known parental ratings")]
public class GetParentalRatings : IReturn<List<ParentalRating>>
{
}

View File

@ -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<QueryResult<NewsItem>>
{
/// <summary>
@ -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
});

View File

@ -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<NotificationResult>
{
[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<NotificationsSummary>
{
[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<Notification>
{
[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")]

View File

@ -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
{
/// <summary>
/// Class InstallPackage
/// </summary>
[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
{
/// <summary>
@ -57,8 +56,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class InstallPackage
/// </summary>
[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<List<PackageReviewInfo>>
{
/// <summary>
@ -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<List<PackageReviewInfo>>(result);

View File

@ -14,8 +14,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class GetPackage
/// </summary>
[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<PackageInfo>
{
/// <summary>
@ -36,8 +35,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class GetPackages
/// </summary>
[Route("/Packages", "GET")]
[Api(("Gets available packages"))]
[Route("/Packages", "GET", Summary = "Gets available packages")]
public class GetPackages : IReturn<List<PackageInfo>>
{
/// <summary>
@ -57,8 +55,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class GetPackageVersionUpdates
/// </summary>
[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<List<PackageVersionInfo>>
{
/// <summary>
@ -72,8 +69,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class InstallPackage
/// </summary>
[Route("/Packages/Installed/{Name}", "POST")]
[Api(("Installs a package"))]
[Route("/Packages/Installed/{Name}", "POST", Summary = "Installs a package")]
public class InstallPackage : IReturnVoid
{
/// <summary>
@ -108,8 +104,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class CancelPackageInstallation
/// </summary>
[Route("/Packages/Installing/{Id}", "DELETE")]
[Api(("Cancels a package installation"))]
[Route("/Packages/Installing/{Id}", "DELETE", Summary = "Cancels a package installation")]
public class CancelPackageInstallation : IReturnVoid
{
/// <summary>

View File

@ -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
/// </summary>
/// <param name="url">The URL.</param>
/// <returns>System.Nullable{AudioCodecs}.</returns>
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
/// </summary>
/// <param name="url">The URL.</param>
/// <returns>System.Nullable{VideoCodecs}.</returns>
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";
}
}
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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))
{
case AudioCodecs.Aac:
return ".aac";
case AudioCodecs.Mp3:
return ".mp3";
case AudioCodecs.Vorbis:
return ".ogg";
case AudioCodecs.Wma:
return ".wma";
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))
{
return ".wma";
}
}
}

View File

@ -26,7 +26,7 @@ namespace MediaBrowser.Api.Playback
/// </summary>
/// <value>The audio codec.</value>
[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; }
/// <summary>
/// Gets or sets the start time ticks.
@ -81,7 +81,7 @@ namespace MediaBrowser.Api.Playback
/// </summary>
/// <value>The video codec.</value>
[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; }
/// <summary>
/// Gets or sets the video bit rate.

View File

@ -18,8 +18,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class Plugins
/// </summary>
[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<List<PluginInfo>>
{
}
@ -27,8 +26,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class UninstallPlugin
/// </summary>
[Route("/Plugins/{Id}", "DELETE")]
[Api(("Uninstalls a plugin"))]
[Route("/Plugins/{Id}", "DELETE", Summary = "Uninstalls a plugin")]
public class UninstallPlugin : IReturnVoid
{
/// <summary>
@ -42,8 +40,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class GetPluginConfiguration
/// </summary>
[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
{
/// <summary>
@ -57,8 +54,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class UpdatePluginConfiguration
/// </summary>
[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
{
/// <summary>
@ -78,8 +74,7 @@ namespace MediaBrowser.Api
/// <summary>
/// Class GetPluginSecurityInfo
/// </summary>
[Route("/Plugins/SecurityInfo", "GET")]
[Api(("Gets plugin registration information"))]
[Route("/Plugins/SecurityInfo", "GET", Summary = "Gets plugin registration information")]
public class GetPluginSecurityInfo : IReturn<PluginSecurityInfo>
{
}
@ -87,14 +82,12 @@ namespace MediaBrowser.Api
/// <summary>
/// Class UpdatePluginSecurityInfo
/// </summary>
[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")]

View File

@ -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)

View File

@ -10,7 +10,7 @@
/// Omit to copy
/// </summary>
/// <value>The video codec.</value>
public VideoCodecs? VideoCodec { get; set; }
public string VideoCodec { get; set; }
/// <summary>
/// Gets or sets the video bit rate.
@ -113,7 +113,7 @@
/// Omit to copy the original stream
/// </summary>
/// <value>The audio encoding format.</value>
public AudioCodecs? AudioCodec { get; set; }
public string AudioCodec { get; set; }
/// <summary>
/// Gets or sets the item id.
@ -158,68 +158,4 @@
/// <value>The device id.</value>
public string DeviceId { get; set; }
}
/// <summary>
/// These are the codecs the api is capable of encoding to
/// </summary>
public enum AudioCodecs
{
/// <summary>
/// The aac
/// </summary>
Aac,
/// <summary>
/// The MP3
/// </summary>
Mp3,
/// <summary>
/// The vorbis
/// </summary>
Vorbis,
/// <summary>
/// The wma
/// </summary>
Wma,
/// <summary>
/// The copy
/// </summary>
Copy
}
/// <summary>
/// Enum VideoCodecs
/// </summary>
public enum VideoCodecs
{
H263,
/// <summary>
/// The H264
/// </summary>
H264,
/// <summary>
/// The mpeg4
/// </summary>
Mpeg4,
/// <summary>
/// The theora
/// </summary>
Theora,
/// <summary>
/// The VPX
/// </summary>
Vpx,
/// <summary>
/// The WMV
/// </summary>
Wmv,
/// <summary>
/// The copy
/// </summary>
Copy
}
}

View File

@ -88,7 +88,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
CreateRules(device);
}
catch (Exception ex)
catch (Exception)
{
//_logger.ErrorException("Error creating port forwarding rules", ex);
}

View File

@ -266,7 +266,7 @@ namespace MediaBrowser.ServerApplication
{
MigrateUserFolders();
}
catch (IOException ex)
catch (IOException)
{
}

View File

@ -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",

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.247" targetFramework="net45" />
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.248" targetFramework="net45" />
</packages>