fix SA1005

This commit is contained in:
telans 2020-06-14 21:11:11 +12:00
parent 726e116d5b
commit acd4389653
No known key found for this signature in database
GPG key ID: 195444EE92DBCB20
82 changed files with 247 additions and 247 deletions

View file

@ -466,12 +466,12 @@ namespace Emby.Dlna.ContentDirectory
}
else if (search.SearchType == SearchType.Playlist)
{
//items = items.OfType<Playlist>();
// items = items.OfType<Playlist>();
isFolder = true;
}
else if (search.SearchType == SearchType.MusicAlbum)
{
//items = items.OfType<MusicAlbum>();
// items = items.OfType<MusicAlbum>();
isFolder = true;
}
@ -926,7 +926,7 @@ namespace Emby.Dlna.ContentDirectory
private QueryResult<ServerItem> GetMovieCollections(User user, InternalItemsQuery query)
{
query.Recursive = true;
//query.Parent = parent;
// query.Parent = parent;
query.SetUser(user);
query.IncludeItemTypes = new[] { typeof(BoxSet).Name };

View file

@ -98,21 +98,21 @@ namespace Emby.Dlna.Didl
{
using (var writer = XmlWriter.Create(builder, settings))
{
//writer.WriteStartDocument();
// writer.WriteStartDocument();
writer.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL);
writer.WriteAttributeString("xmlns", "dc", null, NS_DC);
writer.WriteAttributeString("xmlns", "dlna", null, NS_DLNA);
writer.WriteAttributeString("xmlns", "upnp", null, NS_UPNP);
//didl.SetAttribute("xmlns:sec", NS_SEC);
// didl.SetAttribute("xmlns:sec", NS_SEC);
WriteXmlRootAttributes(_profile, writer);
WriteItemElement(writer, item, user, context, null, deviceId, filter, streamInfo);
writer.WriteFullEndElement();
//writer.WriteEndDocument();
// writer.WriteEndDocument();
}
return builder.ToString();
@ -711,7 +711,7 @@ namespace Emby.Dlna.Didl
{
// Don't filter on dc:title because not all devices will include it in the filter
// MediaMonkey for example won't display content without a title
//if (filter.Contains("dc:title"))
// if (filter.Contains("dc:title"))
{
AddValue(writer, "dc", "title", GetDisplayName(item, itemStubType, context), NS_DC);
}
@ -750,7 +750,7 @@ namespace Emby.Dlna.Didl
AddValue(writer, "dc", "description", desc, NS_DC);
}
}
//if (filter.Contains("upnp:longDescription"))
// if (filter.Contains("upnp:longDescription"))
//{
// if (!string.IsNullOrWhiteSpace(item.Overview))
// {
@ -1135,7 +1135,7 @@ namespace Emby.Dlna.Didl
if (width == 0 || height == 0)
{
//_imageProcessor.GetImageSize(item, imageInfo);
// _imageProcessor.GetImageSize(item, imageInfo);
width = null;
height = null;
}
@ -1145,14 +1145,14 @@ namespace Emby.Dlna.Didl
height = null;
}
//try
// try
//{
// var size = _imageProcessor.GetImageSize(imageInfo);
// width = size.Width;
// height = size.Height;
//}
//catch
// catch
//{
//}

View file

@ -26,7 +26,7 @@ namespace Emby.Dlna.Didl
{
// Don't bother with this. Some clients (media monkey) use the filter and then don't display very well when very little data comes back.
return true;
//return _all || ListHelper.ContainsIgnoreCase(_fields, field);
// return _all || ListHelper.ContainsIgnoreCase(_fields, field);
}
}
}

View file

@ -251,7 +251,7 @@ namespace Emby.Dlna
return string.Equals(value, header.Value, StringComparison.OrdinalIgnoreCase);
case HeaderMatchType.Substring:
var isMatch = value.ToString().IndexOf(header.Value, StringComparison.OrdinalIgnoreCase) != -1;
//_logger.LogDebug("IsMatch-Substring value: {0} testValue: {1} isMatch: {2}", value, header.Value, isMatch);
// _logger.LogDebug("IsMatch-Substring value: {0} testValue: {1} isMatch: {2}", value, header.Value, isMatch);
return isMatch;
case HeaderMatchType.Regex:
return Regex.IsMatch(value, header.Value, RegexOptions.IgnoreCase);
@ -566,9 +566,9 @@ namespace Emby.Dlna
new Foobar2000Profile(),
new SharpSmartTvProfile(),
new MediaMonkeyProfile(),
//new Windows81Profile(),
//new WindowsMediaCenterProfile(),
//new WindowsPhoneProfile(),
// new Windows81Profile(),
// new WindowsMediaCenterProfile(),
// new WindowsPhoneProfile(),
new DirectTvProfile(),
new DishHopperJoeyProfile(),
new DefaultProfile(),

View file

@ -276,7 +276,7 @@ namespace Emby.Dlna.Main
var device = new SsdpRootDevice
{
CacheLifetime = TimeSpan.FromSeconds(1800), //How long SSDP clients can cache this info.
CacheLifetime = TimeSpan.FromSeconds(1800), // How long SSDP clients can cache this info.
Location = uri, // Must point to the URL that serves your devices UPnP description document.
Address = address,
SubnetMask = _networkManager.GetLocalIpSubnetMask(address),

View file

@ -750,7 +750,7 @@ namespace Emby.Dlna.PlayTo
if (track == null)
{
//If track is null, some vendors do this, use GetMediaInfo instead
// If track is null, some vendors do this, use GetMediaInfo instead
return (true, null);
}

View file

@ -88,7 +88,7 @@ namespace Emby.Dlna.PlayTo
if (usn.IndexOf("MediaRenderer:", StringComparison.OrdinalIgnoreCase) == -1 &&
nt.IndexOf("MediaRenderer:", StringComparison.OrdinalIgnoreCase) == -1)
{
//_logger.LogDebug("Upnp device {0} does not contain a MediaRenderer device (0).", location);
// _logger.LogDebug("Upnp device {0} does not contain a MediaRenderer device (0).", location);
return;
}

View file

@ -77,7 +77,7 @@ namespace Emby.Dlna.Ssdp
// (Optional) Set the filter so we only see notifications for devices we care about
// (can be any search target value i.e device type, uuid value etc - any value that appears in the
// DiscoverdSsdpDevice.NotificationType property or that is used with the searchTarget parameter of the Search method).
//_DeviceLocator.NotificationFilter = "upnp:rootdevice";
// _DeviceLocator.NotificationFilter = "upnp:rootdevice";
// Connect our event handler so we process devices as they are found
_deviceLocator.DeviceAvailable += OnDeviceLocatorDeviceAvailable;

View file

@ -1072,7 +1072,7 @@ namespace Emby.Server.Implementations.Channels
}
// was used for status
//if (!string.Equals(item.ExternalEtag ?? string.Empty, info.Etag ?? string.Empty, StringComparison.Ordinal))
// if (!string.Equals(item.ExternalEtag ?? string.Empty, info.Etag ?? string.Empty, StringComparison.Ordinal))
//{
// item.ExternalEtag = info.Etag;
// forceUpdate = true;

View file

@ -4360,7 +4360,7 @@ namespace Emby.Server.Implementations.Data
// TODO this seems to be an idea for a better schema where ProviderIds are their own table
// buut this is not implemented
//hasProviderIds.Add("(COALESCE((select value from ProviderIds where ItemId=Guid and Name = '" + pair.Key + "'), '') <> " + paramName + ")");
// hasProviderIds.Add("(COALESCE((select value from ProviderIds where ItemId=Guid and Name = '" + pair.Key + "'), '') <> " + paramName + ")");
// TODO this is a really BAD way to do it since the pair:
// Tmdb, 1234 matches Tmdb=1234 but also Tmdb=1234567

View file

