Bläddra i källkod

added session disposal

Luke Pulverenti 11 år sedan
förälder
incheckning
8b534cc34a

+ 7 - 0
MediaBrowser.Controller/Session/ISessionManager.cs

@@ -76,6 +76,13 @@ namespace MediaBrowser.Controller.Session
         /// <exception cref="System.ArgumentNullException"></exception>
         Task OnPlaybackStopped(PlaybackStopInfo info);
 
+        /// <summary>
+        /// Reports the session ended.
+        /// </summary>
+        /// <param name="sessionId">The session identifier.</param>
+        /// <returns>Task.</returns>
+        Task ReportSessionEnded(Guid sessionId);
+
         /// <summary>
         /// Sends the system command.
         /// </summary>

+ 1 - 1
MediaBrowser.Dlna/PlayTo/Device.cs

@@ -375,7 +375,7 @@ namespace MediaBrowser.Dlna.PlayTo
             try
             {
                 var hasTrack = await GetPositionInfo().ConfigureAwait(false);
-
+                
                 // TODO: Why make these requests if hasTrack==false?
                 if (_count > 5)
                 {

+ 1 - 1
MediaBrowser.Dlna/PlayTo/DlnaController.cs

@@ -17,7 +17,7 @@ using Timer = System.Timers.Timer;
 
 namespace MediaBrowser.Dlna.PlayTo
 {
-    public class PlayToController : ISessionController
+    public class PlayToController : ISessionController, IDisposable
     {
         private Device _device;
         private BaseItem _currentItem = null;