浏览代码

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();
         }