@ -347,7 +347,7 @@ namespace Emby.Server.Implementations.Data
var userData = new UserItemData();
userData.Key = reader[0].ToString();
//userData.UserId = reader[1].ReadGuidFromBlob();
// userData.UserId = reader[1].ReadGuidFromBlob();
if (reader[2].SQLiteType != SQLiteType.Null)
{

View file

@ -112,7 +112,7 @@ namespace Emby.Server.Implementations.Devices
{
IEnumerable<AuthenticationInfo> sessions = _authRepo.Get(new AuthenticationInfoQuery
{
//UserId = query.UserId
// UserId = query.UserId
HasUser = true
}).Items;

View file

@ -946,7 +946,7 @@ namespace Emby.Server.Implementations.Dto
dto.AlbumPrimaryImageTag = GetTagAndFillBlurhash(dto, albumParent, ImageType.Primary);
}
//if (options.ContainsField(ItemFields.MediaSourceCount))
// if (options.ContainsField(ItemFields.MediaSourceCount))
//{
// Songs always have one
//}
@ -956,13 +956,13 @@ namespace Emby.Server.Implementations.Dto
{
dto.Artists = hasArtist.Artists;
//var artistItems = _libraryManager.GetArtists(new InternalItemsQuery
// var artistItems = _libraryManager.GetArtists(new InternalItemsQuery
//{
// EnableTotalRecordCount = false,
// ItemIds = new[] { item.Id.ToString("N", CultureInfo.InvariantCulture) }
//});
//dto.ArtistItems = artistItems.Items
// dto.ArtistItems = artistItems.Items
// .Select(i =>
// {
// var artist = i.Item1;
@ -975,7 +975,7 @@ namespace Emby.Server.Implementations.Dto
// .ToList();
// Include artists that are not in the database yet, e.g., just added via metadata editor
//var foundArtists = artistItems.Items.Select(i => i.Item1.Name).ToList();
// var foundArtists = artistItems.Items.Select(i => i.Item1.Name).ToList();
dto.ArtistItems = hasArtist.Artists
//.Except(foundArtists, new DistinctNameComparer())
.Select(i =>
@ -1009,13 +1009,13 @@ namespace Emby.Server.Implementations.Dto
{
dto.AlbumArtist = hasAlbumArtist.AlbumArtists.FirstOrDefault();
//var artistItems = _libraryManager.GetAlbumArtists(new InternalItemsQuery
// var artistItems = _libraryManager.GetAlbumArtists(new InternalItemsQuery
//{
// EnableTotalRecordCount = false,
// ItemIds = new[] { item.Id.ToString("N", CultureInfo.InvariantCulture) }
//});
//dto.AlbumArtists = artistItems.Items
// dto.AlbumArtists = artistItems.Items
// .Select(i =>
// {
// var artist = i.Item1;
@ -1165,7 +1165,7 @@ namespace Emby.Server.Implementations.Dto
// this block will add the series poster for episodes without a poster
// TODO maybe remove the if statement entirely
//if (options.ContainsField(ItemFields.SeriesPrimaryImage))
// if (options.ContainsField(ItemFields.SeriesPrimaryImage))
{
episodeSeries = episodeSeries ?? episode.Series;
if (episodeSeries != null)
@ -1211,7 +1211,7 @@ namespace Emby.Server.Implementations.Dto
// this block will add the series poster for seasons without a poster
// TODO maybe remove the if statement entirely
//if (options.ContainsField(ItemFields.SeriesPrimaryImage))
// if (options.ContainsField(ItemFields.SeriesPrimaryImage))
{
series = series ?? season.Series;
if (series != null)

View file

@ -225,7 +225,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
throw new AuthenticationException("Access token is invalid or expired.");
}
//if (!string.IsNullOrEmpty(info.UserId))
// if (!string.IsNullOrEmpty(info.UserId))
//{
// var user = _userManager.GetUserById(info.UserId);

View file

@ -237,7 +237,7 @@ namespace Emby.Server.Implementations.IO
{
result.IsDirectory = info is DirectoryInfo || (info.Attributes & FileAttributes.Directory) == FileAttributes.Directory;
//if (!result.IsDirectory)
// if (!result.IsDirectory)
//{
// result.IsHidden = (info.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden;
//}

View file

@ -2595,7 +2595,7 @@ namespace Emby.Server.Implementations.Library
Anime series don't generally have a season in their file name, however,
tvdb needs a season to correctly get the metadata.
Hence, a null season needs to be filled with something. */
//FIXME perhaps this would be better for tvdb parser to ask for season 1 if no season is specified
// FIXME perhaps this would be better for tvdb parser to ask for season 1 if no season is specified
episode.ParentIndexNumber = 1;
}
@ -2991,7 +2991,7 @@ namespace Emby.Server.Implementations.Library
private static bool ValidateNetworkPath(string path)
{
//if (Environment.OSVersion.Platform == PlatformID.Win32NT)
// if (Environment.OSVersion.Platform == PlatformID.Win32NT)
//{
// // We can't validate protocol-based paths, so just allow them
// if (path.IndexOf("://", StringComparison.OrdinalIgnoreCase) == -1)

View file

@ -50,7 +50,7 @@ namespace Emby.Server.Implementations.Library
{
mediaInfo = _json.DeserializeFromFile<MediaInfo>(cacheFilePath);
//_logger.LogDebug("Found cached media info");
// _logger.LogDebug("Found cached media info");
}
catch
{
@ -85,7 +85,7 @@ namespace Emby.Server.Implementations.Library
Directory.CreateDirectory(Path.GetDirectoryName(cacheFilePath));
_json.SerializeToFile(mediaInfo, cacheFilePath);
//_logger.LogDebug("Saved media info to {0}", cacheFilePath);
// _logger.LogDebug("Saved media info to {0}", cacheFilePath);
}
}

View file

@ -646,7 +646,7 @@ namespace Emby.Server.Implementations.Library
{
mediaInfo = _jsonSerializer.DeserializeFromFile<MediaInfo>(cacheFilePath);
//_logger.LogDebug("Found cached media info");
// _logger.LogDebug("Found cached media info");
}
catch (Exception ex)
{
@ -682,7 +682,7 @@ namespace Emby.Server.Implementations.Library
Directory.CreateDirectory(Path.GetDirectoryName(cacheFilePath));
_jsonSerializer.SerializeToFile(mediaInfo, cacheFilePath);
//_logger.LogDebug("Saved media info to {0}", cacheFilePath);
// _logger.LogDebug("Saved media info to {0}", cacheFilePath);
}
}

View file

@ -209,8 +209,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
Name = parseName ?
resolvedItem.Name :
Path.GetFileNameWithoutExtension(firstMedia.Path),
//AdditionalParts = resolvedItem.Files.Skip(1).Select(i => i.Path).ToArray(),
//LocalAlternateVersions = resolvedItem.AlternateVersions.Select(i => i.Path).ToArray()
// AdditionalParts = resolvedItem.Files.Skip(1).Select(i => i.Path).ToArray(),
// LocalAlternateVersions = resolvedItem.AlternateVersions.Select(i => i.Path).ToArray()
};
result.Items.Add(libraryItem);

View file

@ -92,7 +92,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
// Args points to an album if parent is an Artist folder or it directly contains music
if (args.IsDirectory)
{
// if (args.Parent is MusicArtist) return true; //saves us from testing children twice
// if (args.Parent is MusicArtist) return true; // saves us from testing children twice
if (ContainsMusic(args.FileSystemChildren, true, args.DirectoryService, _logger, _fileSystem, _libraryManager))
{
return true;

View file

@ -292,7 +292,7 @@ namespace Emby.Server.Implementations.Library.Resolvers
}
return true;
//var blurayExtensions = new[]
// var blurayExtensions = new[]
//{
// ".mts",
// ".m2ts",
@ -300,7 +300,7 @@ namespace Emby.Server.Implementations.Library.Resolvers
// ".mpls"
//};
//return directoryService.GetFiles(fullPath).Any(i => blurayExtensions.Contains(i.Extension ?? string.Empty, StringComparer.OrdinalIgnoreCase));
// return directoryService.GetFiles(fullPath).Any(i => blurayExtensions.Contains(i.Extension ?? string.Empty, StringComparer.OrdinalIgnoreCase));
}
}
}

View file

@ -43,7 +43,7 @@ namespace Emby.Server.Implementations.Library.Resolvers
}
if (string.Equals(args.Path, _appPaths.DefaultUserViewsPath, StringComparison.OrdinalIgnoreCase))
{
return new UserRootFolder(); //if we got here and still a root - must be user root
return new UserRootFolder(); // if we got here and still a root - must be user root
}
if (args.IsVf)
{

View file

@ -59,7 +59,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
var collectionType = args.GetCollectionType();
if (string.Equals(collectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
{
//if (args.ContainsFileSystemEntryByName("tvshow.nfo"))
// if (args.ContainsFileSystemEntryByName("tvshow.nfo"))
//{
// return new Series
// {

View file

@ -183,7 +183,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
var subtitleArgs = CopySubtitles ? " -codec:s copy" : " -sn";
//var outputParam = string.Equals(Path.GetExtension(targetFile), ".mp4", StringComparison.OrdinalIgnoreCase) ?
// var outputParam = string.Equals(Path.GetExtension(targetFile), ".mp4", StringComparison.OrdinalIgnoreCase) ?
// " -f mp4 -movflags frag_keyframe+empty_moov" :
// string.Empty;
@ -206,13 +206,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
{
return "-codec:a:0 copy";
//var audioChannels = 2;
//var audioStream = mediaStreams.FirstOrDefault(i => i.Type == MediaStreamType.Audio);
//if (audioStream != null)
// var audioChannels = 2;
// var audioStream = mediaStreams.FirstOrDefault(i => i.Type == MediaStreamType.Audio);
// if (audioStream != null)
//{
// audioChannels = audioStream.Channels ?? audioChannels;
//}
//return "-codec:a:0 aac -strict experimental -ab 320000";
// return "-codec:a:0 aac -strict experimental -ab 320000";
}
private static bool EncodeVideo(MediaSourceInfo mediaSource)

View file

@ -145,7 +145,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
var programsInfo = new List<ProgramInfo>();
foreach (ScheduleDirect.Program schedule in dailySchedules.SelectMany(d => d.programs))
{
//_logger.LogDebug("Proccesing Schedule for statio ID " + stationID +
// _logger.LogDebug("Proccesing Schedule for statio ID " + stationID +
// " which corresponds to channel " + channelNumber + " and program id " +
// schedule.programID + " which says it has images? " +
// programDict[schedule.programID].hasImageArtwork);
@ -178,7 +178,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
programEntry.backdropImage = GetProgramImage(ApiUrl, imagesWithoutText, true, WideAspect);
//programEntry.bannerImage = GetProgramImage(ApiUrl, data, "Banner", false) ??
// programEntry.bannerImage = GetProgramImage(ApiUrl, data, "Banner", false) ??
// GetProgramImage(ApiUrl, data, "Banner-L1", false) ??
// GetProgramImage(ApiUrl, data, "Banner-LO", false) ??
// GetProgramImage(ApiUrl, data, "Banner-LOT", false);
@ -276,7 +276,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
CommunityRating = null,
EpisodeTitle = episodeTitle,
Audio = audioType,
//IsNew = programInfo.@new ?? false,
// IsNew = programInfo.@new ?? false,
IsRepeat = programInfo.@new == null,
IsSeries = string.Equals(details.entityType, "episode", StringComparison.OrdinalIgnoreCase),
ImageUrl = details.primaryImage,
@ -701,7 +701,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
CancellationToken = cancellationToken,
LogErrorResponseBody = true
};
//_logger.LogInformation("Obtaining token from Schedules Direct from addres: " + httpOptions.Url + " with body " +
// _logger.LogInformation("Obtaining token from Schedules Direct from addres: " + httpOptions.Url + " with body " +
// httpOptions.RequestContent);
using (var response = await Post(httpOptions, false, null).ConfigureAwait(false))

View file

@ -406,8 +406,8 @@ namespace Emby.Server.Implementations.LiveTv
if (!(service is EmbyTV.EmbyTV))
{
// We can't trust that we'll be able to direct stream it through emby server, no matter what the provider says
//mediaSource.SupportsDirectPlay = false;
//mediaSource.SupportsDirectStream = false;
// mediaSource.SupportsDirectPlay = false;
// mediaSource.SupportsDirectStream = false;
mediaSource.SupportsTranscoding = true;
foreach (var stream in mediaSource.MediaStreams)
{
@ -558,7 +558,7 @@ namespace Emby.Server.Implementations.LiveTv
}
item.ParentId = channel.Id;
//item.ChannelType = channelType;
// item.ChannelType = channelType;
item.Audio = info.Audio;
item.ChannelId = channel.Id;
@ -1368,10 +1368,10 @@ namespace Emby.Server.Implementations.LiveTv
// limit = (query.Limit ?? 10) * 2;
limit = null;
//var allActivePaths = EmbyTV.EmbyTV.Current.GetAllActiveRecordings().Select(i => i.Path).ToArray();
//var items = allActivePaths.Select(i => _libraryManager.FindByPath(i, false)).Where(i => i != null).ToArray();
// var allActivePaths = EmbyTV.EmbyTV.Current.GetAllActiveRecordings().Select(i => i.Path).ToArray();
// var items = allActivePaths.Select(i => _libraryManager.FindByPath(i, false)).Where(i => i != null).ToArray();
//return new QueryResult<BaseItem>
// return new QueryResult<BaseItem>
//{
// Items = items,
// TotalRecordCount = items.Length
@ -1956,7 +1956,7 @@ namespace Emby.Server.Implementations.LiveTv
OriginalAirDate = program.PremiereDate,
Overview = program.Overview,
StartDate = program.StartDate,
//ImagePath = program.ExternalImagePath,
// ImagePath = program.ExternalImagePath,
Name = program.Name,
OfficialRating = program.OfficialRating
};

View file

@ -54,7 +54,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
var result = await GetChannelsInternal(tuner, cancellationToken).ConfigureAwait(false);
var list = result.ToList();
//logger.LogInformation("Channels from {0}: {1}", tuner.Url, JsonSerializer.SerializeToString(list));
// logger.LogInformation("Channels from {0}: {1}", tuner.Url, JsonSerializer.SerializeToString(list));
if (!string.IsNullOrEmpty(key) && list.Count > 0)
{

View file

@ -502,8 +502,8 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
SupportsTranscoding = true,
IsInfiniteStream = true,
IgnoreDts = true,
//IgnoreIndex = true,
//ReadAtNativeFramerate = true
// IgnoreIndex = true,
// ReadAtNativeFramerate = true
};
mediaSource.InferTotalBitrate();

View file

@ -117,17 +117,17 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
taskCompletionSource,
LiveStreamCancellationTokenSource.Token).ConfigureAwait(false);
//OpenedMediaSource.Protocol = MediaProtocol.File;
//OpenedMediaSource.Path = tempFile;
//OpenedMediaSource.ReadAtNativeFramerate = true;
// OpenedMediaSource.Protocol = MediaProtocol.File;
// OpenedMediaSource.Path = tempFile;
// OpenedMediaSource.ReadAtNativeFramerate = true;
MediaSource.Path = _appHost.GetLoopbackHttpApiUrl() + "/LiveTv/LiveStreamFiles/" + UniqueId + "/stream.ts";
MediaSource.Protocol = MediaProtocol.Http;
//OpenedMediaSource.SupportsDirectPlay = false;
//OpenedMediaSource.SupportsDirectStream = true;
//OpenedMediaSource.SupportsTranscoding = true;
// OpenedMediaSource.SupportsDirectPlay = false;
// OpenedMediaSource.SupportsDirectStream = true;
// OpenedMediaSource.SupportsTranscoding = true;
//await Task.Delay(5000).ConfigureAwait(false);
// await Task.Delay(5000).ConfigureAwait(false);
await taskCompletionSource.Task.ConfigureAwait(false);
}

View file

@ -284,7 +284,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
if (double.TryParse(numberPart, NumberStyles.Any, CultureInfo.InvariantCulture, out var number))
{
//channel.Number = number.ToString();
// channel.Number = number.ToString();
nameInExtInf = nameInExtInf.Substring(numberIndex + 1).Trim(new[] { ' ', '-' });
}
}

View file

@ -103,21 +103,21 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
_ = StartStreaming(response, taskCompletionSource, LiveStreamCancellationTokenSource.Token);
//OpenedMediaSource.Protocol = MediaProtocol.File;
//OpenedMediaSource.Path = tempFile;
//OpenedMediaSource.ReadAtNativeFramerate = true;
// OpenedMediaSource.Protocol = MediaProtocol.File;
// OpenedMediaSource.Path = tempFile;
// OpenedMediaSource.ReadAtNativeFramerate = true;
MediaSource.Path = _appHost.GetLoopbackHttpApiUrl() + "/LiveTv/LiveStreamFiles/" + UniqueId + "/stream.ts";
MediaSource.Protocol = MediaProtocol.Http;
//OpenedMediaSource.Path = TempFilePath;
//OpenedMediaSource.Protocol = MediaProtocol.File;
// OpenedMediaSource.Path = TempFilePath;
// OpenedMediaSource.Protocol = MediaProtocol.File;
//OpenedMediaSource.Path = _tempFilePath;
//OpenedMediaSource.Protocol = MediaProtocol.File;
//OpenedMediaSource.SupportsDirectPlay = false;
//OpenedMediaSource.SupportsDirectStream = true;
//OpenedMediaSource.SupportsTranscoding = true;
// OpenedMediaSource.Path = _tempFilePath;
// OpenedMediaSource.Protocol = MediaProtocol.File;
// OpenedMediaSource.SupportsDirectPlay = false;
// OpenedMediaSource.SupportsDirectStream = true;
// OpenedMediaSource.SupportsTranscoding = true;
await taskCompletionSource.Task.ConfigureAwait(false);
if (taskCompletionSource.Task.Exception != null)
{

View file

@ -114,7 +114,7 @@ namespace Emby.Server.Implementations.Net
try
{
//retVal.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, true);
// retVal.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, true);
retVal.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, multicastTimeToLive);
var localIp = IPAddress.Any;

View file

@ -167,7 +167,7 @@ namespace Emby.Server.Implementations.Networking
foreach (var subnet_Match in subnets)
{
//logger.LogDebug("subnet_Match:" + subnet_Match);
// logger.LogDebug("subnet_Match:" + subnet_Match);
if (endpoint.StartsWith(subnet_Match + ".", StringComparison.OrdinalIgnoreCase))
{

View file

@ -163,7 +163,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
}
catch (ObjectDisposedException)
{
//TODO Investigate and properly fix.
// TODO Investigate and properly fix.
break;
}
}

View file

@ -59,8 +59,8 @@ namespace Emby.Server.Implementations.Services
}
}
//ContentType='text/html' is the default for a HttpResponse
//Do not override if another has been set
// ContentType='text/html' is the default for a HttpResponse
// Do not override if another has been set
if (response.ContentType == null || response.ContentType == "text/html")
{
response.ContentType = defaultContentType;

View file

@ -59,8 +59,8 @@ namespace Emby.Server.Implementations.Services
ServiceExecGeneral.CreateServiceRunnersFor(requestType, actions);
//var returnMarker = GetTypeWithGenericTypeDefinitionOf(requestType, typeof(IReturn<>));
//var responseType = returnMarker != null ?
// var returnMarker = GetTypeWithGenericTypeDefinitionOf(requestType, typeof(IReturn<>));
// var responseType = returnMarker != null ?
// GetGenericArguments(returnMarker)[0]
// : mi.ReturnType != typeof(object) && mi.ReturnType != typeof(void) ?
// mi.ReturnType
@ -182,7 +182,7 @@ namespace Emby.Server.Implementations.Services
serviceRequiresContext.Request = req;
}
//Executes the service and returns the result
// Executes the service and returns the result
return ServiceExecGeneral.Execute(serviceType, req, service, requestDto, requestType.GetMethodName());
}
}

