Reformat JustAMan review pt2 changes

Refs #575
This commit is contained in:
Erwin de Haan
2019-01-17 20:24:39 +01:00
parent 321c440739
commit 38f96af079
150 changed files with 97 additions and 189 deletions

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.ApiClient
{
public class ServerDiscoveryInfo

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Branding
{
public class BrandingOptions

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Channels
{
public class ChannelInfo

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Configuration
{
public class AccessSchedule

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Configuration
{
public enum DynamicDayOfWeek

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Configuration
{
public class EncodingOptions

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Configuration
{
public class FanartOptions

View File

@@ -108,7 +108,7 @@ namespace MediaBrowser.Model.Configuration
}
}
if (DefaultImageOptions.TryGetValue(Type, out var options))
if (DefaultImageOptions.TryGetValue(Type, out ImageOption[] options))
{
foreach (var i in options)
{

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Configuration
{
public class MetadataConfiguration

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Configuration
{
public class XbmcMetadataOptions

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Connect
{
public class ConnectUser

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Connect
{
public class ConnectUserQuery

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Connect
{
public enum UserLinkType

View File

@@ -1,4 +1,3 @@
using System;
namespace MediaBrowser.Model.Devices

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Devices
{
public class LocalFileInfo

View File

@@ -31,7 +31,7 @@ namespace MediaBrowser.Model.Dlna
string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}",
DlnaMaps.FlagsToString(flagValue));
var mediaProfile = _profile.GetImageMediaProfile(container,
ResponseProfile mediaProfile = _profile.GetImageMediaProfile(container,
width,
height);
@@ -83,7 +83,7 @@ namespace MediaBrowser.Model.Dlna
string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}",
DlnaMaps.FlagsToString(flagValue));
var mediaProfile = _profile.GetAudioMediaProfile(container,
ResponseProfile mediaProfile = _profile.GetAudioMediaProfile(container,
audioCodec,
audioChannels,
audioBitrate,
@@ -148,7 +148,7 @@ namespace MediaBrowser.Model.Dlna
string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}",
DlnaMaps.FlagsToString(flagValue));
var mediaProfile = _profile.GetVideoMediaProfile(container,
ResponseProfile mediaProfile = _profile.GetVideoMediaProfile(container,
audioCodec,
videoCodec,
width,

View File

@@ -191,7 +191,7 @@ namespace MediaBrowser.Model.Dlna
var conditionProcessor = new ConditionProcessor();
var anyOff = false;
foreach (var c in i.Conditions)
foreach (ProfileCondition c in i.Conditions)
{
if (!conditionProcessor.IsAudioConditionSatisfied(GetModelProfileCondition(c), audioChannels, audioBitrate, audioSampleRate, audioBitDepth))
{
@@ -304,7 +304,7 @@ namespace MediaBrowser.Model.Dlna
var conditionProcessor = new ConditionProcessor();
var anyOff = false;
foreach (var c in i.Conditions)
foreach (ProfileCondition c in i.Conditions)
{
if (!conditionProcessor.IsVideoConditionSatisfied(GetModelProfileCondition(c), width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Dlna
{
public class DeviceProfileInfo

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Dlna
{
public enum MediaFormatProfile

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Dlna
{
public enum PlaybackErrorCode

View File

@@ -32,7 +32,7 @@ namespace MediaBrowser.Model.Dlna
ValidateAudioInput(options);
var mediaSources = new List<MediaSourceInfo>();
foreach (var i in options.MediaSources)
foreach (MediaSourceInfo i in options.MediaSources)
{
if (string.IsNullOrEmpty(options.MediaSourceId) ||
StringHelper.EqualsIgnoreCase(i.Id, options.MediaSourceId))
@@ -42,16 +42,16 @@ namespace MediaBrowser.Model.Dlna
}
var streams = new List<StreamInfo>();
foreach (var i in mediaSources)
foreach (MediaSourceInfo i in mediaSources)
{
var streamInfo = BuildAudioItem(i, options);
StreamInfo streamInfo = BuildAudioItem(i, options);
if (streamInfo != null)
{
streams.Add(streamInfo);
}
}
foreach (var stream in streams)
foreach (StreamInfo stream in streams)
{
stream.DeviceId = options.DeviceId;
stream.DeviceProfileId = options.Profile.Id;
@@ -65,7 +65,7 @@ namespace MediaBrowser.Model.Dlna
ValidateInput(options);
var mediaSources = new List<MediaSourceInfo>();
foreach (var i in options.MediaSources)
foreach (MediaSourceInfo i in options.MediaSources)
{
if (string.IsNullOrEmpty(options.MediaSourceId) ||
StringHelper.EqualsIgnoreCase(i.Id, options.MediaSourceId))
@@ -75,7 +75,7 @@ namespace MediaBrowser.Model.Dlna
}
var streams = new List<StreamInfo>();
foreach (var i in mediaSources)
foreach (MediaSourceInfo i in mediaSources)
{
var streamInfo = BuildVideoItem(i, options);
if (streamInfo != null)
@@ -84,7 +84,7 @@ namespace MediaBrowser.Model.Dlna
}
}
foreach (var stream in streams)
foreach (StreamInfo stream in streams)
{
stream.DeviceId = options.DeviceId;
stream.DeviceProfileId = options.Profile.Id;
@@ -97,7 +97,7 @@ namespace MediaBrowser.Model.Dlna
{
var sorted = SortMediaSources(streams, maxBitrate);
foreach (var stream in sorted)
foreach (StreamInfo stream in sorted)
{
return stream;
}
@@ -333,7 +333,7 @@ namespace MediaBrowser.Model.Dlna
if (i.Type == CodecType.Audio && i.ContainsAnyCodec(audioCodec, item.Container))
{
bool applyConditions = true;
foreach (var applyCondition in i.ApplyConditions)
foreach (ProfileCondition applyCondition in i.ApplyConditions)
{
if (!conditionProcessor.IsAudioConditionSatisfied(applyCondition, inputAudioChannels, inputAudioBitrate, inputAudioSampleRate, inputAudioBitDepth))
{
@@ -345,7 +345,7 @@ namespace MediaBrowser.Model.Dlna
if (applyConditions)
{
foreach (var c in i.Conditions)
foreach (ProfileCondition c in i.Conditions)
{
conditions.Add(c);
}
@@ -354,7 +354,7 @@ namespace MediaBrowser.Model.Dlna
}
bool all = true;
foreach (var c in conditions)
foreach (ProfileCondition c in conditions)
{
if (!conditionProcessor.IsAudioConditionSatisfied(c, inputAudioChannels, inputAudioBitrate, inputAudioSampleRate, inputAudioBitDepth))
{
@@ -431,7 +431,7 @@ namespace MediaBrowser.Model.Dlna
if (applyConditions)
{
foreach (var c in i.Conditions)
foreach (ProfileCondition c in i.Conditions)
{
audioTranscodingConditions.Add(c);
}
@@ -811,7 +811,7 @@ namespace MediaBrowser.Model.Dlna
if (i.Type == CodecType.Video && i.ContainsAnyCodec(transcodingProfile.VideoCodec, transcodingProfile.Container))
{
bool applyConditions = true;
foreach (var applyCondition in i.ApplyConditions)
foreach (ProfileCondition applyCondition in i.ApplyConditions)
{
int? width = videoStream == null ? null : videoStream.Width;
int? height = videoStream == null ? null : videoStream.Height;
@@ -867,7 +867,7 @@ namespace MediaBrowser.Model.Dlna
if (i.Type == CodecType.VideoAudio && i.ContainsAnyCodec(transcodingProfile.AudioCodec, transcodingProfile.Container))
{
bool applyConditions = true;
foreach (var applyCondition in i.ApplyConditions)
foreach (ProfileCondition applyCondition in i.ApplyConditions)
{
bool? isSecondaryAudio = audioStream == null ? null : item.IsSecondaryAudio(audioStream);
int? inputAudioBitrate = audioStream == null ? null : audioStream.BitRate;
@@ -997,7 +997,7 @@ namespace MediaBrowser.Model.Dlna
bool isEligibleForDirectPlay,
bool isEligibleForDirectStream)
{
var profile = options.Profile;
DeviceProfile profile = options.Profile;
if (options.ForceDirectPlay)
{
@@ -1071,7 +1071,7 @@ namespace MediaBrowser.Model.Dlna
int? numVideoStreams = mediaSource.GetStreamCount(MediaStreamType.Video);
// Check container conditions
foreach (var i in conditions)
foreach (ProfileCondition i in conditions)
{
if (!conditionProcessor.IsVideoConditionSatisfied(i, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{
@@ -1094,7 +1094,7 @@ namespace MediaBrowser.Model.Dlna
if (i.Type == CodecType.Video && i.ContainsAnyCodec(videoCodec, container))
{
bool applyConditions = true;
foreach (var applyCondition in i.ApplyConditions)
foreach (ProfileCondition applyCondition in i.ApplyConditions)
{
if (!conditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{
@@ -1106,7 +1106,7 @@ namespace MediaBrowser.Model.Dlna
if (applyConditions)
{
foreach (var c in i.Conditions)
foreach (ProfileCondition c in i.Conditions)
{
conditions.Add(c);
}
@@ -1114,7 +1114,7 @@ namespace MediaBrowser.Model.Dlna
}
}
foreach (var i in conditions)
foreach (ProfileCondition i in conditions)
{
if (!conditionProcessor.IsVideoConditionSatisfied(i, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{
@@ -1141,7 +1141,7 @@ namespace MediaBrowser.Model.Dlna
if (i.Type == CodecType.VideoAudio && i.ContainsAnyCodec(audioCodec, container))
{
bool applyConditions = true;
foreach (var applyCondition in i.ApplyConditions)
foreach (ProfileCondition applyCondition in i.ApplyConditions)
{
if (!conditionProcessor.IsVideoAudioConditionSatisfied(applyCondition, audioChannels, audioBitrate, audioSampleRate, audioBitDepth, audioProfile, isSecondaryAudio))
{
@@ -1153,7 +1153,7 @@ namespace MediaBrowser.Model.Dlna
if (applyConditions)
{
foreach (var c in i.Conditions)
foreach (ProfileCondition c in i.Conditions)
{
conditions.Add(c);
}
@@ -1161,7 +1161,7 @@ namespace MediaBrowser.Model.Dlna
}
}
foreach (var i in conditions)
foreach (ProfileCondition i in conditions)
{
if (!conditionProcessor.IsVideoAudioConditionSatisfied(i, audioChannels, audioBitrate, audioSampleRate, audioBitDepth, audioProfile, isSecondaryAudio))
{
@@ -1466,7 +1466,7 @@ namespace MediaBrowser.Model.Dlna
private void ApplyTranscodingConditions(StreamInfo item, IEnumerable<ProfileCondition> conditions, string qualifier, bool enableQualifiedConditions, bool enableNonQualifiedConditions)
{
foreach (var condition in conditions)
foreach (ProfileCondition condition in conditions)
{
string value = condition.Value;

View File

@@ -145,7 +145,7 @@ namespace MediaBrowser.Model.Dlna
}
var list = new List<string>();
foreach (var pair in BuildParams(this, accessToken))
foreach (NameValuePair pair in BuildParams(this, accessToken))
{
if (string.IsNullOrEmpty(pair.Value))
{
@@ -349,7 +349,7 @@ namespace MediaBrowser.Model.Dlna
var newList = new List<SubtitleStreamInfo>();
// First add the selected track
foreach (var stream in list)
foreach (SubtitleStreamInfo stream in list)
{
if (stream.DeliveryMethod == SubtitleDeliveryMethod.External)
{

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Drawing
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Drawing
{
public enum ImageOrientation

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Dto
{
public interface IHasServerId

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Dto
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Dto
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Dto
{
public class NameValuePair

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
public class EmptyRequestResult

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
public enum ExtraType

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
public class MediaUrl

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>

View File

@@ -48,7 +48,7 @@ namespace MediaBrowser.Model.Entities
return null;
}
instance.ProviderIds.TryGetValue(name, out var id);
instance.ProviderIds.TryGetValue(name, out string id);
return id;
}

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
public enum Video3DFormat

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Globalization
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.IO
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.IO
{
public interface IShortcutHandler

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.IO
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Library
{
public enum PlayAccess

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.LiveTv
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.LiveTv
{
public enum RecordingStatus

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.MediaInfo
{
public class Container

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.MediaInfo
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.MediaInfo
{
public class SubtitleTrackEvent

View File

@@ -1,4 +1,3 @@
using System.IO;
namespace MediaBrowser.Model.Net

View File

@@ -132,7 +132,7 @@ namespace MediaBrowser.Model.Net
var ext = Path.GetExtension(path) ?? string.Empty;
if (MimeTypeLookup.TryGetValue(ext, out var result))
if (MimeTypeLookup.TryGetValue(ext, out string result))
{
return result;
}
@@ -338,7 +338,7 @@ namespace MediaBrowser.Model.Net
// handle text/html; charset=UTF-8
mimeType = mimeType.Split(';')[0];
if (ExtensionLookup.TryGetValue(mimeType, out var result))
if (ExtensionLookup.TryGetValue(mimeType, out string result))
{
return result;
}

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Net
{
public class NetworkShare

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Net
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Net
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Net
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Notifications
{
public enum NotificationLevel

View File

@@ -77,7 +77,7 @@ namespace MediaBrowser.Model.Notifications
public NotificationOption GetOptions(string type)
{
foreach (var i in Options)
foreach (NotificationOption i in Options)
{
if (StringHelper.EqualsIgnoreCase(type, i.Type)) return i;
}
@@ -86,14 +86,14 @@ namespace MediaBrowser.Model.Notifications
public bool IsEnabled(string type)
{
var opt = GetOptions(type);
NotificationOption opt = GetOptions(type);
return opt != null && opt.Enabled;
}
public bool IsServiceEnabled(string service, string notificationType)
{
var opt = GetOptions(notificationType);
NotificationOption opt = GetOptions(notificationType);
return opt == null ||
!ListHelper.ContainsIgnoreCase(opt.DisabledServices, service);
@@ -101,7 +101,7 @@ namespace MediaBrowser.Model.Notifications
public bool IsEnabledToMonitorUser(string type, Guid userId)
{
var opt = GetOptions(type);
NotificationOption opt = GetOptions(type);
return opt != null && opt.Enabled &&
!ListHelper.ContainsIgnoreCase(opt.DisabledMonitorUsers, userId.ToString(""));
@@ -109,7 +109,7 @@ namespace MediaBrowser.Model.Notifications
public bool IsEnabledToSendToUser(string type, string userId, UserPolicy userPolicy)
{
var opt = GetOptions(type);
NotificationOption opt = GetOptions(type);
if (opt != null && opt.Enabled)
{

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Playlists
{
public class PlaylistCreationResult

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Plugins
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Providers
{
public class ExternalIdInfo

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Querying
{
public class EpisodeQuery

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Querying
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Querying
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Querying
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Querying
{
public class MovieRecommendationQuery

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Querying
{
public class QueryResult<T>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Querying
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Querying
{
public class UserQuery

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Search
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Services
{
public interface IHasRequestFilter

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Services
{
// marker interface

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Session
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Session
{
public class MessageCommand

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Session
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Session
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Sync
{
public enum SyncCategory

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Sync
{
public enum SyncJobStatus

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Sync
{
public class SyncTarget

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Tasks
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Tasks
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Tasks
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Tasks
{
public class TaskOptions

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Tasks
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Updates
{
/// <summary>

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Users
{
public enum ForgotPasswordAction

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Users
{
public class PinRedeemResult

View File

@@ -1,4 +1,3 @@
namespace MediaBrowser.Model.Users
{
public enum UserActionType