mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
fix recent activity episode titles
This commit is contained in:
parent
8235160370
commit
4104bc4716
@ -138,7 +138,7 @@ namespace Emby.Server.Implementations.Activity
|
|||||||
|
|
||||||
CreateLogEntry(new ActivityLogEntry
|
CreateLogEntry(new ActivityLogEntry
|
||||||
{
|
{
|
||||||
Name = string.Format(_localization.GetLocalizedString("UserStoppedPlayingItemWithValues"), user.Name, item.Name),
|
Name = string.Format(_localization.GetLocalizedString("UserStoppedPlayingItemWithValues"), user.Name, Notifications.Notifications.GetItemName(item)),
|
||||||
Type = "PlaybackStopped",
|
Type = "PlaybackStopped",
|
||||||
ShortOverview = string.Format(_localization.GetLocalizedString("AppDeviceValues"), e.ClientName, e.DeviceName),
|
ShortOverview = string.Format(_localization.GetLocalizedString("AppDeviceValues"), e.ClientName, e.DeviceName),
|
||||||
UserId = user.Id.ToString("N")
|
UserId = user.Id.ToString("N")
|
||||||
@ -170,7 +170,7 @@ namespace Emby.Server.Implementations.Activity
|
|||||||
|
|
||||||
CreateLogEntry(new ActivityLogEntry
|
CreateLogEntry(new ActivityLogEntry
|
||||||
{
|
{
|
||||||
Name = string.Format(_localization.GetLocalizedString("UserStartedPlayingItemWithValues"), user.Name, item.Name),
|
Name = string.Format(_localization.GetLocalizedString("UserStartedPlayingItemWithValues"), user.Name, Notifications.Notifications.GetItemName(item)),
|
||||||
Type = "PlaybackStart",
|
Type = "PlaybackStart",
|
||||||
ShortOverview = string.Format(_localization.GetLocalizedString("AppDeviceValues"), e.ClientName, e.DeviceName),
|
ShortOverview = string.Format(_localization.GetLocalizedString("AppDeviceValues"), e.ClientName, e.DeviceName),
|
||||||
UserId = user.Id.ToString("N")
|
UserId = user.Id.ToString("N")
|
||||||
@ -235,10 +235,6 @@ namespace Emby.Server.Implementations.Activity
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void _logManager_LoggerLoaded(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void _config_NamedConfigurationUpdated(object sender, ConfigurationUpdateEventArgs e)
|
void _config_NamedConfigurationUpdated(object sender, ConfigurationUpdateEventArgs e)
|
||||||
{
|
{
|
||||||
CreateLogEntry(new ActivityLogEntry
|
CreateLogEntry(new ActivityLogEntry
|
||||||
|
@ -430,6 +430,23 @@ namespace Emby.Server.Implementations.Notifications
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string GetItemName(BaseItemInfo item)
|
||||||
|
{
|
||||||
|
var name = item.Name;
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(item.SeriesName))
|
||||||
|
{
|
||||||
|
name = item.SeriesName + " - " + name;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.Artists != null && item.Artists.Count > 0)
|
||||||
|
{
|
||||||
|
name = item.Artists[0] + " - " + name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
async void _userManager_UserCreated(object sender, GenericEventArgs<User> e)
|
async void _userManager_UserCreated(object sender, GenericEventArgs<User> e)
|
||||||
{
|
{
|
||||||
var notification = new NotificationRequest
|
var notification = new NotificationRequest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user