瀏覽代碼

[5644] [DLNA] [Music] Next track command from any DLNA device does not do anything.

Stéphane Senart 4 年之前
父節點
當前提交
3164781ce0
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Emby.Dlna/PlayTo/PlayToController.cs

+ 5 - 0
Emby.Dlna/PlayTo/PlayToController.cs

@@ -175,6 +175,11 @@ namespace Emby.Dlna.PlayTo
 
 
                 // Send a message to the DLNA device to notify what is the next track in the playlist.
                 // Send a message to the DLNA device to notify what is the next track in the playlist.
                 var currentItemIndex = _playlist.FindIndex(item => item.StreamInfo.ItemId == streamInfo.ItemId);
                 var currentItemIndex = _playlist.FindIndex(item => item.StreamInfo.ItemId == streamInfo.ItemId);
+                if (currentItemIndex >= 0)
+                {
+                    _currentPlaylistIndex = currentItemIndex;
+                }
+
                 await SendNextTrackMessage(currentItemIndex, CancellationToken.None);
                 await SendNextTrackMessage(currentItemIndex, CancellationToken.None);
             }
             }
             catch (Exception ex)
             catch (Exception ex)