diff options
| author | Techywarrior <techywarrior@gmail.com> | 2013-04-13 11:11:19 -0700 |
|---|---|---|
| committer | Techywarrior <techywarrior@gmail.com> | 2013-04-13 11:11:19 -0700 |
| commit | 6b47336da308c77e441b82c6a985db88c6d3ade3 (patch) | |
| tree | 455a36e52c4ca35e3b38060f96904fa4be5ee854 /MediaBrowser.Api/UserLibrary/StudiosService.cs | |
| parent | dc8d9810b7a99bdcbc4959a77750b3cfee1e88b5 (diff) | |
| parent | 157a53a9f6d88c7f9db2346e42e010fe98734204 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/StudiosService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/StudiosService.cs | 65 |
1 files changed, 3 insertions, 62 deletions
diff --git a/MediaBrowser.Api/UserLibrary/StudiosService.cs b/MediaBrowser.Api/UserLibrary/StudiosService.cs index 24f09c5ef..77f20d8e8 100644 --- a/MediaBrowser.Api/UserLibrary/StudiosService.cs +++ b/MediaBrowser.Api/UserLibrary/StudiosService.cs @@ -1,5 +1,6 @@ using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Persistence; using ServiceStack.ServiceHost; using System; using System.Collections.Generic; @@ -17,52 +18,14 @@ namespace MediaBrowser.Api.UserLibrary public class GetStudios : GetItemsByName { } - - [Route("/Users/{UserId}/FavoriteStudios/{Name}", "POST")] - [Api(Description = "Marks a studio as a favorite")] - public class MarkFavoriteStudio : IReturnVoid - { - /// <summary> - /// Gets or sets the user id. - /// </summary> - /// <value>The user id.</value> - [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")] - public Guid UserId { get; set; } - - /// <summary> - /// Gets or sets the name. - /// </summary> - /// <value>The name.</value> - [ApiMember(Name = "Name", Description = "Name", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")] - public string Name { get; set; } - } - - [Route("/Users/{UserId}/FavoriteStudios/{Name}", "DELETE")] - [Api(Description = "Unmarks a studio as a favorite")] - public class UnmarkFavoriteStudio : IReturnVoid - { - /// <summary> - /// Gets or sets the user id. - /// </summary> - /// <value>The user id.</value> - [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")] - public Guid UserId { get; set; } - - /// <summary> - /// Gets or sets the name. - /// </summary> - /// <value>The name.</value> - [ApiMember(Name = "Name", Description = "Name", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")] - public string Name { get; set; } - } /// <summary> /// Class StudiosService /// </summary> public class StudiosService : BaseItemsByNameService<Studio> { - public StudiosService(IUserManager userManager, ILibraryManager libraryManager) - : base(userManager, libraryManager) + public StudiosService(IUserManager userManager, ILibraryManager libraryManager, IUserDataRepository userDataRepository) + : base(userManager, libraryManager, userDataRepository) { } @@ -77,28 +40,6 @@ namespace MediaBrowser.Api.UserLibrary return ToOptimizedResult(result); } - - /// <summary> - /// Posts the specified request. - /// </summary> - /// <param name="request">The request.</param> - public void Post(MarkFavoriteStudio request) - { - var task = MarkFavorite(() => LibraryManager.GetStudio(request.Name), request.UserId, true); - - Task.WaitAll(task); - } - - /// <summary> - /// Deletes the specified request. - /// </summary> - /// <param name="request">The request.</param> - public void Delete(UnmarkFavoriteStudio request) - { - var task = MarkFavorite(() => LibraryManager.GetStudio(request.Name), request.UserId, false); - - Task.WaitAll(task); - } /// <summary> /// Gets all items. |
