Use ReadOnlySpan in GetImagesForPrograms

This commit is contained in:
Patrick Barron 2021-06-19 15:26:24 -04:00
parent 67308f489f
commit d64e14fcb8

View File

@ -459,7 +459,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
} }
StringBuilder str = new StringBuilder("[", 1 + (programIds.Count * 13)); StringBuilder str = new StringBuilder("[", 1 + (programIds.Count * 13));
foreach (string i in programIds) foreach (ReadOnlySpan<char> i in programIds)
{ {
str.Append('"') str.Append('"')
.Append(i[..10]) .Append(i[..10])
@ -789,7 +789,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
{ {
var channelNumber = GetChannelNumber(channel); var channelNumber = GetChannelNumber(channel);
var station = allStations.Find(item => string.Equals(item.stationID, channel.stationID, StringComparison.OrdinalIgnoreCase)) var station = allStations.Find(item => string.Equals(item.stationID, channel.stationID, StringComparison.OrdinalIgnoreCase))
?? new ScheduleDirect.Station ?? new ScheduleDirect.Station
{ {
stationID = channel.stationID stationID = channel.stationID