Merge pull request #4724 from BaronGreenback/17.0RC----DLNA_PlayTo_Fix

This commit is contained in:
Claus Vium 2020-12-11 09:56:39 +01:00 committed by GitHub
commit e6ea5a776d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -340,10 +340,19 @@ namespace Emby.Dlna.PlayTo
} }
var playlist = new PlaylistItem[len]; var playlist = new PlaylistItem[len];
playlist[0] = CreatePlaylistItem(items[0], user, command.StartPositionTicks.Value, command.MediaSourceId, command.AudioStreamIndex, command.SubtitleStreamIndex);
// Not nullable enabled - so this is required.
playlist[0] = CreatePlaylistItem(
items[0],
user,
command.StartPositionTicks ?? 0,
command.MediaSourceId ?? string.Empty,
command.AudioStreamIndex,
command.SubtitleStreamIndex);
for (int i = 1; i < len; i++) for (int i = 1; i < len; i++)
{ {
playlist[i] = CreatePlaylistItem(items[i], user, 0, null, null, null); playlist[i] = CreatePlaylistItem(items[i], user, 0, string.Empty, null, null);
} }
_logger.LogDebug("{0} - Playlist created", _session.DeviceName); _logger.LogDebug("{0} - Playlist created", _session.DeviceName);