View file

@ -118,7 +118,7 @@ namespace Emby.Server.Implementations.Services
var componentsList = new List<string>();
//We only split on '.' if the restPath has them. Allows for /{action}.{type}
// We only split on '.' if the restPath has them. Allows for /{action}.{type}
var hasSeparators = new List<bool>();
foreach (var component in this.restPath.Split(PathSeperatorChar))
{
@ -298,12 +298,12 @@ namespace Emby.Server.Implementations.Services
return -1;
}
//Routes with least wildcard matches get the highest score
// Routes with least wildcard matches get the highest score
var score = Math.Max((100 - wildcardMatchCount), 1) * 1000
//Routes with less variable (and more literal) matches
// Routes with less variable (and more literal) matches
+ Math.Max((10 - VariableArgsCount), 1) * 100;
//Exact verb match is better than ANY
// Exact verb match is better than ANY
if (Verbs.Length == 1 && string.Equals(httpMethod, Verbs[0], StringComparison.OrdinalIgnoreCase))
{
score += 10;
@ -470,7 +470,7 @@ namespace Emby.Server.Implementations.Services
+ variableName + " on " + RequestType.GetMethodName());
}
var value = requestComponents.Length > pathIx ? requestComponents[pathIx] : null; //wildcard has arg mismatch
var value = requestComponents.Length > pathIx ? requestComponents[pathIx] : null; // wildcard has arg mismatch
if (value != null && this.isWildcard[i])
{
if (i == this.TotalComponentsCount - 1)
@ -519,8 +519,8 @@ namespace Emby.Server.Implementations.Services
if (queryStringAndFormData != null)
{
//Query String and form data can override variable path matches
//path variables < query string < form data
// Query String and form data can override variable path matches
// path variables < query string < form data
foreach (var name in queryStringAndFormData)
{
requestKeyValuesMap[name.Key] = name.Value;

View file

@ -83,7 +83,7 @@ namespace Emby.Server.Implementations.Services
if (propertySerializerEntry.PropertyType == typeof(bool))
{
//InputExtensions.cs#530 MVC Checkbox helper emits extra hidden input field, generating 2 values, first is the real value
// InputExtensions.cs#530 MVC Checkbox helper emits extra hidden input field, generating 2 values, first is the real value
propertyTextValue = StringExtensions.LeftPart(propertyTextValue, ',').ToString();
}

View file

@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.Sorting
if (val != 0)
{
//return val;
// return val;
}
}

View file

@ -149,7 +149,7 @@ namespace Emby.Server.Implementations.TV
var allNextUp = seriesKeys
.Select(i => GetNextUp(i, currentUser, dtoOptions));
//allNextUp = allNextUp.OrderByDescending(i => i.Item1);
// allNextUp = allNextUp.OrderByDescending(i => i.Item1);
// If viewing all next up for all series, remove first episodes
// But if that returns empty, keep those first episodes (avoid completely empty view)

View file

@ -220,7 +220,7 @@ namespace MediaBrowser.Api
{
var item = _libraryManager.GetItemById(new Guid(request.Id));
//foreach (var key in request.ProviderIds)
// foreach (var key in request.ProviderIds)
//{
// var value = key.Value;
@ -233,8 +233,8 @@ namespace MediaBrowser.Api
// Since the refresh process won't erase provider Ids, we need to set this explicitly now.
item.ProviderIds = request.ProviderIds;
//item.ProductionYear = request.ProductionYear;
//item.Name = request.Name;
// item.ProductionYear = request.ProductionYear;
// item.Name = request.Name;
return _providerManager.RefreshFullItem(
item,

View file

@ -161,8 +161,8 @@ namespace MediaBrowser.Api.Movies
IncludeItemTypes = new[]
{
typeof(Movie).Name,
//typeof(Trailer).Name,
//typeof(LiveTvProgram).Name
// typeof(Trailer).Name,
// typeof(LiveTvProgram).Name
},
// IsMovie = true
OrderBy = new[] { ItemSortBy.DatePlayed, ItemSortBy.Random }.Select(i => new ValueTuple<string, SortOrder>(i, SortOrder.Descending)).ToArray(),

View file

@ -216,7 +216,7 @@ namespace MediaBrowser.Api.Playback
UseShellExecute = false,
// Must consume both stdout and stderr or deadlocks may occur
//RedirectStandardOutput = true,
// RedirectStandardOutput = true,
RedirectStandardError = true,
RedirectStandardInput = true,
@ -685,7 +685,7 @@ namespace MediaBrowser.Api.Playback
state.User = UserManager.GetUserById(auth.UserId);
}
//if ((Request.UserAgent ?? string.Empty).IndexOf("iphone", StringComparison.OrdinalIgnoreCase) != -1 ||
// if ((Request.UserAgent ?? string.Empty).IndexOf("iphone", StringComparison.OrdinalIgnoreCase) != -1 ||
// (Request.UserAgent ?? string.Empty).IndexOf("ipad", StringComparison.OrdinalIgnoreCase) != -1 ||
// (Request.UserAgent ?? string.Empty).IndexOf("ipod", StringComparison.OrdinalIgnoreCase) != -1)
//{
@ -716,9 +716,9 @@ namespace MediaBrowser.Api.Playback
state.IsInputVideo = string.Equals(item.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase);
//var primaryImage = item.GetImageInfo(ImageType.Primary, 0) ??
// var primaryImage = item.GetImageInfo(ImageType.Primary, 0) ??
// item.Parents.Select(i => i.GetImageInfo(ImageType.Primary, 0)).FirstOrDefault(i => i != null);
//if (primaryImage != null)
// if (primaryImage != null)
//{
// state.AlbumCoverPath = primaryImage.Path;
//}
@ -885,7 +885,7 @@ namespace MediaBrowser.Api.Playback
if (transcodingProfile != null)
{
state.EstimateContentLength = transcodingProfile.EstimateContentLength;
//state.EnableMpegtsM2TsMode = transcodingProfile.EnableMpegtsM2TsMode;
// state.EnableMpegtsM2TsMode = transcodingProfile.EnableMpegtsM2TsMode;
state.TranscodeSeekInfo = transcodingProfile.TranscodeSeekInfo;
if (state.VideoRequest != null)

View file

@ -178,7 +178,7 @@ namespace MediaBrowser.Api.Playback.Hls
var newDuration = "#EXT-X-TARGETDURATION:" + segmentLength.ToString(CultureInfo.InvariantCulture);
text = text.Replace("#EXT-X-TARGETDURATION:" + (segmentLength - 1).ToString(CultureInfo.InvariantCulture), newDuration, StringComparison.OrdinalIgnoreCase);
//text = text.Replace("#EXT-X-TARGETDURATION:" + (segmentLength + 1).ToString(CultureInfo.InvariantCulture), newDuration, StringComparison.OrdinalIgnoreCase);
// text = text.Replace("#EXT-X-TARGETDURATION:" + (segmentLength + 1).ToString(CultureInfo.InvariantCulture), newDuration, StringComparison.OrdinalIgnoreCase);
return text;
}

View file

@ -257,7 +257,7 @@ namespace MediaBrowser.Api.Playback.Hls
throw;
}
//await WaitForMinimumSegmentCount(playlistPath, 1, cancellationTokenSource.Token).ConfigureAwait(false);
// await WaitForMinimumSegmentCount(playlistPath, 1, cancellationTokenSource.Token).ConfigureAwait(false);
}
else
{
@ -277,8 +277,8 @@ namespace MediaBrowser.Api.Playback.Hls
}
}
//Logger.LogInformation("waiting for {0}", segmentPath);
//while (!File.Exists(segmentPath))
// Logger.LogInformation("waiting for {0}", segmentPath);
// while (!File.Exists(segmentPath))
//{
// await Task.Delay(50, cancellationToken).ConfigureAwait(false);
//}
@ -717,7 +717,7 @@ namespace MediaBrowser.Api.Playback.Hls
// Having problems in android
return false;
//return state.VideoRequest.VideoBitRate.HasValue;
// return state.VideoRequest.VideoBitRate.HasValue;
}
/// <summary>
@ -972,7 +972,7 @@ namespace MediaBrowser.Api.Playback.Hls
var queryStringIndex = Request.RawUrl.IndexOf('?');
var queryString = queryStringIndex == -1 ? string.Empty : Request.RawUrl.Substring(queryStringIndex);
//if ((Request.UserAgent ?? string.Empty).IndexOf("roku", StringComparison.OrdinalIgnoreCase) != -1)
// if ((Request.UserAgent ?? string.Empty).IndexOf("roku", StringComparison.OrdinalIgnoreCase) != -1)
//{
// queryString = string.Empty;
//}
@ -1100,7 +1100,7 @@ namespace MediaBrowser.Api.Playback.Hls
}
}
//args += " -flags -global_header";
// args += " -flags -global_header";
}
else
{
@ -1142,7 +1142,7 @@ namespace MediaBrowser.Api.Playback.Hls
args += " " + keyFrameArg + gopArg;
}
//args += " -mixed-refs 0 -refs 3 -x264opts b_pyramid=0:weightb=0:weightp=0";
// args += " -mixed-refs 0 -refs 3 -x264opts b_pyramid=0:weightb=0:weightp=0";
var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode;
@ -1164,7 +1164,7 @@ namespace MediaBrowser.Api.Playback.Hls
args += " -start_at_zero";
}
//args += " -flags -global_header";
// args += " -flags -global_header";
}
if (!string.IsNullOrEmpty(state.OutputVideoSync))

