浏览代码

Apply suggestions from code review

Co-authored-by: Cody Robibero <cody@robibe.ro>
Claus Vium 4 年之前
父节点
当前提交
e134a3677c
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      Emby.Dlna/PlayTo/Device.cs
  2. 1 1
      Emby.Dlna/PlayTo/PlayToController.cs

+ 2 - 2
Emby.Dlna/PlayTo/Device.cs

@@ -378,9 +378,9 @@ namespace Emby.Dlna.PlayTo
 
             url = url.Replace("&", "&amp;", StringComparison.Ordinal);
 
-            _logger.LogDebug("{0} - SetNextAvTransport Uri: {1} DlnaHeaders: {2}", Properties.Name, url, header);
+            _logger.LogDebug("{PropertyName} - SetNextAvTransport Uri: {Url} DlnaHeaders: {Header}", Properties.Name, url, header);
 
-            var command = avCommands.ServiceActions.FirstOrDefault(c => c.Name == "SetNextAVTransportURI");
+            var command = avCommands.ServiceActions.FirstOrDefault(c => string.Equals(c.Name, "SetNextAVTransportURI", StringComparison.OrdinalIgnoreCase);
             if (command == null)
             {
                 return;

+ 1 - 1
Emby.Dlna/PlayTo/PlayToController.cs

@@ -654,7 +654,7 @@ namespace Emby.Dlna.PlayTo
             await _device.SetAvTransport(currentitem.StreamUrl, GetDlnaHeaders(currentitem), currentitem.Didl, cancellationToken).ConfigureAwait(false);
 
             // Send a message to the DLNA device to notify what is the next track in the play list.
-            await SendNextTrackMessage(index, CancellationToken.None);
+            await SendNextTrackMessage(index, cancellationToken);
 
             var streamInfo = currentitem.StreamInfo;
             if (streamInfo.StartPositionTicks > 0 && EnableClientSideSeek(streamInfo))