소스 검색

play to fix

Luke Pulverenti 11 년 전
부모
커밋
5ce3ed2fb4
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      MediaBrowser.Dlna/PlayTo/Device.cs

+ 6 - 3
MediaBrowser.Dlna/PlayTo/Device.cs

@@ -294,12 +294,15 @@ namespace MediaBrowser.Dlna.PlayTo
 
             await Task.Delay(50).ConfigureAwait(false);
 
-            // If it's already in a playing state, this will throw an error
-            // TODO: What if state is transitioning?
-            if (TransportState != TRANSPORTSTATE.PLAYING)
+            try
             {
                 await SetPlay().ConfigureAwait(false);
             }
+            catch
+            {
+                // Some devices will throw an error if you tell it to play when it's already playing
+                // Others won't
+            }
 
             RestartTimer();
         }