View file

@ -231,7 +231,7 @@ namespace MediaBrowser.Api.Playback.Progressive
}
//// Not static but transcode cache file exists
//if (isTranscodeCached && state.VideoRequest == null)
// if (isTranscodeCached && state.VideoRequest == null)
//{
// var contentType = state.GetMimeType(outputPath);

View file

@ -96,8 +96,8 @@ namespace MediaBrowser.Api.Playback.Progressive
bytesRead = await CopyToInternalAsyncWithSyncRead(inputStream, outputStream, cancellationToken).ConfigureAwait(false);
}
//var position = fs.Position;
//_logger.LogDebug("Streamed {0} bytes to position {1} from file {2}", bytesRead, position, path);
// var position = fs.Position;
// _logger.LogDebug("Streamed {0} bytes to position {1} from file {2}", bytesRead, position, path);
if (bytesRead == 0)
{

View file

@ -75,7 +75,7 @@ namespace MediaBrowser.Api
public Stream RequestStream { get; set; }
}
//TODO Once we have proper apps and plugins and decide to break compatibility with paid plugins,
// TODO Once we have proper apps and plugins and decide to break compatibility with paid plugins,
// delete all these registration endpoints. They are only kept for compatibility.
[Route("/Registrations/{Name}", "GET", Summary = "Gets registration status for a feature", IsHidden = true)]
[Authenticated]

