mirror of https://github.com/jellyfin/jellyfin.git
updated nuget
This commit is contained in:
parent
f476944d91
commit
3db92516be
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using MediaBrowser.Model.Configuration;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using MediaBrowser.Model.Configuration;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Notifications
|
namespace MediaBrowser.Model.Notifications
|
||||||
{
|
{
|
||||||
|
@ -50,13 +50,17 @@ namespace MediaBrowser.Model.Notifications
|
||||||
public Dictionary<string, string> Variables { get; set; }
|
public Dictionary<string, string> Variables { get; set; }
|
||||||
|
|
||||||
public SendToUserType? SendToUserMode { get; set; }
|
public SendToUserType? SendToUserMode { get; set; }
|
||||||
|
|
||||||
|
public List<string> ExcludeUserIds { get; set; }
|
||||||
|
|
||||||
public NotificationRequest()
|
public NotificationRequest()
|
||||||
{
|
{
|
||||||
UserIds = new List<string>();
|
UserIds = new List<string>();
|
||||||
Date = DateTime.UtcNow;
|
Date = DateTime.UtcNow;
|
||||||
|
|
||||||
Variables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
Variables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
|
ExcludeUserIds = new List<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,9 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
|
||||||
|
|
||||||
var notification = new NotificationRequest
|
var notification = new NotificationRequest
|
||||||
{
|
{
|
||||||
NotificationType = GetPlaybackNotificationType(item.MediaType)
|
NotificationType = GetPlaybackNotificationType(item.MediaType),
|
||||||
|
|
||||||
|
ExcludeUserIds = e.Users.Select(i => i.Id.ToString("N")).ToList()
|
||||||
};
|
};
|
||||||
|
|
||||||
notification.Variables["ItemName"] = item.Name;
|
notification.Variables["ItemName"] = item.Name;
|
||||||
|
|
|
@ -38,7 +38,9 @@ namespace MediaBrowser.Server.Implementations.Notifications
|
||||||
null :
|
null :
|
||||||
_config.Configuration.NotificationOptions.GetOptions(notificationType);
|
_config.Configuration.NotificationOptions.GetOptions(notificationType);
|
||||||
|
|
||||||
var users = GetUserIds(request, options).Select(i => _userManager.GetUserById(new Guid(i)));
|
var users = GetUserIds(request, options)
|
||||||
|
.Except(request.UserIds)
|
||||||
|
.Select(i => _userManager.GetUserById(new Guid(i)));
|
||||||
|
|
||||||
var title = GetTitle(request, options);
|
var title = GetTitle(request, options);
|
||||||
|
|
||||||
|
@ -81,20 +83,10 @@ namespace MediaBrowser.Server.Implementations.Notifications
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options != null)
|
if (options != null && !string.IsNullOrWhiteSpace(request.NotificationType))
|
||||||
{
|
{
|
||||||
switch (options.SendToUserMode)
|
return _userManager.Users.Where(i => _config.Configuration.NotificationOptions.IsEnabledToSendToUser(request.NotificationType, i.Id.ToString("N"), i.Configuration))
|
||||||
{
|
.Select(i => i.Id.ToString("N"));
|
||||||
case SendToUserType.Admins:
|
|
||||||
return _userManager.Users.Where(i => i.Configuration.IsAdministrator)
|
|
||||||
.Select(i => i.Id.ToString("N"));
|
|
||||||
case SendToUserType.All:
|
|
||||||
return _userManager.Users.Select(i => i.Id.ToString("N"));
|
|
||||||
case SendToUserType.Custom:
|
|
||||||
return options.SendToUsers;
|
|
||||||
default:
|
|
||||||
throw new ArgumentException("Unrecognized SendToUserMode: " + options.SendToUserMode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new List<string>();
|
return new List<string>();
|
||||||
|
|
|
@ -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.355</version>
|
<version>3.0.356</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.355" />
|
<dependency id="MediaBrowser.Common" version="3.0.356" />
|
||||||
<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.355</version>
|
<version>3.0.356</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.355</version>
|
<version>3.0.356</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.355" />
|
<dependency id="MediaBrowser.Common" version="3.0.356" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|
Loading…
Reference in New Issue