diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-12-02 03:07:36 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-02 03:07:36 -0500 |
| commit | 2050eb7bb2acc8e42ed07fa97c6a5da129860de4 (patch) | |
| tree | 75e7f343794c277edf2574305c18e5d78bc15619 /Emby.Server.Implementations/Session/SessionManager.cs | |
| parent | c9dc6ec7367564791dec54d4c456b0de25cc3d8e (diff) | |
| parent | 12ff39eeafd7bfe81b7d3dd4d3046b5640e33495 (diff) | |
Merge pull request #2322 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Session/SessionManager.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 300b67ae2..a20fb67b2 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -820,6 +820,17 @@ namespace Emby.Server.Implementations.Session } } + if (info.Item != null) + { + var msString = info.PositionTicks.HasValue ? (info.PositionTicks.Value / 10000).ToString(CultureInfo.InvariantCulture) : "unknown"; + + _logger.Info("Playback stopped reported by app {0} {1} playing {2}. Stopped at {3} ms", + session.Client, + session.ApplicationVersion, + info.Item.Name, + msString); + } + RemoveNowPlayingItem(session); var users = GetUsers(session); @@ -874,7 +885,7 @@ namespace Emby.Server.Implementations.Session { playedToCompletion = _userDataManager.UpdatePlayState(item, data, positionTicks.Value); } - else + else { // If the client isn't able to report this, then we'll just have to make an assumption data.PlayCount++; @@ -973,7 +984,7 @@ namespace Emby.Server.Implementations.Session var subItems = await TranslateItemForPlayback(itemId, user).ConfigureAwait(false); list.AddRange(subItems); } - + items = list .Where(i => i.LocationType != LocationType.Virtual) .ToList(); |
