Browse Source

add language to startup wizard

Luke Pulverenti 11 years ago
parent
commit
bfe76e2077

+ 1 - 42
MediaBrowser.Api/NotificationsService.cs

@@ -43,7 +43,7 @@ namespace MediaBrowser.Api
     {
     }
 
-    [Route("/Notifications", "POST", Summary = "Sends a notification to all admin users")]
+    [Route("/Notifications/Admin", "POST", Summary = "Sends a notification to all admin users")]
     public class AddAdminNotification : IReturnVoid
     {
         [ApiMember(Name = "Name", Description = "The notification's name", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
@@ -61,25 +61,6 @@ 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}", "POST", Summary = "Sends a notification to a user")]
-    public class AddUserNotification : IReturnVoid
-    {
-        [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
-        public string UserId { get; set; }
-
-        [ApiMember(Name = "Name", Description = "The notification's name", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
-        public string Name { get; set; }
-
-        [ApiMember(Name = "Description", Description = "The notification's description", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
-        public string Description { get; set; }
-
-        [ApiMember(Name = "Url", Description = "The notification's info url", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
-        public string Url { get; set; }
-
-        [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", Summary = "Marks notifications as read")]
     public class MarkRead : IReturnVoid
@@ -114,13 +95,6 @@ namespace MediaBrowser.Api
             _userManager = userManager;
         }
 
-        public void Post(AddUserNotification request)
-        {
-            var task = AddNotification(request);
-
-            Task.WaitAll(task);
-        }
-
         public object Get(GetNotificationTypes request)
         {
             var result = _notificationManager.GetNotificationTypes().ToList();
@@ -142,21 +116,6 @@ namespace MediaBrowser.Api
             return ToOptimizedResult(result);
         }
 
-        private async Task AddNotification(AddUserNotification request)
-        {
-            var notification = new NotificationRequest
-            {
-                Date = DateTime.UtcNow,
-                Description = request.Description,
-                Level = request.Level,
-                Name = request.Name,
-                Url = request.Url,
-                UserIds = new List<string> { request.UserId }
-            };
-
-            await _notificationManager.SendNotification(notification, CancellationToken.None).ConfigureAwait(false);
-        }
-
         public void Post(AddAdminNotification request)
         {
             // This endpoint really just exists as post of a real with sickbeard

+ 0 - 7
MediaBrowser.Model/ApiClient/IApiClient.cs

@@ -140,13 +140,6 @@ namespace MediaBrowser.Model.ApiClient
         /// <returns>Task.</returns>
         Task MarkNotificationsRead(string userId, IEnumerable<Guid> notificationIdList, bool isRead);
 
-        /// <summary>
-        /// Adds the notification.
-        /// </summary>
-        /// <param name="notification">The notification.</param>
-        /// <returns>Task{Notification}.</returns>
-        Task SendNotification(NotificationRequest notification);
-
         /// <summary>
         /// Gets the notifications summary.
         /// </summary>

+ 1 - 1
MediaBrowser.Server.Implementations/Localization/Server/server.json

@@ -16,7 +16,7 @@
 	"LabelYoureDone": "You're Done!",
 	"WelcomeToMediaBrowser": "Welcome to Media Browser!",
 	"TitleMediaBrowser": "Media Browser",
-	"ThisWizardWillGuideYou": "This wizard will help guide you through the setup process.",
+	"ThisWizardWillGuideYou": "This wizard will help guide you through the setup process. To begin, please select your preferred language.",
 	"TellUsAboutYourself": "Tell us about yourself",
 	"LabelYourFirstName": "Your first name:",
 	"MoreUsersCanBeAddedLater": "More users can be added later within the Dashboard.",

+ 2 - 2
Nuget/MediaBrowser.Common.Internal.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
     <metadata>
         <id>MediaBrowser.Common.Internal</id>
-        <version>3.0.354</version>
+        <version>3.0.355</version>
         <title>MediaBrowser.Common.Internal</title>
         <authors>Luke</authors>
         <owners>ebr,Luke,scottisafool</owners>
@@ -12,7 +12,7 @@
         <description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
         <copyright>Copyright © Media Browser 2013</copyright>
         <dependencies>
-            <dependency id="MediaBrowser.Common" version="3.0.354" />
+            <dependency id="MediaBrowser.Common" version="3.0.355" />
             <dependency id="NLog" version="2.1.0" />
             <dependency id="SimpleInjector" version="2.4.1" />
             <dependency id="sharpcompress" version="0.10.2" />

+ 1 - 1
Nuget/MediaBrowser.Common.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
     <metadata>
         <id>MediaBrowser.Common</id>
-        <version>3.0.354</version>
+        <version>3.0.355</version>
         <title>MediaBrowser.Common</title>
         <authors>Media Browser Team</authors>
         <owners>ebr,Luke,scottisafool</owners>

+ 2 - 2
Nuget/MediaBrowser.Server.Core.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
     <metadata>
         <id>MediaBrowser.Server.Core</id>
-        <version>3.0.354</version>
+        <version>3.0.355</version>
         <title>Media Browser.Server.Core</title>
         <authors>Media Browser Team</authors>
         <owners>ebr,Luke,scottisafool</owners>
@@ -12,7 +12,7 @@
         <description>Contains core components required to build plugins for Media Browser Server.</description>
         <copyright>Copyright © Media Browser 2013</copyright>
         <dependencies>
-            <dependency id="MediaBrowser.Common" version="3.0.354" />
+            <dependency id="MediaBrowser.Common" version="3.0.355" />
         </dependencies>
     </metadata>
     <files>