View file

@ -300,7 +300,7 @@ namespace MediaBrowser.Controller.Entities
{
get
{
//if (IsOffline)
// if (IsOffline)
//{
// return LocationType.Offline;
//}
@ -676,7 +676,7 @@ namespace MediaBrowser.Controller.Entities
/// <returns>System.String.</returns>
protected virtual string CreateSortName()
{
if (Name == null) return null; //some items may not have name filled in properly
if (Name == null) return null; // some items may not have name filled in properly
if (!EnableAlphaNumericSorting)
{
@ -736,7 +736,7 @@ namespace MediaBrowser.Controller.Entities
builder.Append(chunkBuilder);
}
//logger.LogDebug("ModifySortChunks Start: {0} End: {1}", name, builder.ToString());
// logger.LogDebug("ModifySortChunks Start: {0} End: {1}", name, builder.ToString());
return builder.ToString().RemoveDiacritics();
}
@ -1011,7 +1011,7 @@ namespace MediaBrowser.Controller.Entities
return PlayAccess.None;
}
//if (!user.IsParentalScheduleAllowed())
// if (!user.IsParentalScheduleAllowed())
//{
// return PlayAccess.None;
//}
@ -2175,7 +2175,7 @@ namespace MediaBrowser.Controller.Entities
var data = UserDataManager.GetUserData(user, this);
//I think it is okay to do this here.
// I think it is okay to do this here.
// if this is only called when a user is manually forcing something to un-played
// then it probably is what we want to do...
data.PlayCount = 0;
@ -2760,8 +2760,8 @@ namespace MediaBrowser.Controller.Entities
newOptions.ForceSave = true;
}
//var parentId = Id;
//if (!video.IsOwnedItem || video.ParentId != parentId)
// var parentId = Id;
// if (!video.IsOwnedItem || video.ParentId != parentId)
//{
// video.IsOwnedItem = true;
// video.ParentId = parentId;

View file

@ -27,7 +27,7 @@ namespace MediaBrowser.Controller.Entities
[JsonIgnore]
public override bool SupportsPeople => false;
//public override double? GetDefaultPrimaryImageAspectRatio()
// public override double? GetDefaultPrimaryImageAspectRatio()
//{
// double value = 16;
// value /= 9;

View file

@ -213,8 +213,8 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
protected virtual List<BaseItem> LoadChildren()
{
//logger.LogDebug("Loading children from {0} {1} {2}", GetType().Name, Id, Path);
//just load our children from the repo - the library will be validated and maintained in other processes
// logger.LogDebug("Loading children from {0} {1} {2}", GetType().Name, Id, Path);
// just load our children from the repo - the library will be validated and maintained in other processes
return GetCachedChildren();
}
@ -1223,7 +1223,7 @@ namespace MediaBrowser.Controller.Entities
throw new ArgumentNullException(nameof(user));
}
//the true root should return our users root folder children
// the true root should return our users root folder children
if (IsPhysicalRoot)
{
return LibraryManager.GetUserRootFolder().GetChildren(user, includeLinkedChildren);

View file

@ -47,7 +47,7 @@ namespace MediaBrowser.Controller.Entities
{
var user = query.User;
//if (query.IncludeItemTypes != null &&
// if (query.IncludeItemTypes != null &&
// query.IncludeItemTypes.Length == 1 &&
// string.Equals(query.IncludeItemTypes[0], "Playlist", StringComparison.OrdinalIgnoreCase))
//{
@ -424,7 +424,7 @@ namespace MediaBrowser.Controller.Entities
{
return new QueryResult<BaseItem>
{
Items = result.Items, //TODO Fix The co-variant conversion between T[] and BaseItem[], this can generate runtime issues if T is not BaseItem.
Items = result.Items, // TODO Fix The co-variant conversion between T[] and BaseItem[], this can generate runtime issues if T is not BaseItem.
TotalRecordCount = result.TotalRecordCount
};
}

View file

@ -77,7 +77,7 @@ namespace MediaBrowser.Controller.IO
if (string.IsNullOrEmpty(newPath))
{
//invalid shortcut - could be old or target could just be unavailable
// invalid shortcut - could be old or target could just be unavailable
logger.LogWarning("Encountered invalid shortcut: " + fullName);
continue;
}

View file

@ -147,7 +147,7 @@ namespace MediaBrowser.Controller.LiveTv
public override string ContainingFolderPath => Path;
//[JsonIgnore]
//public override string MediaType
// public override string MediaType
//{
// get
// {

View file

@ -768,7 +768,7 @@ namespace MediaBrowser.Controller.MediaEncoding
{
case "veryslow":
param += "-preset slow"; //lossless is only supported on maxwell and newer(2014+)
param += "-preset slow"; // lossless is only supported on maxwell and newer(2014+)
break;
case "slow":
@ -999,7 +999,7 @@ namespace MediaBrowser.Controller.MediaEncoding
{
if (string.IsNullOrEmpty(videoStream.Profile))
{
//return false;
// return false;
}
var requestedProfile = requestedProfiles[0];
@ -1072,7 +1072,7 @@ namespace MediaBrowser.Controller.MediaEncoding
{
if (!videoStream.Level.HasValue)
{
//return false;
// return false;
}
if (videoStream.Level.HasValue && videoStream.Level.Value > requestLevel)
@ -1930,11 +1930,11 @@ namespace MediaBrowser.Controller.MediaEncoding
break;
case Video3DFormat.FullSideBySide:
filter = "crop=iw/2:ih:0:0,setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1,scale={0}:trunc({0}/dar/2)*2";
//fsbs crop width in half,set the display aspect,crop out any black bars we may have made the scale width to requestedWidth.
// fsbs crop width in half,set the display aspect,crop out any black bars we may have made the scale width to requestedWidth.
break;
case Video3DFormat.HalfTopAndBottom:
filter = "crop=iw:ih/2:0:0,scale=(iw*2):ih),setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1,scale={0}:trunc({0}/dar/2)*2";
//htab crop height in half,scale to correct size, set the display aspect,crop out any black bars we may have made the scale width to requestedWidth
// htab crop height in half,scale to correct size, set the display aspect,crop out any black bars we may have made the scale width to requestedWidth
break;
case Video3DFormat.FullTopAndBottom:
filter = "crop=iw:ih/2:0:0,setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1,scale={0}:trunc({0}/dar/2)*2";
@ -2553,7 +2553,7 @@ namespace MediaBrowser.Controller.MediaEncoding
case "h265":
if (_mediaEncoder.SupportsDecoder("hevc_qsv") && encodingOptions.HardwareDecodingCodecs.Contains("hevc", StringComparer.OrdinalIgnoreCase))
{
//return "-c:v hevc_qsv -load_plugin hevc_hw ";
// return "-c:v hevc_qsv -load_plugin hevc_hw ";
return "-c:v hevc_qsv";
}
break;

View file

@ -213,7 +213,7 @@ namespace MediaBrowser.Controller.Net
}
catch (ObjectDisposedException)
{
//TODO Investigate and properly fix.
// TODO Investigate and properly fix.
}
lock (_activeConnections)

View file

@ -69,7 +69,7 @@ namespace MediaBrowser.LocalMetadata
public string Name => XmlProviderUtils.Name;
//After Nfo
// After Nfo
public virtual int Order => 1;
}

View file

@ -78,10 +78,10 @@ namespace MediaBrowser.LocalMetadata.Parsers
}
}
//Additional Mappings
// Additional Mappings
_validProviderIds.Add("IMDB", "Imdb");
//Fetch(item, metadataFile, settings, Encoding.GetEncoding("ISO-8859-1"), cancellationToken);
// Fetch(item, metadataFile, settings, Encoding.GetEncoding("ISO-8859-1"), cancellationToken);
Fetch(item, metadataFile, settings, Encoding.UTF8, cancellationToken);
}

