mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
add language to startup wizard
This commit is contained in:
parent
fadda8ef56
commit
bfe76e2077
@ -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
|
public class AddAdminNotification : IReturnVoid
|
||||||
{
|
{
|
||||||
[ApiMember(Name = "Name", Description = "The notification's name", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
|
[ApiMember(Name = "Name", Description = "The notification's name", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
|
||||||
@ -62,25 +62,6 @@ namespace MediaBrowser.Api
|
|||||||
public NotificationLevel Level { get; set; }
|
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")]
|
[Route("/Notifications/{UserId}/Read", "POST", Summary = "Marks notifications as read")]
|
||||||
public class MarkRead : IReturnVoid
|
public class MarkRead : IReturnVoid
|
||||||
{
|
{
|
||||||
@ -114,13 +95,6 @@ namespace MediaBrowser.Api
|
|||||||
_userManager = userManager;
|
_userManager = userManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Post(AddUserNotification request)
|
|
||||||
{
|
|
||||||
var task = AddNotification(request);
|
|
||||||
|
|
||||||
Task.WaitAll(task);
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Get(GetNotificationTypes request)
|
public object Get(GetNotificationTypes request)
|
||||||
{
|
{
|
||||||
var result = _notificationManager.GetNotificationTypes().ToList();
|
var result = _notificationManager.GetNotificationTypes().ToList();
|
||||||
@ -142,21 +116,6 @@ namespace MediaBrowser.Api
|
|||||||
return ToOptimizedResult(result);
|
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)
|
public void Post(AddAdminNotification request)
|
||||||
{
|
{
|
||||||
// This endpoint really just exists as post of a real with sickbeard
|
// This endpoint really just exists as post of a real with sickbeard
|
||||||
|
@ -140,13 +140,6 @@ namespace MediaBrowser.Model.ApiClient
|
|||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
Task MarkNotificationsRead(string userId, IEnumerable<Guid> notificationIdList, bool isRead);
|
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>
|
/// <summary>
|
||||||
/// Gets the notifications summary.
|
/// Gets the notifications summary.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
"LabelYoureDone": "You're Done!",
|
"LabelYoureDone": "You're Done!",
|
||||||
"WelcomeToMediaBrowser": "Welcome to Media Browser!",
|
"WelcomeToMediaBrowser": "Welcome to Media Browser!",
|
||||||
"TitleMediaBrowser": "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",
|
"TellUsAboutYourself": "Tell us about yourself",
|
||||||
"LabelYourFirstName": "Your first name:",
|
"LabelYourFirstName": "Your first name:",
|
||||||
"MoreUsersCanBeAddedLater": "More users can be added later within the Dashboard.",
|
"MoreUsersCanBeAddedLater": "More users can be added later within the Dashboard.",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common.Internal</id>
|
<id>MediaBrowser.Common.Internal</id>
|
||||||
<version>3.0.354</version>
|
<version>3.0.355</version>
|
||||||
<title>MediaBrowser.Common.Internal</title>
|
<title>MediaBrowser.Common.Internal</title>
|
||||||
<authors>Luke</authors>
|
<authors>Luke</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<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>
|
<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>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<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="NLog" version="2.1.0" />
|
||||||
<dependency id="SimpleInjector" version="2.4.1" />
|
<dependency id="SimpleInjector" version="2.4.1" />
|
||||||
<dependency id="sharpcompress" version="0.10.2" />
|
<dependency id="sharpcompress" version="0.10.2" />
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common</id>
|
<id>MediaBrowser.Common</id>
|
||||||
<version>3.0.354</version>
|
<version>3.0.355</version>
|
||||||
<title>MediaBrowser.Common</title>
|
<title>MediaBrowser.Common</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Server.Core</id>
|
<id>MediaBrowser.Server.Core</id>
|
||||||
<version>3.0.354</version>
|
<version>3.0.355</version>
|
||||||
<title>Media Browser.Server.Core</title>
|
<title>Media Browser.Server.Core</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.354" />
|
<dependency id="MediaBrowser.Common" version="3.0.355" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user