aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-10 11:32:09 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-10 11:32:09 -0400
commit70da0b6ae96bffbc39efab14d95b2c14426753b7 (patch)
tree46a95dc16effb256e9969d17c0964b448bd21b95
parentc645b3ff648e793d90bfb40bb552aa636967b9b8 (diff)
resharper suggestions in api project
-rw-r--r--MediaBrowser.Api/ApiEntryPoint.cs42
-rw-r--r--MediaBrowser.Api/DisplayPreferencesService.cs6
-rw-r--r--MediaBrowser.Api/EnvironmentService.cs4
-rw-r--r--MediaBrowser.Api/Library/LibraryStructureService.cs7
-rw-r--r--MediaBrowser.Api/LocalizationService.cs6
-rw-r--r--MediaBrowser.Api/PackageService.cs4
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs10
-rw-r--r--MediaBrowser.Api/Playback/Hls/AudioHlsService.cs4
-rw-r--r--MediaBrowser.Api/Playback/Hls/BaseHlsService.cs2
-rw-r--r--MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs10
-rw-r--r--MediaBrowser.Api/PluginService.cs3
-rw-r--r--MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs10
-rw-r--r--MediaBrowser.Api/SystemService.cs10
-rw-r--r--MediaBrowser.Api/UserLibrary/PersonsService.cs2
-rw-r--r--MediaBrowser.Api/UserLibrary/StudiosService.cs2
-rw-r--r--MediaBrowser.Api/UserLibrary/YearsService.cs2
-rw-r--r--MediaBrowser.Api/UserService.cs14
-rw-r--r--MediaBrowser.Api/WebSocket/SystemInfoWebSocketListener.cs1
18 files changed, 66 insertions, 73 deletions
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs
index 9003c7263..90a6b368d 100644
--- a/MediaBrowser.Api/ApiEntryPoint.cs
+++ b/MediaBrowser.Api/ApiEntryPoint.cs
@@ -59,9 +59,9 @@ namespace MediaBrowser.Api
/// <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 jobCount = ActiveTranscodingJobs.Count;
+ var jobCount = _activeTranscodingJobs.Count;
- Parallel.ForEach(ActiveTranscodingJobs, OnTranscodeKillTimerStopped);
+ Parallel.ForEach(_activeTranscodingJobs, OnTranscodeKillTimerStopped);
// Try to allow for some time to kill the ffmpeg processes and delete the partial stream files
if (jobCount > 0)
@@ -73,7 +73,7 @@ namespace MediaBrowser.Api
/// <summary>
/// The active transcoding jobs
/// </summary>
- private readonly List<TranscodingJob> ActiveTranscodingJobs = new List<TranscodingJob>();
+ private readonly List<TranscodingJob> _activeTranscodingJobs = new List<TranscodingJob>();
/// <summary>
/// Called when [transcode beginning].
@@ -83,9 +83,9 @@ namespace MediaBrowser.Api
/// <param name="process">The process.</param>
public void OnTranscodeBeginning(string path, TranscodingJobType type, Process process)
{
- lock (ActiveTranscodingJobs)
+ lock (_activeTranscodingJobs)
{
- ActiveTranscodingJobs.Add(new TranscodingJob
+ _activeTranscodingJobs.Add(new TranscodingJob
{
Type = type,
Path = path,
@@ -105,11 +105,11 @@ namespace MediaBrowser.Api
/// <param name="type">The type.</param>
public void OnTranscodeFailedToStart(string path, TranscodingJobType type)
{
- lock (ActiveTranscodingJobs)
+ lock (_activeTranscodingJobs)
{
- var job = ActiveTranscodingJobs.First(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
+ var job = _activeTranscodingJobs.First(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
- ActiveTranscodingJobs.Remove(job);
+ _activeTranscodingJobs.Remove(job);
}
}
@@ -121,9 +121,9 @@ namespace MediaBrowser.Api
/// <returns><c>true</c> if [has active transcoding job] [the specified path]; otherwise, <c>false</c>.</returns>
public bool HasActiveTranscodingJob(string path, TranscodingJobType type)
{
- lock (ActiveTranscodingJobs)
+ lock (_activeTranscodingJobs)
{
- return ActiveTranscodingJobs.Any(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
+ return _activeTranscodingJobs.Any(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
}
}
@@ -134,9 +134,9 @@ namespace MediaBrowser.Api
/// <param name="type">The type.</param>
public void OnTranscodeBeginRequest(string path, TranscodingJobType type)
{
- lock (ActiveTranscodingJobs)
+ lock (_activeTranscodingJobs)
{
- var job = ActiveTranscodingJobs.FirstOrDefault(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
+ var job = _activeTranscodingJobs.FirstOrDefault(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
if (job == null)
{
@@ -160,9 +160,9 @@ namespace MediaBrowser.Api
/// <param name="type">The type.</param>
public void OnTranscodeEndRequest(string path, TranscodingJobType type)
{
- lock (ActiveTranscodingJobs)
+ lock (_activeTranscodingJobs)
{
- var job = ActiveTranscodingJobs.FirstOrDefault(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
+ var job = _activeTranscodingJobs.FirstOrDefault(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
if (job == null)
{
@@ -194,16 +194,16 @@ namespace MediaBrowser.Api
/// <param name="type">The type.</param>
public void OnTranscodingFinished(string path, TranscodingJobType type)
{
- lock (ActiveTranscodingJobs)
+ lock (_activeTranscodingJobs)
{
- var job = ActiveTranscodingJobs.FirstOrDefault(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
+ var job = _activeTranscodingJobs.FirstOrDefault(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
if (job == null)
{
return;
}
- ActiveTranscodingJobs.Remove(job);
+ _activeTranscodingJobs.Remove(job);
if (job.KillTimer != null)
{
@@ -221,9 +221,9 @@ namespace MediaBrowser.Api
{
var job = (TranscodingJob)state;
- lock (ActiveTranscodingJobs)
+ lock (_activeTranscodingJobs)
{
- ActiveTranscodingJobs.Remove(job);
+ _activeTranscodingJobs.Remove(job);
if (job.KillTimer != null)
{
@@ -306,10 +306,6 @@ namespace MediaBrowser.Api
/// <value>The active request count.</value>
public int ActiveRequestCount { get; set; }
/// <summary>
- /// <summary>
- /// Enum TranscodingJobType
- /// </summary>
- /// <summary>
/// Gets or sets the kill timer.
/// </summary>
/// <value>The kill timer.</value>
diff --git a/MediaBrowser.Api/DisplayPreferencesService.cs b/MediaBrowser.Api/DisplayPreferencesService.cs
index 8372ecd36..634e79de8 100644
--- a/MediaBrowser.Api/DisplayPreferencesService.cs
+++ b/MediaBrowser.Api/DisplayPreferencesService.cs
@@ -2,7 +2,6 @@
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Serialization;
using ServiceStack.ServiceHost;
-using ServiceStack.Text.Controller;
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -78,11 +77,6 @@ namespace MediaBrowser.Api
/// <param name="request">The request.</param>
public void Post(UpdateDisplayPreferences request)
{
- // We need to parse this manually because we told service stack not to with IRequiresRequestStream
- // https://code.google.com/p/servicestack/source/browse/trunk/Common/ServiceStack.Text/ServiceStack.Text/Controller/PathInfo.cs
- var pathInfo = PathInfo.Parse(RequestContext.PathInfo);
- var displayPreferencesId = new Guid(pathInfo.GetArgumentValue<string>(1));
-
// Serialize to json and then back so that the core doesn't see the request dto type
var displayPreferences = _jsonSerializer.DeserializeFromString<DisplayPreferences>(_jsonSerializer.SerializeToString(request));
diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.cs
index 47af5d43d..c382f5df4 100644
--- a/MediaBrowser.Api/EnvironmentService.cs
+++ b/MediaBrowser.Api/EnvironmentService.cs
@@ -51,7 +51,7 @@ namespace MediaBrowser.Api
/// Class GetDrives
/// </summary>
[Route("/Environment/Drives", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets available drives from the server's file system")]
+ [Api(Description = "Gets available drives from the server's file system")]
public class GetDrives : IReturn<List<FileSystemEntryInfo>>
{
}
@@ -60,7 +60,7 @@ namespace MediaBrowser.Api
/// Class GetNetworkComputers
/// </summary>
[Route("/Environment/NetworkDevices", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets a list of devices on the network")]
+ [Api(Description = "Gets a list of devices on the network")]
public class GetNetworkDevices : IReturn<List<FileSystemEntryInfo>>
{
}
diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs
index a913f8687..713002cab 100644
--- a/MediaBrowser.Api/Library/LibraryStructureService.cs
+++ b/MediaBrowser.Api/Library/LibraryStructureService.cs
@@ -144,13 +144,14 @@ namespace MediaBrowser.Api.Library
/// The _library manager
/// </summary>
private readonly ILibraryManager _libraryManager;
-
+
/// <summary>
- /// Initializes a new instance of the <see cref="LibraryService" /> class.
+ /// Initializes a new instance of the <see cref="LibraryStructureService"/> class.
/// </summary>
/// <param name="appPaths">The app paths.</param>
/// <param name="userManager">The user manager.</param>
- /// <exception cref="System.ArgumentNullException">appHost</exception>
+ /// <param name="libraryManager">The library manager.</param>
+ /// <exception cref="System.ArgumentNullException">appPaths</exception>
public LibraryStructureService(IServerApplicationPaths appPaths, IUserManager userManager, ILibraryManager libraryManager)
{
if (appPaths == null)
diff --git a/MediaBrowser.Api/LocalizationService.cs b/MediaBrowser.Api/LocalizationService.cs
index 54784fba8..aa01f3f13 100644
--- a/MediaBrowser.Api/LocalizationService.cs
+++ b/MediaBrowser.Api/LocalizationService.cs
@@ -13,7 +13,7 @@ namespace MediaBrowser.Api
/// Class GetCultures
/// </summary>
[Route("/Localization/Cultures", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets known cultures")]
+ [Api(Description = "Gets known cultures")]
public class GetCultures : IReturn<List<CultureDto>>
{
}
@@ -22,7 +22,7 @@ namespace MediaBrowser.Api
/// Class GetCountries
/// </summary>
[Route("/Localization/Countries", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets known countries")]
+ [Api(Description = "Gets known countries")]
public class GetCountries : IReturn<List<CountryInfo>>
{
}
@@ -31,7 +31,7 @@ namespace MediaBrowser.Api
/// Class ParentalRatings
/// </summary>
[Route("/Localization/ParentalRatings", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets known parental ratings")]
+ [Api(Description = "Gets known parental ratings")]
public class GetParentalRatings : IReturn<List<ParentalRating>>
{
}
diff --git a/MediaBrowser.Api/PackageService.cs b/MediaBrowser.Api/PackageService.cs
index e9e243ec8..88d2e9263 100644
--- a/MediaBrowser.Api/PackageService.cs
+++ b/MediaBrowser.Api/PackageService.cs
@@ -137,7 +137,7 @@ namespace MediaBrowser.Api
else if (request.PackageType == PackageType.System || request.PackageType == PackageType.All)
{
- var updateCheckResult = _appHost.CheckForApplicationUpdate(CancellationToken.None, new Progress<double> { }).Result;
+ var updateCheckResult = _appHost.CheckForApplicationUpdate(CancellationToken.None, new Progress<double>()).Result;
if (updateCheckResult.IsUpdateAvailable)
{
@@ -202,7 +202,7 @@ namespace MediaBrowser.Api
throw new ResourceNotFoundException(string.Format("Package not found: {0}", request.Name));
}
- Task.Run(() => _installationManager.InstallPackage(package, new Progress<double> { }, CancellationToken.None));
+ Task.Run(() => _installationManager.InstallPackage(package, new Progress<double>(), CancellationToken.None));
}
/// <summary>
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 60c2a7f50..3c6731e71 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -529,7 +529,7 @@ namespace MediaBrowser.Api.Playback
/// <param name="state">The state.</param>
/// <param name="outputPath">The output path.</param>
/// <returns>Task.</returns>
- protected async Task StartFFMpeg(StreamState state, string outputPath)
+ protected async Task StartFfMpeg(StreamState state, string outputPath)
{
var video = state.Item as Video;
@@ -569,7 +569,7 @@ namespace MediaBrowser.Api.Playback
// 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);
+ process.Exited += (sender, args) => OnFfMpegProcessExited(process, state);
try
{
@@ -604,7 +604,7 @@ namespace MediaBrowser.Api.Playback
/// </summary>
/// <param name="process">The process.</param>
/// <param name="state">The state.</param>
- protected void OnFFMpegProcessExited(Process process, StreamState state)
+ protected void OnFfMpegProcessExited(Process process, StreamState state)
{
if (state.IsoMount != null)
{
@@ -691,9 +691,9 @@ namespace MediaBrowser.Api.Playback
videoRequest.VideoCodec = InferVideoCodec(url);
}
- state.VideoStream = GetMediaStream(media.MediaStreams, videoRequest.VideoStreamIndex, MediaStreamType.Video, true);
+ state.VideoStream = GetMediaStream(media.MediaStreams, videoRequest.VideoStreamIndex, MediaStreamType.Video);
state.SubtitleStream = GetMediaStream(media.MediaStreams, videoRequest.SubtitleStreamIndex, MediaStreamType.Subtitle, false);
- state.AudioStream = GetMediaStream(media.MediaStreams, videoRequest.AudioStreamIndex, MediaStreamType.Audio, true);
+ state.AudioStream = GetMediaStream(media.MediaStreams, videoRequest.AudioStreamIndex, MediaStreamType.Audio);
}
else
{
diff --git a/MediaBrowser.Api/Playback/Hls/AudioHlsService.cs b/MediaBrowser.Api/Playback/Hls/AudioHlsService.cs
index b40b7849d..989d99765 100644
--- a/MediaBrowser.Api/Playback/Hls/AudioHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/AudioHlsService.cs
@@ -13,7 +13,7 @@ namespace MediaBrowser.Api.Playback.Hls
/// Class GetHlsAudioStream
/// </summary>
[Route("/Audio/{Id}/stream.m3u8", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets an audio stream using HTTP live streaming.")]
+ [Api(Description = "Gets an audio stream using HTTP live streaming.")]
public class GetHlsAudioStream : StreamRequest
{
@@ -21,7 +21,7 @@ namespace MediaBrowser.Api.Playback.Hls
[Route("/Audio/{Id}/segments/{SegmentId}/stream.mp3", "GET")]
[Route("/Audio/{Id}/segments/{SegmentId}/stream.aac", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets an Http live streaming segment file. Internal use only.")]
+ [Api(Description = "Gets an Http live streaming segment file. Internal use only.")]
public class GetHlsAudioSegment
{
public string Id { get; set; }
diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
index 08d4468eb..91552d7e5 100644
--- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
@@ -75,7 +75,7 @@ namespace MediaBrowser.Api.Playback.Hls
if (!File.Exists(playlist))
{
isPlaylistNewlyCreated = true;
- await StartFFMpeg(state, playlist).ConfigureAwait(false);
+ await StartFfMpeg(state, playlist).ConfigureAwait(false);
}
else
{
diff --git a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
index d900e750b..4396fac66 100644
--- a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
+++ b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
@@ -110,12 +110,12 @@ namespace MediaBrowser.Api.Playback.Progressive
var extension = GetOutputFileExtension(state);
// first bit means Time based seek supported, second byte range seek supported (not sure about the order now), so 01 = only byte seek, 10 = time based, 11 = both, 00 = none
- var org_op = isStaticallyStreamed ? ";DLNA.ORG_OP=01" : ";DLNA.ORG_OP=00";
+ var orgOp = isStaticallyStreamed ? ";DLNA.ORG_OP=01" : ";DLNA.ORG_OP=00";
// 0 = native, 1 = transcoded
- var org_ci = isStaticallyStreamed ? ";DLNA.ORG_CI=0" : ";DLNA.ORG_CI=1";
+ var orgCi = isStaticallyStreamed ? ";DLNA.ORG_CI=0" : ";DLNA.ORG_CI=1";
- var dlnaflags = ";DLNA.ORG_FLAGS=01500000000000000000000000000000";
+ const string dlnaflags = ";DLNA.ORG_FLAGS=01500000000000000000000000000000";
if (string.Equals(extension, ".mp3", StringComparison.OrdinalIgnoreCase))
{
@@ -158,7 +158,7 @@ namespace MediaBrowser.Api.Playback.Progressive
if (!string.IsNullOrEmpty(contentFeatures))
{
- responseHeaders["ContentFeatures.DLNA.ORG"] = (contentFeatures + org_op + org_ci + dlnaflags).Trim(';');
+ responseHeaders["ContentFeatures.DLNA.ORG"] = (contentFeatures + orgOp + orgCi + dlnaflags).Trim(';');
}
}
@@ -274,7 +274,7 @@ namespace MediaBrowser.Api.Playback.Progressive
if (!File.Exists(outputPath))
{
- await StartFFMpeg(state, outputPath).ConfigureAwait(false);
+ await StartFfMpeg(state, outputPath).ConfigureAwait(false);
}
else
{
diff --git a/MediaBrowser.Api/PluginService.cs b/MediaBrowser.Api/PluginService.cs
index f5e5944de..f3f0b3a8f 100644
--- a/MediaBrowser.Api/PluginService.cs
+++ b/MediaBrowser.Api/PluginService.cs
@@ -42,7 +42,7 @@ namespace MediaBrowser.Api
/// Class UninstallPlugin
/// </summary>
[Route("/Plugins/{Id}", "DELETE")]
- [ServiceStack.ServiceHost.Api(("Uninstalls a plugin"))]
+ [Api(("Uninstalls a plugin"))]
public class UninstallPlugin : IReturnVoid
{
/// <summary>
@@ -161,6 +161,7 @@ namespace MediaBrowser.Api
/// <param name="jsonSerializer">The json serializer.</param>
/// <param name="appHost">The app host.</param>
/// <param name="securityManager">The security manager.</param>
+ /// <param name="installationManager">The installation manager.</param>
/// <exception cref="System.ArgumentNullException">jsonSerializer</exception>
public PluginService(IJsonSerializer jsonSerializer, IApplicationHost appHost, ISecurityManager securityManager, IInstallationManager installationManager)
: base()
diff --git a/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs b/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs
index e31d4b454..2674529e5 100644
--- a/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs
+++ b/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs
@@ -13,7 +13,7 @@ namespace MediaBrowser.Api.ScheduledTasks
/// Class GetScheduledTask
/// </summary>
[Route("/ScheduledTasks/{Id}", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets a scheduled task, by Id")]
+ [Api(Description = "Gets a scheduled task, by Id")]
public class GetScheduledTask : IReturn<TaskInfo>
{
/// <summary>
@@ -28,7 +28,7 @@ namespace MediaBrowser.Api.ScheduledTasks
/// Class GetScheduledTasks
/// </summary>
[Route("/ScheduledTasks", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets scheduled tasks")]
+ [Api(Description = "Gets scheduled tasks")]
public class GetScheduledTasks : IReturn<List<TaskInfo>>
{
@@ -38,7 +38,7 @@ namespace MediaBrowser.Api.ScheduledTasks
/// Class StartScheduledTask
/// </summary>
[Route("/ScheduledTasks/Running/{Id}", "POST")]
- [ServiceStack.ServiceHost.Api(Description = "Starts a scheduled task")]
+ [Api(Description = "Starts a scheduled task")]
public class StartScheduledTask : IReturnVoid
{
/// <summary>
@@ -53,7 +53,7 @@ namespace MediaBrowser.Api.ScheduledTasks
/// Class StopScheduledTask
/// </summary>
[Route("/ScheduledTasks/Running/{Id}", "DELETE")]
- [ServiceStack.ServiceHost.Api(Description = "Stops a scheduled task")]
+ [Api(Description = "Stops a scheduled task")]
public class StopScheduledTask : IReturnVoid
{
/// <summary>
@@ -68,7 +68,7 @@ namespace MediaBrowser.Api.ScheduledTasks
/// Class UpdateScheduledTaskTriggers
/// </summary>
[Route("/ScheduledTasks/{Id}/Triggers", "POST")]
- [ServiceStack.ServiceHost.Api(Description = "Updates the triggers for a scheduled task")]
+ [Api(Description = "Updates the triggers for a scheduled task")]
public class UpdateScheduledTaskTriggers : List<TaskTriggerInfo>, IReturnVoid
{
/// <summary>
diff --git a/MediaBrowser.Api/SystemService.cs b/MediaBrowser.Api/SystemService.cs
index cddcd199c..69f99a963 100644
--- a/MediaBrowser.Api/SystemService.cs
+++ b/MediaBrowser.Api/SystemService.cs
@@ -15,7 +15,7 @@ namespace MediaBrowser.Api
/// Class GetSystemInfo
/// </summary>
[Route("/System/Info", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets information about the server")]
+ [Api(Description = "Gets information about the server")]
public class GetSystemInfo : IReturn<SystemInfo>
{
@@ -25,13 +25,13 @@ namespace MediaBrowser.Api
/// Class RestartApplication
/// </summary>
[Route("/System/Restart", "POST")]
- [ServiceStack.ServiceHost.Api(("Restarts the application, if needed"))]
+ [Api(("Restarts the application, if needed"))]
public class RestartApplication
{
}
[Route("/System/Shutdown", "POST")]
- [ServiceStack.ServiceHost.Api(("Shuts down the application"))]
+ [Api(("Shuts down the application"))]
public class ShutdownApplication
{
}
@@ -40,7 +40,7 @@ namespace MediaBrowser.Api
/// Class GetConfiguration
/// </summary>
[Route("/System/Configuration", "GET")]
- [ServiceStack.ServiceHost.Api(("Gets application configuration"))]
+ [Api(("Gets application configuration"))]
public class GetConfiguration : IReturn<ServerConfiguration>
{
@@ -50,7 +50,7 @@ namespace MediaBrowser.Api
/// Class UpdateConfiguration
/// </summary>
[Route("/System/Configuration", "POST")]
- [ServiceStack.ServiceHost.Api(("Updates application configuration"))]
+ [Api(("Updates application configuration"))]
public class UpdateConfiguration : ServerConfiguration, IReturnVoid
{
}
diff --git a/MediaBrowser.Api/UserLibrary/PersonsService.cs b/MediaBrowser.Api/UserLibrary/PersonsService.cs
index 7dcb24a54..822feee15 100644
--- a/MediaBrowser.Api/UserLibrary/PersonsService.cs
+++ b/MediaBrowser.Api/UserLibrary/PersonsService.cs
@@ -13,7 +13,7 @@ namespace MediaBrowser.Api.UserLibrary
/// </summary>
[Route("/Users/{UserId}/Items/{ParentId}/Persons", "GET")]
[Route("/Users/{UserId}/Items/Root/Persons", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets all persons from a given item, folder, or the entire library")]
+ [Api(Description = "Gets all persons from a given item, folder, or the entire library")]
public class GetPersons : GetItemsByName
{
/// <summary>
diff --git a/MediaBrowser.Api/UserLibrary/StudiosService.cs b/MediaBrowser.Api/UserLibrary/StudiosService.cs
index 3c3d1a504..884026670 100644
--- a/MediaBrowser.Api/UserLibrary/StudiosService.cs
+++ b/MediaBrowser.Api/UserLibrary/StudiosService.cs
@@ -13,7 +13,7 @@ namespace MediaBrowser.Api.UserLibrary
/// </summary>
[Route("/Users/{UserId}/Items/{ParentId}/Studios", "GET")]
[Route("/Users/{UserId}/Items/Root/Studios", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets all studios from a given item, folder, or the entire library")]
+ [Api(Description = "Gets all studios from a given item, folder, or the entire library")]
public class GetStudios : GetItemsByName
{
}
diff --git a/MediaBrowser.Api/UserLibrary/YearsService.cs b/MediaBrowser.Api/UserLibrary/YearsService.cs
index 99ea08cda..2b1b2e652 100644
--- a/MediaBrowser.Api/UserLibrary/YearsService.cs
+++ b/MediaBrowser.Api/UserLibrary/YearsService.cs
@@ -14,7 +14,7 @@ namespace MediaBrowser.Api.UserLibrary
/// </summary>
[Route("/Users/{UserId}/Items/{ParentId}/Years", "GET")]
[Route("/Users/{UserId}/Items/Root/Years", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets all years from a given item, folder, or the entire library")]
+ [Api(Description = "Gets all years from a given item, folder, or the entire library")]
public class GetYears : GetItemsByName
{
}
diff --git a/MediaBrowser.Api/UserService.cs b/MediaBrowser.Api/UserService.cs
index a27e3cc32..76c67cd2f 100644
--- a/MediaBrowser.Api/UserService.cs
+++ b/MediaBrowser.Api/UserService.cs
@@ -15,7 +15,7 @@ namespace MediaBrowser.Api
/// Class GetUsers
/// </summary>
[Route("/Users", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets a list of users")]
+ [Api(Description = "Gets a list of users")]
public class GetUsers : IReturn<List<UserDto>>
{
}
@@ -24,7 +24,7 @@ namespace MediaBrowser.Api
/// Class GetUser
/// </summary>
[Route("/Users/{Id}", "GET")]
- [ServiceStack.ServiceHost.Api(Description = "Gets a user by Id")]
+ [Api(Description = "Gets a user by Id")]
public class GetUser : IReturn<UserDto>
{
/// <summary>
@@ -39,7 +39,7 @@ namespace MediaBrowser.Api
/// Class DeleteUser
/// </summary>
[Route("/Users/{Id}", "DELETE")]
- [ServiceStack.ServiceHost.Api(Description = "Deletes a user")]
+ [Api(Description = "Deletes a user")]
public class DeleteUser : IReturnVoid
{
/// <summary>
@@ -54,7 +54,7 @@ namespace MediaBrowser.Api
/// Class AuthenticateUser
/// </summary>
[Route("/Users/{Id}/Authenticate", "POST")]
- [ServiceStack.ServiceHost.Api(Description = "Authenticates a user")]
+ [Api(Description = "Authenticates a user")]
public class AuthenticateUser : IReturnVoid
{
/// <summary>
@@ -76,7 +76,7 @@ namespace MediaBrowser.Api
/// Class UpdateUserPassword
/// </summary>
[Route("/Users/{Id}/Password", "POST")]
- [ServiceStack.ServiceHost.Api(Description = "Updates a user's password")]
+ [Api(Description = "Updates a user's password")]
public class UpdateUserPassword : IReturnVoid
{
/// <summary>
@@ -108,7 +108,7 @@ namespace MediaBrowser.Api
/// Class UpdateUser
/// </summary>
[Route("/Users/{Id}", "POST")]
- [ServiceStack.ServiceHost.Api(Description = "Updates a user")]
+ [Api(Description = "Updates a user")]
public class UpdateUser : UserDto, IReturnVoid
{
}
@@ -117,7 +117,7 @@ namespace MediaBrowser.Api
/// Class CreateUser
/// </summary>
[Route("/Users", "POST")]
- [ServiceStack.ServiceHost.Api(Description = "Creates a user")]
+ [Api(Description = "Creates a user")]
public class CreateUser : UserDto, IReturn<UserDto>
{
}
diff --git a/MediaBrowser.Api/WebSocket/SystemInfoWebSocketListener.cs b/MediaBrowser.Api/WebSocket/SystemInfoWebSocketListener.cs
index ae8f41c36..62e642c92 100644
--- a/MediaBrowser.Api/WebSocket/SystemInfoWebSocketListener.cs
+++ b/MediaBrowser.Api/WebSocket/SystemInfoWebSocketListener.cs
@@ -29,6 +29,7 @@ namespace MediaBrowser.Api.WebSocket
/// Initializes a new instance of the <see cref="SystemInfoWebSocketListener" /> class.
/// </summary>
/// <param name="logger">The logger.</param>
+ /// <param name="appHost">The app host.</param>
public SystemInfoWebSocketListener(ILogger logger, IServerApplicationHost appHost)
: base(logger)
{