View file

@ -247,14 +247,14 @@ namespace MediaBrowser.MediaEncoding.Encoder
public void SetAvailableEncoders(IEnumerable<string> list)
{
_encoders = list.ToList();
//_logger.Info("Supported encoders: {0}", string.Join(",", list.ToArray()));
// _logger.Info("Supported encoders: {0}", string.Join(",", list.ToArray()));
}
private List<string> _decoders = new List<string>();
public void SetAvailableDecoders(IEnumerable<string> list)
{
_decoders = list.ToList();
//_logger.Info("Supported decoders: {0}", string.Join(",", list.ToArray()));
// _logger.Info("Supported decoders: {0}", string.Join(",", list.ToArray()));
}
public bool SupportsEncoder(string encoder)
@ -500,11 +500,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
break;
case Video3DFormat.FullSideBySide:
vf = "crop=iw/2:ih:0:0,setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1,scale=600:trunc(600/dar/2)*2";
//fsbs crop width in half,set the display aspect,crop out any black bars we may have made the scale width to 600.
// fsbs crop width in half,set the display aspect,crop out any black bars we may have made the scale width to 600.
break;
case Video3DFormat.HalfTopAndBottom:
vf = "crop=iw:ih/2:0:0,scale=(iw*2):ih),setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1,scale=600:trunc(600/dar/2)*2";
//htab crop heigh in half,scale to correct size, set the display aspect,crop out any black bars we may have made the scale width to 600
// htab crop heigh in half,scale to correct size, set the display aspect,crop out any black bars we may have made the scale width to 600
break;
case Video3DFormat.FullTopAndBottom:
vf = "crop=iw:ih/2:0:0,setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1,scale=600:trunc(600/dar/2)*2";

View file

@ -562,7 +562,7 @@ namespace MediaBrowser.MediaEncoding.Probing
if (string.Equals(streamInfo.CodecName, "mov_text", StringComparison.OrdinalIgnoreCase))
{
// Edit: but these are also sometimes subtitles?
//return null;
// return null;
}
var stream = new MediaStream
@ -684,7 +684,7 @@ namespace MediaBrowser.MediaEncoding.Probing
stream.BitDepth = streamInfo.BitsPerRawSample;
}
//stream.IsAnamorphic = string.Equals(streamInfo.sample_aspect_ratio, "0:1", StringComparison.OrdinalIgnoreCase) ||
// stream.IsAnamorphic = string.Equals(streamInfo.sample_aspect_ratio, "0:1", StringComparison.OrdinalIgnoreCase) ||
// string.Equals(stream.AspectRatio, "2.35:1", StringComparison.OrdinalIgnoreCase) ||
// string.Equals(stream.AspectRatio, "2.40:1", StringComparison.OrdinalIgnoreCase);
@ -953,8 +953,8 @@ namespace MediaBrowser.MediaEncoding.Probing
audio.People = peoples.ToArray();
}
//var conductor = FFProbeHelpers.GetDictionaryValue(tags, "conductor");
//if (!string.IsNullOrWhiteSpace(conductor))
// var conductor = FFProbeHelpers.GetDictionaryValue(tags, "conductor");
// if (!string.IsNullOrWhiteSpace(conductor))
//{
// foreach (var person in Split(conductor, false))
// {
@ -962,8 +962,8 @@ namespace MediaBrowser.MediaEncoding.Probing
// }
//}
//var lyricist = FFProbeHelpers.GetDictionaryValue(tags, "lyricist");
//if (!string.IsNullOrWhiteSpace(lyricist))
// var lyricist = FFProbeHelpers.GetDictionaryValue(tags, "lyricist");
// if (!string.IsNullOrWhiteSpace(lyricist))
//{
// foreach (var person in Split(lyricist, false))
// {

View file

@ -130,10 +130,10 @@ namespace MediaBrowser.MediaEncoding.Subtitles
}
}
//if (header.Length > 0)
//subtitle.Header = header.ToString();
// if (header.Length > 0)
// subtitle.Header = header.ToString();
//subtitle.Renumber(1);
// subtitle.Renumber(1);
}
trackInfo.TrackEvents = trackEvents.ToArray();
return trackInfo;

View file

@ -79,11 +79,11 @@ namespace MediaBrowser.Model.Dlna
DlnaFlags.InteractiveTransferMode |
DlnaFlags.DlnaV15;
//if (isDirectStream)
// if (isDirectStream)
//{
// flagValue = flagValue | DlnaFlags.ByteBasedSeek;
//}
//else if (runtimeTicks.HasValue)
// else if (runtimeTicks.HasValue)
//{
// flagValue = flagValue | DlnaFlags.TimeBasedSeek;
//}
@ -148,11 +148,11 @@ namespace MediaBrowser.Model.Dlna
DlnaFlags.InteractiveTransferMode |
DlnaFlags.DlnaV15;
//if (isDirectStream)
// if (isDirectStream)
//{
// flagValue = flagValue | DlnaFlags.ByteBasedSeek;
//}
//else if (runtimeTicks.HasValue)
// else if (runtimeTicks.HasValue)
//{
// flagValue = flagValue | DlnaFlags.TimeBasedSeek;
//}

View file

@ -781,7 +781,7 @@ namespace MediaBrowser.Model.Dlna
if (!ConditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{
//LogConditionFailure(options.Profile, "VideoCodecProfile.ApplyConditions", applyCondition, item);
// LogConditionFailure(options.Profile, "VideoCodecProfile.ApplyConditions", applyCondition, item);
applyConditions = false;
break;
}
@ -825,7 +825,7 @@ namespace MediaBrowser.Model.Dlna
if (!ConditionProcessor.IsVideoAudioConditionSatisfied(applyCondition, audioChannels, inputAudioBitrate, inputAudioSampleRate, inputAudioBitDepth, audioProfile, isSecondaryAudio))
{
//LogConditionFailure(options.Profile, "VideoCodecProfile.ApplyConditions", applyCondition, item);
// LogConditionFailure(options.Profile, "VideoCodecProfile.ApplyConditions", applyCondition, item);
applyConditions = false;
break;
}
@ -1046,7 +1046,7 @@ namespace MediaBrowser.Model.Dlna
{
if (!ConditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{
//LogConditionFailure(profile, "VideoCodecProfile.ApplyConditions", applyCondition, mediaSource);
// LogConditionFailure(profile, "VideoCodecProfile.ApplyConditions", applyCondition, mediaSource);
applyConditions = false;
break;
}
@ -1092,7 +1092,7 @@ namespace MediaBrowser.Model.Dlna
{
if (!ConditionProcessor.IsVideoAudioConditionSatisfied(applyCondition, audioChannels, audioBitrate, audioSampleRate, audioBitDepth, audioProfile, isSecondaryAudio))
{
//LogConditionFailure(profile, "VideoAudioCodecProfile.ApplyConditions", applyCondition, mediaSource);
// LogConditionFailure(profile, "VideoAudioCodecProfile.ApplyConditions", applyCondition, mediaSource);
applyConditions = false;
break;
}

View file

@ -114,7 +114,7 @@ namespace MediaBrowser.Model.Entities
{
if (Type == MediaStreamType.Audio)
{
//if (!string.IsNullOrEmpty(Title))
// if (!string.IsNullOrEmpty(Title))
//{
// return AddLanguageIfNeeded(Title);
//}

View file

@ -506,7 +506,7 @@ namespace MediaBrowser.Providers.Manager
return false;
}
//if (!item.IsSaveLocalMetadataEnabled())
// if (!item.IsSaveLocalMetadataEnabled())
//{
// return true;
//}

View file

@ -125,7 +125,7 @@ namespace MediaBrowser.Providers.Manager
ApplySearchResult(id, refreshOptions.SearchResult);
}
//await FindIdentities(id, cancellationToken).ConfigureAwait(false);
// await FindIdentities(id, cancellationToken).ConfigureAwait(false);
id.IsAutomated = refreshOptions.IsAutomated;
var result = await RefreshWithProviders(metadataResult, id, refreshOptions, providers, itemImageProvider, cancellationToken).ConfigureAwait(false);
@ -252,7 +252,7 @@ namespace MediaBrowser.Providers.Manager
private void AddPersonImage(Person personEntity, LibraryOptions libraryOptions, string imageUrl, CancellationToken cancellationToken)
{
//if (libraryOptions.DownloadImagesInAdvance)
// if (libraryOptions.DownloadImagesInAdvance)
//{
// try
// {
@ -772,14 +772,14 @@ namespace MediaBrowser.Providers.Manager
}
}
//var isUnidentified = failedProviderCount > 0 && successfulProviderCount == 0;
// var isUnidentified = failedProviderCount > 0 && successfulProviderCount == 0;
foreach (var provider in customProviders.Where(i => !(i is IPreRefreshProvider)))
{
await RunCustomProvider(provider, item, logName, options, refreshResult, cancellationToken).ConfigureAwait(false);
}
//ImportUserData(item, userDataList, cancellationToken);
// ImportUserData(item, userDataList, cancellationToken);
return refreshResult;
}
@ -906,7 +906,7 @@ namespace MediaBrowser.Providers.Manager
{
var hasChanged = changeMonitor.HasChanged(item, directoryService);
//if (hasChanged)
// if (hasChanged)
//{
// logger.LogDebug("{0} reports change to {1}", changeMonitor.GetType().Name, item.Path ?? item.Name);
//}

View file

@ -831,7 +831,7 @@ namespace MediaBrowser.Providers.Manager
}
}
//_logger.LogDebug("Returning search results {0}", _json.SerializeToString(resultList));
// _logger.LogDebug("Returning search results {0}", _json.SerializeToString(resultList));
return resultList;
}

