diff options
| author | Bond-009 <bond.009@outlook.com> | 2026-04-24 19:00:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-24 19:00:19 +0200 |
| commit | a183fce142a47db3b2b9faa1e0f2863f0d56e5a1 (patch) | |
| tree | 8637cf347d573917242a3c5546baee33028825a3 /Emby.Server.Implementations/Session/SessionManager.cs | |
| parent | d1f242bc097b1530de27d5e74f303ff06096c294 (diff) | |
| parent | b1e2419c6593a3aa4c8df3778831a3214ae5a1c0 (diff) | |
Merge branch 'master' into Preservation-of-Watched-Status-on-Re-watch
Diffstat (limited to 'Emby.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Session/SessionManager.cs | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index d6880d7864..d4d0f4537b 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -793,6 +793,16 @@ namespace Emby.Server.Implementations.Session PlaySessionId = info.PlaySessionId }; + if (info.Item is not null) + { + _logger.LogInformation( + "User {0} started playback of '{1}' ({2} {3})", + session.UserName, + info.Item.Name, + session.Client, + session.ApplicationVersion); + } + await _eventManager.PublishAsync(eventArgs).ConfigureAwait(false); // Nothing to save here @@ -946,7 +956,7 @@ namespace Emby.Server.Implementations.Session } var tracksChanged = UpdatePlaybackSettings(user, info, data); - if (!tracksChanged) + if (tracksChanged) { changed = true; } @@ -1056,11 +1066,12 @@ namespace Emby.Server.Implementations.Session var msString = info.PositionTicks.HasValue ? (info.PositionTicks.Value / 10000).ToString(CultureInfo.InvariantCulture) : "unknown"; _logger.LogInformation( - "Playback stopped reported by app {0} {1} playing {2}. Stopped at {3} ms", - session.Client, - session.ApplicationVersion, + "User {0} stopped playback of '{1}' at {2}ms ({3} {4})", + session.UserName, info.Item.Name, - msString); + msString, + session.Client, + session.ApplicationVersion); } if (info.NowPlayingQueue is not null) @@ -1171,7 +1182,8 @@ namespace Emby.Server.Implementations.Session return session; } - private SessionInfoDto ToSessionInfoDto(SessionInfo sessionInfo) + /// <inheritdoc /> + public SessionInfoDto ToSessionInfoDto(SessionInfo sessionInfo) { return new SessionInfoDto { |
