Refactor: standardize namespace and using directive style
Refactored all C# test files to use explicit namespace declarations and moved all using directives inside the namespace block for consistency. Updated assembly info and cache files to reflect the new build. Adjusted MvcTestingAppManifest.json to use fully qualified assembly names. No functional changes; all updates are related to code style, organization, and project metadata.
This commit is contained in:
@@ -4,35 +4,33 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using global::System;
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo
|
||||
{
|
||||
public static class AudioCodec
|
||||
{
|
||||
public static string GetFriendlyName(string codec)
|
||||
{
|
||||
if (codec.Length == 0)
|
||||
{
|
||||
return codec;
|
||||
}
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
public static class AudioCodec
|
||||
{
|
||||
public static string GetFriendlyName(string codec)
|
||||
{
|
||||
if (codec.Length == 0)
|
||||
{
|
||||
return codec;
|
||||
}
|
||||
|
||||
if (string.Equals(codec, "ac3", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "Dolby Digital";
|
||||
}
|
||||
if (string.Equals(codec, "ac3", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "Dolby Digital";
|
||||
}
|
||||
|
||||
if (string.Equals(codec, "eac3", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "Dolby Digital+";
|
||||
}
|
||||
if (string.Equals(codec, "eac3", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "Dolby Digital+";
|
||||
}
|
||||
|
||||
if (string.Equals(codec, "dca", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "DTS";
|
||||
}
|
||||
if (string.Equals(codec, "dca", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "DTS";
|
||||
}
|
||||
|
||||
return codec.ToUpperInvariant();
|
||||
}
|
||||
}
|
||||
}
|
||||
return codec.ToUpperInvariant();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
|
||||
using global::System;
|
||||
|
||||
/// <summary>
|
||||
/// How is the audio index determined.
|
||||
/// </summary>
|
||||
@@ -30,5 +30,5 @@ public enum AudioIndexSource
|
||||
/// <summary>
|
||||
/// The index is specified by the user.
|
||||
/// </summary>
|
||||
User = 1 << 2
|
||||
User = 1 << 2,
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
|
||||
#nullable disable
|
||||
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the result of BDInfo output.
|
||||
/// </summary>
|
||||
|
||||
@@ -5,48 +5,46 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using global::System;
|
||||
using global::System.Collections.Generic;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo
|
||||
{
|
||||
public class LiveStreamRequest
|
||||
{
|
||||
public LiveStreamRequest()
|
||||
{
|
||||
EnableDirectPlay = true;
|
||||
EnableDirectStream = true;
|
||||
AlwaysBurnInSubtitleWhenTranscoding = false;
|
||||
DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http };
|
||||
}
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
public class LiveStreamRequest
|
||||
{
|
||||
public LiveStreamRequest()
|
||||
{
|
||||
EnableDirectPlay = true;
|
||||
EnableDirectStream = true;
|
||||
AlwaysBurnInSubtitleWhenTranscoding = false;
|
||||
DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http };
|
||||
}
|
||||
|
||||
public string OpenToken { get; set; }
|
||||
public string OpenToken { get; set; }
|
||||
|
||||
public Guid UserId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
public string PlaySessionId { get; set; }
|
||||
public string PlaySessionId { get; set; }
|
||||
|
||||
public int? MaxStreamingBitrate { get; set; }
|
||||
public int? MaxStreamingBitrate { get; set; }
|
||||
|
||||
public long? StartTimeTicks { get; set; }
|
||||
public long? StartTimeTicks { get; set; }
|
||||
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
|
||||
public int? MaxAudioChannels { get; set; }
|
||||
public int? MaxAudioChannels { get; set; }
|
||||
|
||||
public Guid ItemId { get; set; }
|
||||
public Guid ItemId { get; set; }
|
||||
|
||||
public DeviceProfile DeviceProfile { get; set; }
|
||||
public DeviceProfile DeviceProfile { get; set; }
|
||||
|
||||
public bool EnableDirectPlay { get; set; }
|
||||
public bool EnableDirectPlay { get; set; }
|
||||
|
||||
public bool EnableDirectStream { get; set; }
|
||||
public bool EnableDirectStream { get; set; }
|
||||
|
||||
public bool AlwaysBurnInSubtitleWhenTranscoding { get; set; }
|
||||
public bool AlwaysBurnInSubtitleWhenTranscoding { get; set; }
|
||||
|
||||
public IReadOnlyList<MediaProtocol> DirectPlayProtocols { get; set; }
|
||||
}
|
||||
}
|
||||
public IReadOnlyList<MediaProtocol> DirectPlayProtocols { get; set; }
|
||||
}
|
||||
|
||||
@@ -6,15 +6,13 @@
|
||||
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo
|
||||
{
|
||||
public class LiveStreamResponse
|
||||
{
|
||||
public LiveStreamResponse(MediaSourceInfo mediaSource)
|
||||
{
|
||||
MediaSource = mediaSource;
|
||||
}
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
public class LiveStreamResponse
|
||||
{
|
||||
public LiveStreamResponse(MediaSourceInfo mediaSource)
|
||||
{
|
||||
MediaSource = mediaSource;
|
||||
}
|
||||
|
||||
public MediaSourceInfo MediaSource { get; }
|
||||
}
|
||||
}
|
||||
public MediaSourceInfo MediaSource { get; }
|
||||
}
|
||||
|
||||
@@ -5,86 +5,84 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using global::System;
|
||||
using global::System.Collections.Generic;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo
|
||||
{
|
||||
public class MediaInfo : MediaSourceInfo, IHasProviderIds
|
||||
{
|
||||
public MediaInfo()
|
||||
{
|
||||
Chapters = Array.Empty<ChapterInfo>();
|
||||
Artists = Array.Empty<string>();
|
||||
AlbumArtists = Array.Empty<string>();
|
||||
Studios = Array.Empty<string>();
|
||||
Genres = Array.Empty<string>();
|
||||
People = Array.Empty<BaseItemPerson>();
|
||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
public class MediaInfo : MediaSourceInfo, IHasProviderIds
|
||||
{
|
||||
public MediaInfo()
|
||||
{
|
||||
Chapters = Array.Empty<ChapterInfo>();
|
||||
Artists = Array.Empty<string>();
|
||||
AlbumArtists = Array.Empty<string>();
|
||||
Studios = Array.Empty<string>();
|
||||
Genres = Array.Empty<string>();
|
||||
People = Array.Empty<BaseItemPerson>();
|
||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public ChapterInfo[] Chapters { get; set; }
|
||||
public ChapterInfo[] Chapters { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the album.
|
||||
/// </summary>
|
||||
/// <value>The album.</value>
|
||||
public string Album { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the album.
|
||||
/// </summary>
|
||||
/// <value>The album.</value>
|
||||
public string Album { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the artists.
|
||||
/// </summary>
|
||||
/// <value>The artists.</value>
|
||||
public string[] Artists { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the artists.
|
||||
/// </summary>
|
||||
/// <value>The artists.</value>
|
||||
public string[] Artists { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the album artists.
|
||||
/// </summary>
|
||||
/// <value>The album artists.</value>
|
||||
public string[] AlbumArtists { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the album artists.
|
||||
/// </summary>
|
||||
/// <value>The album artists.</value>
|
||||
public string[] AlbumArtists { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the studios.
|
||||
/// </summary>
|
||||
/// <value>The studios.</value>
|
||||
public string[] Studios { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the studios.
|
||||
/// </summary>
|
||||
/// <value>The studios.</value>
|
||||
public string[] Studios { get; set; }
|
||||
|
||||
public string[] Genres { get; set; }
|
||||
public string[] Genres { get; set; }
|
||||
|
||||
public string ShowName { get; set; }
|
||||
public string ShowName { get; set; }
|
||||
|
||||
public string ForcedSortName { get; set; }
|
||||
public string ForcedSortName { get; set; }
|
||||
|
||||
public int? IndexNumber { get; set; }
|
||||
public int? IndexNumber { get; set; }
|
||||
|
||||
public int? ParentIndexNumber { get; set; }
|
||||
public int? ParentIndexNumber { get; set; }
|
||||
|
||||
public int? ProductionYear { get; set; }
|
||||
public int? ProductionYear { get; set; }
|
||||
|
||||
public DateTime? PremiereDate { get; set; }
|
||||
public DateTime? PremiereDate { get; set; }
|
||||
|
||||
public BaseItemPerson[] People { get; set; }
|
||||
public BaseItemPerson[] People { get; set; }
|
||||
|
||||
public Dictionary<string, string> ProviderIds { get; set; }
|
||||
public Dictionary<string, string> ProviderIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the official rating.
|
||||
/// </summary>
|
||||
/// <value>The official rating.</value>
|
||||
public string OfficialRating { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the official rating.
|
||||
/// </summary>
|
||||
/// <value>The official rating.</value>
|
||||
public string OfficialRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the official rating description.
|
||||
/// </summary>
|
||||
/// <value>The official rating description.</value>
|
||||
public string OfficialRatingDescription { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the official rating description.
|
||||
/// </summary>
|
||||
/// <value>The official rating description.</value>
|
||||
public string OfficialRatingDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the overview.
|
||||
/// </summary>
|
||||
/// <value>The overview.</value>
|
||||
public string Overview { get; set; }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the overview.
|
||||
/// </summary>
|
||||
/// <value>The overview.</value>
|
||||
public string Overview { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,16 +4,14 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo
|
||||
{
|
||||
public enum MediaProtocol
|
||||
{
|
||||
File = 0,
|
||||
Http = 1,
|
||||
Rtmp = 2,
|
||||
Rtsp = 3,
|
||||
Udp = 4,
|
||||
Rtp = 5,
|
||||
Ftp = 6
|
||||
}
|
||||
}
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
public enum MediaProtocol
|
||||
{
|
||||
File = 0,
|
||||
Http = 1,
|
||||
Rtmp = 2,
|
||||
Rtsp = 3,
|
||||
Udp = 4,
|
||||
Rtp = 5,
|
||||
Ftp = 6,
|
||||
}
|
||||
|
||||
@@ -2,42 +2,40 @@
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Dto;
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
using global::System;
|
||||
using global::System.Collections.Generic;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Class PlaybackInfoResponse.
|
||||
/// </summary>
|
||||
public class PlaybackInfoResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PlaybackInfoResponse" /> class.
|
||||
/// </summary>
|
||||
public PlaybackInfoResponse()
|
||||
{
|
||||
MediaSources = Array.Empty<MediaSourceInfo>();
|
||||
}
|
||||
/// <summary>
|
||||
/// Class PlaybackInfoResponse.
|
||||
/// </summary>
|
||||
public class PlaybackInfoResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PlaybackInfoResponse" /> class.
|
||||
/// </summary>
|
||||
public PlaybackInfoResponse()
|
||||
{
|
||||
MediaSources = Array.Empty<MediaSourceInfo>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media sources.
|
||||
/// </summary>
|
||||
/// <value>The media sources.</value>
|
||||
public IReadOnlyList<MediaSourceInfo> MediaSources { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the media sources.
|
||||
/// </summary>
|
||||
/// <value>The media sources.</value>
|
||||
public IReadOnlyList<MediaSourceInfo> MediaSources { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the play session identifier.
|
||||
/// </summary>
|
||||
/// <value>The play session identifier.</value>
|
||||
public string? PlaySessionId { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the play session identifier.
|
||||
/// </summary>
|
||||
/// <value>The play session identifier.</value>
|
||||
public string? PlaySessionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the error code.
|
||||
/// </summary>
|
||||
/// <value>The error code.</value>
|
||||
public PlaybackErrorCode? ErrorCode { get; set; }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the error code.
|
||||
/// </summary>
|
||||
/// <value>The error code.</value>
|
||||
public PlaybackErrorCode? ErrorCode { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,16 +4,14 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo
|
||||
{
|
||||
public static class SubtitleFormat
|
||||
{
|
||||
public const string SRT = "srt";
|
||||
public const string SUBRIP = "subrip";
|
||||
public const string SSA = "ssa";
|
||||
public const string ASS = "ass";
|
||||
public const string VTT = "vtt";
|
||||
public const string WEBVTT = "webvtt";
|
||||
public const string TTML = "ttml";
|
||||
}
|
||||
}
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
public static class SubtitleFormat
|
||||
{
|
||||
public const string SRT = "srt";
|
||||
public const string SUBRIP = "subrip";
|
||||
public const string SSA = "ssa";
|
||||
public const string ASS = "ass";
|
||||
public const string VTT = "vtt";
|
||||
public const string WEBVTT = "webvtt";
|
||||
public const string TTML = "ttml";
|
||||
}
|
||||
|
||||
@@ -4,22 +4,20 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo
|
||||
{
|
||||
public class SubtitleTrackEvent
|
||||
{
|
||||
public SubtitleTrackEvent(string id, string text)
|
||||
{
|
||||
Id = id;
|
||||
Text = text;
|
||||
}
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
public class SubtitleTrackEvent
|
||||
{
|
||||
public SubtitleTrackEvent(string id, string text)
|
||||
{
|
||||
Id = id;
|
||||
Text = text;
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
public string Text { get; set; }
|
||||
public string Text { get; set; }
|
||||
|
||||
public long StartPositionTicks { get; set; }
|
||||
public long StartPositionTicks { get; set; }
|
||||
|
||||
public long EndPositionTicks { get; set; }
|
||||
}
|
||||
}
|
||||
public long EndPositionTicks { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,18 +4,16 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using global::System;
|
||||
using global::System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo
|
||||
{
|
||||
public class SubtitleTrackInfo
|
||||
{
|
||||
public SubtitleTrackInfo()
|
||||
{
|
||||
TrackEvents = Array.Empty<SubtitleTrackEvent>();
|
||||
}
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
public class SubtitleTrackInfo
|
||||
{
|
||||
public SubtitleTrackInfo()
|
||||
{
|
||||
TrackEvents = Array.Empty<SubtitleTrackEvent>();
|
||||
}
|
||||
|
||||
public IReadOnlyList<SubtitleTrackEvent> TrackEvents { get; set; }
|
||||
}
|
||||
}
|
||||
public IReadOnlyList<SubtitleTrackEvent> TrackEvents { get; set; }
|
||||
}
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo
|
||||
{
|
||||
public enum TransportStreamTimestamp
|
||||
{
|
||||
None,
|
||||
Zero,
|
||||
Valid
|
||||
}
|
||||
}
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
public enum TransportStreamTimestamp
|
||||
{
|
||||
None,
|
||||
Zero,
|
||||
Valid
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user