View file

@ -91,8 +91,8 @@ namespace MediaBrowser.Providers.MediaInfo
audio.RunTimeTicks = mediaInfo.RunTimeTicks;
audio.Size = mediaInfo.Size;
//var extension = (Path.GetExtension(audio.Path) ?? string.Empty).TrimStart('.');
//audio.Container = extension;
// var extension = (Path.GetExtension(audio.Path) ?? string.Empty).TrimStart('.');
// audio.Container = extension;
FetchDataFromTags(audio, mediaInfo);

View file

@ -176,7 +176,7 @@ namespace MediaBrowser.Providers.MediaInfo
mediaAttachments = mediaInfo.MediaAttachments;
video.TotalBitrate = mediaInfo.Bitrate;
//video.FormatName = (mediaInfo.Container ?? string.Empty)
// video.FormatName = (mediaInfo.Container ?? string.Empty)
// .Replace("matroska", "mkv", StringComparison.OrdinalIgnoreCase);
// For dvd's this may not always be accurate, so don't set the runtime if the item already has one
@ -283,7 +283,7 @@ namespace MediaBrowser.Providers.MediaInfo
{
var video = (Video)item;
//video.PlayableStreamFileNames = blurayInfo.Files.ToList();
// video.PlayableStreamFileNames = blurayInfo.Files.ToList();
// Use BD Info if it has multiple m2ts. Otherwise, treat it like a video file and rely more on ffprobe output
if (blurayInfo.Files.Length > 1)

View file

@ -189,9 +189,9 @@ namespace MediaBrowser.Providers.MediaInfo
filename = filename.Replace(" ", string.Empty);
// can't normalize this due to languages such as pt-br
//filename = filename.Replace("-", string.Empty);
// filename = filename.Replace("-", string.Empty);
//filename = filename.Replace(".", string.Empty);
// filename = filename.Replace(".", string.Empty);
return filename;
}

View file

@ -85,7 +85,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
private void ProcessResult(MusicArtist item, Artist result, string preferredLanguage)
{
//item.HomePageUrl = result.strWebsite;
// item.HomePageUrl = result.strWebsite;
if (!string.IsNullOrEmpty(result.strGenre))
{

View file

@ -77,7 +77,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
&& int.TryParse(result.imdbVotes, NumberStyles.Number, _usCulture, out var voteCount)
&& voteCount >= 0)
{
//item.VoteCount = voteCount;
// item.VoteCount = voteCount;
}
if (!string.IsNullOrEmpty(result.imdbRating)
@ -178,7 +178,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
&& int.TryParse(result.imdbVotes, NumberStyles.Number, _usCulture, out var voteCount)
&& voteCount >= 0)
{
//item.VoteCount = voteCount;
// item.VoteCount = voteCount;
}
if (!string.IsNullOrEmpty(result.imdbRating)

View file

@ -131,7 +131,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
movie.Overview = string.IsNullOrWhiteSpace(movieData.Overview) ? null : WebUtility.HtmlDecode(movieData.Overview);
movie.Overview = movie.Overview != null ? movie.Overview.Replace("\n\n", "\n") : null;
//movie.HomePageUrl = movieData.homepage;
// movie.HomePageUrl = movieData.homepage;
if (!string.IsNullOrEmpty(movieData.Tagline))
{
@ -167,7 +167,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
movie.CommunityRating = rating;
}
//movie.VoteCount = movieData.vote_count;
// movie.VoteCount = movieData.vote_count;
if (movieData.Releases != null && movieData.Releases.Countries != null)
{
@ -201,7 +201,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
}
}
//studios
// studios
if (movieData.Production_Companies != null)
{
movie.SetStudios(movieData.Production_Companies.Select(c => c.Name));
@ -219,8 +219,8 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
resultItem.ResetPeople();
var tmdbImageUrl = settings.images.GetImageUrl("original");
//Actors, Directors, Writers - all in People
//actors come from cast
// Actors, Directors, Writers - all in People
// actors come from cast
if (movieData.Casts != null && movieData.Casts.Cast != null)
{
foreach (var actor in movieData.Casts.Cast.OrderBy(a => a.Order))
@ -247,7 +247,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
}
}
//and the rest from crew
// and the rest from crew
if (movieData.Casts?.Crew != null)
{
var keepTypes = new[]
@ -289,7 +289,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
}
}
//if (movieData.keywords != null && movieData.keywords.keywords != null)
// if (movieData.keywords != null && movieData.keywords.keywords != null)
//{
// movie.Keywords = movieData.keywords.keywords.Select(i => i.name).ToList();
//}

View file

@ -94,7 +94,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
if (results.Count == 0)
{
//try in english if wasn't before
// try in english if wasn't before
if (!string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
{
results = await GetSearchResults(name, searchType, year, "en", tmdbImageUrl, cancellationToken).ConfigureAwait(false);
@ -128,7 +128,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
if (results.Count == 0 && !string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
{
//one more time, in english
// one more time, in english
results = await GetSearchResults(name2, searchType, year, "en", tmdbImageUrl, cancellationToken).ConfigureAwait(false);
}
}

View file

@ -167,7 +167,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
// TODO: This should go in PersonMetadataService, not each person provider
item.Name = id.Name;
//item.HomePageUrl = info.homepage;
// item.HomePageUrl = info.homepage;
if (!string.IsNullOrWhiteSpace(info.Place_Of_Birth))
{

View file

@ -141,8 +141,8 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
var credits = response.Credits;
if (credits != null)
{
//Actors, Directors, Writers - all in People
//actors come from cast
// Actors, Directors, Writers - all in People
// actors come from cast
if (credits.Cast != null)
{
foreach (var actor in credits.Cast.OrderBy(a => a.Order))
@ -160,7 +160,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
}
}
//and the rest from crew
// and the rest from crew
if (credits.Crew != null)
{
var keepTypes = new[]

View file

@ -63,7 +63,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
result.Item = new Season();
// Don't use moviedb season names for now until if/when we have field-level configuration
//result.Item.Name = seasonInfo.name;
// result.Item.Name = seasonInfo.name;
result.Item.Name = info.Name;
@ -79,17 +79,17 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
var credits = seasonInfo.Credits;
if (credits != null)
{
//Actors, Directors, Writers - all in People
//actors come from cast
// Actors, Directors, Writers - all in People
// actors come from cast
if (credits.Cast != null)
{
//foreach (var actor in credits.cast.OrderBy(a => a.order)) result.Item.AddPerson(new PersonInfo { Name = actor.name.Trim(), Role = actor.character, Type = PersonType.Actor, SortOrder = actor.order });
// foreach (var actor in credits.cast.OrderBy(a => a.order)) result.Item.AddPerson(new PersonInfo { Name = actor.name.Trim(), Role = actor.character, Type = PersonType.Actor, SortOrder = actor.order });
}
//and the rest from crew
// and the rest from crew
if (credits.Crew != null)
{
//foreach (var person in credits.crew) result.Item.AddPerson(new PersonInfo { Name = person.name.Trim(), Role = person.job, Type = person.department });
// foreach (var person in credits.crew) result.Item.AddPerson(new PersonInfo { Name = person.name.Trim(), Role = person.job, Type = person.department });
}
}

View file

@ -40,11 +40,11 @@ namespace MediaBrowser.Providers.TV
if (hasNewSeasons)
{
//var directoryService = new DirectoryService(_fileSystem);
// var directoryService = new DirectoryService(_fileSystem);
//await series.RefreshMetadata(new MetadataRefreshOptions(directoryService), cancellationToken).ConfigureAwait(false);
// await series.RefreshMetadata(new MetadataRefreshOptions(directoryService), cancellationToken).ConfigureAwait(false);
//await series.ValidateChildren(new SimpleProgress<double>(), cancellationToken, new MetadataRefreshOptions(directoryService))
// await series.ValidateChildren(new SimpleProgress<double>(), cancellationToken, new MetadataRefreshOptions(directoryService))
// .ConfigureAwait(false);
}

View file

@ -46,7 +46,7 @@ namespace Rssdp.Infrastructure
{
var lines = data.Split(LineTerminators, StringSplitOptions.None);
//First line is the 'request' line containing http protocol details like method, uri, http version etc.
// First line is the 'request' line containing http protocol details like method, uri, http version etc.
ParseStatusLine(lines[0], message);
ParseHeaders(headers, retVal.Headers, lines);
@ -93,16 +93,16 @@ namespace Rssdp.Infrastructure
/// <param name="contentHeaders">A reference to a <see cref="System.Net.Http.Headers.HttpHeaders"/> collection for the message content, to which the parsed header will be added.</param>
private void ParseHeader(string line, System.Net.Http.Headers.HttpHeaders headers, System.Net.Http.Headers.HttpHeaders contentHeaders)
{
//Header format is
//name: value
// Header format is
// name: value
var headerKeySeparatorIndex = line.IndexOf(":", StringComparison.OrdinalIgnoreCase);
var headerName = line.Substring(0, headerKeySeparatorIndex).Trim();
var headerValue = line.Substring(headerKeySeparatorIndex + 1).Trim();
//Not sure how to determine where request headers and and content headers begin,
//at least not without a known set of headers (general headers first the content headers)
//which seems like a bad way of doing it. So we'll assume if it's a known content header put it there
//else use request headers.
// Not sure how to determine where request headers and and content headers begin,
// at least not without a known set of headers (general headers first the content headers)
// which seems like a bad way of doing it. So we'll assume if it's a known content header put it there
// else use request headers.
var values = ParseValues(headerValue);
var headersToAddTo = IsContentHeader(headerName) ? contentHeaders : headers;
@ -115,13 +115,13 @@ namespace Rssdp.Infrastructure
private int ParseHeaders(System.Net.Http.Headers.HttpHeaders headers, System.Net.Http.Headers.HttpHeaders contentHeaders, string[] lines)
{
//Blank line separates headers from content, so read headers until we find blank line.
// Blank line separates headers from content, so read headers until we find blank line.
int lineIndex = 1;
string line = null, nextLine = null;
while (lineIndex + 1 < lines.Length && !String.IsNullOrEmpty((line = lines[lineIndex++])))
{
//If the following line starts with space or tab (or any whitespace), it is really part of this header but split for human readability.
//Combine these lines into a single comma separated style header for easier parsing.
// If the following line starts with space or tab (or any whitespace), it is really part of this header but split for human readability.
// Combine these lines into a single comma separated style header for easier parsing.
while (lineIndex < lines.Length && !String.IsNullOrEmpty((nextLine = lines[lineIndex])))
{
if (nextLine.Length > 0 && Char.IsWhiteSpace(nextLine[0]))

View file

@ -485,9 +485,9 @@ namespace Rssdp.Infrastructure
private void OnRequestReceived(HttpRequestMessage data, IPEndPoint remoteEndPoint, IPAddress receivedOnLocalIpAddress)
{
//SSDP specification says only * is currently used but other uri's might
//be implemented in the future and should be ignored unless understood.
//Section 4.2 - http://tools.ietf.org/html/draft-cai-ssdp-v1-03#page-11
// SSDP specification says only * is currently used but other uri's might
// be implemented in the future and should be ignored unless understood.
// Section 4.2 - http://tools.ietf.org/html/draft-cai-ssdp-v1-03#page-11
if (data.RequestUri.ToString() != "*")
{
return;

View file

@ -337,7 +337,7 @@ namespace Rssdp.Infrastructure
values["HOST"] = "239.255.255.250:1900";
values["USER-AGENT"] = "UPnP/1.0 DLNADOC/1.50 Platinum/1.0.4.2";
//values["X-EMBY-SERVERID"] = _appHost.SystemId;
// values["X-EMBY-SERVERID"] = _appHost.SystemId;
values["MAN"] = "\"ssdp:discover\"";

View file

@ -205,25 +205,25 @@ namespace Rssdp.Infrastructure
return;
}
//WriteTrace(String.Format("Search Request Received From {0}, Target = {1}", remoteEndPoint.ToString(), searchTarget));
// WriteTrace(String.Format("Search Request Received From {0}, Target = {1}", remoteEndPoint.ToString(), searchTarget));
if (IsDuplicateSearchRequest(searchTarget, remoteEndPoint))
{
//WriteTrace("Search Request is Duplicate, ignoring.");
// WriteTrace("Search Request is Duplicate, ignoring.");
return;
}
//Wait on random interval up to MX, as per SSDP spec.
//Also, as per UPnP 1.1/SSDP spec ignore missing/bank MX header. If over 120, assume random value between 0 and 120.
//Using 16 as minimum as that's often the minimum system clock frequency anyway.
// Wait on random interval up to MX, as per SSDP spec.
// Also, as per UPnP 1.1/SSDP spec ignore missing/bank MX header. If over 120, assume random value between 0 and 120.
// Using 16 as minimum as that's often the minimum system clock frequency anyway.
int maxWaitInterval = 0;
if (String.IsNullOrEmpty(mx))
{
//Windows Explorer is poorly behaved and doesn't supply an MX header value.
//if (this.SupportPnpRootDevice)
// Windows Explorer is poorly behaved and doesn't supply an MX header value.
// if (this.SupportPnpRootDevice)
mx = "1";
//else
//return;
// else
// return;
}
if (!Int32.TryParse(mx, out maxWaitInterval) || maxWaitInterval <= 0) return;
@ -231,10 +231,10 @@ namespace Rssdp.Infrastructure
if (maxWaitInterval > 120)
maxWaitInterval = _Random.Next(0, 120);
//Do not block synchronously as that may tie up a threadpool thread for several seconds.
// Do not block synchronously as that may tie up a threadpool thread for several seconds.
Task.Delay(_Random.Next(16, (maxWaitInterval * 1000))).ContinueWith((parentTask) =>
{
//Copying devices to local array here to avoid threading issues/enumerator exceptions.
// Copying devices to local array here to avoid threading issues/enumerator exceptions.
IEnumerable<SsdpDevice> devices = null;
lock (_Devices)
{
@ -251,7 +251,7 @@ namespace Rssdp.Infrastructure
if (devices != null)
{
var deviceList = devices.ToList();
//WriteTrace(String.Format("Sending {0} search responses", deviceList.Count));
// WriteTrace(String.Format("Sending {0} search responses", deviceList.Count));
foreach (var device in deviceList)
{
@ -264,7 +264,7 @@ namespace Rssdp.Infrastructure
}
else
{
//WriteTrace(String.Format("Sending 0 search responses."));
// WriteTrace(String.Format("Sending 0 search responses."));
}
});
}
@ -308,7 +308,7 @@ namespace Rssdp.Infrastructure
{
var rootDevice = device.ToRootDevice();
//var additionalheaders = FormatCustomHeadersForResponse(device);
// var additionalheaders = FormatCustomHeadersForResponse(device);
const string header = "HTTP/1.1 200 OK";
@ -338,7 +338,7 @@ namespace Rssdp.Infrastructure
}
//WriteTrace(String.Format("Sent search response to " + endPoint.ToString()), device);
// WriteTrace(String.Format("Sent search response to " + endPoint.ToString()), device);
}
private bool IsDuplicateSearchRequest(string searchTarget, IPEndPoint endPoint)
@ -384,7 +384,7 @@ namespace Rssdp.Infrastructure
{
if (IsDisposed) return;
//WriteTrace("Begin Sending Alive Notifications For All Devices");
// WriteTrace("Begin Sending Alive Notifications For All Devices");
SsdpRootDevice[] devices;
lock (_Devices)
@ -399,7 +399,7 @@ namespace Rssdp.Infrastructure
SendAliveNotifications(device, true, CancellationToken.None);
}
//WriteTrace("Completed Sending Alive Notifications For All Devices");
// WriteTrace("Completed Sending Alive Notifications For All Devices");
}
catch (ObjectDisposedException ex)
{
@ -448,7 +448,7 @@ namespace Rssdp.Infrastructure
_CommsServer.SendMulticastMessage(message, _sendOnlyMatchedHost ? rootDevice.Address : null, cancellationToken);
//WriteTrace(String.Format("Sent alive notification"), device);
// WriteTrace(String.Format("Sent alive notification"), device);
}
private Task SendByeByeNotifications(SsdpDevice device, bool isRoot, CancellationToken cancellationToken)
@ -533,7 +533,7 @@ namespace Rssdp.Infrastructure
{
LogFunction(text);
}
//System.Diagnostics.Debug.WriteLine(text, "SSDP Publisher");
// System.Diagnostics.Debug.WriteLine(text, "SSDP Publisher");
}
private void WriteTrace(string text, SsdpDevice device)
@ -551,13 +551,13 @@ namespace Rssdp.Infrastructure
if (string.Equals(e.Message.Method.Method, SsdpConstants.MSearchMethod, StringComparison.OrdinalIgnoreCase))
{
//According to SSDP/UPnP spec, ignore message if missing these headers.
// According to SSDP/UPnP spec, ignore message if missing these headers.
// Edit: But some devices do it anyway
//if (!e.Message.Headers.Contains("MX"))
// if (!e.Message.Headers.Contains("MX"))
// WriteTrace("Ignoring search request - missing MX header.");
//else if (!e.Message.Headers.Contains("MAN"))
// else if (!e.Message.Headers.Contains("MAN"))
// WriteTrace("Ignoring search request - missing MAN header.");
//else
// else
ProcessSearchRequest(GetFirstHeaderValue(e.Message.Headers, "MX"), GetFirstHeaderValue(e.Message.Headers, "ST"), e.ReceivedFrom, e.LocalIpAddress, CancellationToken.None);
}
}