Remove some dead code

This commit is contained in:
Bond_009
2021-11-09 16:28:39 +01:00
parent 5c5d49ee60
commit 994101fcf4
8 changed files with 23 additions and 135 deletions

View File

@@ -1,13 +1,11 @@
#pragma warning disable CS1591
using System;
namespace MediaBrowser.Model.MediaInfo
{
public static class AudioCodec
{
public const string AAC = "aac";
public const string MP3 = "mp3";
public const string AC3 = "ac3";
public static string GetFriendlyName(string codec)
{
if (codec.Length == 0)
@@ -15,17 +13,20 @@ namespace MediaBrowser.Model.MediaInfo
return codec;
}
switch (codec.ToLowerInvariant())
if (string.Equals(codec, "ac3", StringComparison.OrdinalIgnoreCase))
{
case "ac3":
return "Dolby Digital";
case "eac3":
return "Dolby Digital+";
case "dca":
return "DTS";
default:
return codec.ToUpperInvariant();
return "Dolby Digital";
}
else if (string.Equals(codec, "eac3", StringComparison.OrdinalIgnoreCase))
{
return "Dolby Digital+";
}
else if (string.Equals(codec, "dca", StringComparison.OrdinalIgnoreCase))
{
return "DTS";
}
return codec.ToUpperInvariant();
}
}
}

View File

@@ -16,22 +16,6 @@ namespace MediaBrowser.Model.MediaInfo
DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http };
}
public LiveStreamRequest(AudioOptions options)
{
MaxStreamingBitrate = options.MaxBitrate;
ItemId = options.ItemId;
DeviceProfile = options.Profile;
MaxAudioChannels = options.MaxAudioChannels;
DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http };
if (options is VideoOptions videoOptions)
{
AudioStreamIndex = videoOptions.AudioStreamIndex;
SubtitleStreamIndex = videoOptions.SubtitleStreamIndex;
}
}
public string OpenToken { get; set; }
public Guid UserId { get; set; }

View File

@@ -1,58 +0,0 @@
#nullable disable
#pragma warning disable CS1591
using System;
using MediaBrowser.Model.Dlna;
namespace MediaBrowser.Model.MediaInfo
{
public class PlaybackInfoRequest
{
public PlaybackInfoRequest()
{
EnableDirectPlay = true;
EnableDirectStream = true;
EnableTranscoding = true;
AllowVideoStreamCopy = true;
AllowAudioStreamCopy = true;
IsPlayback = true;
DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http };
}
public Guid Id { get; set; }
public Guid UserId { get; set; }
public long? MaxStreamingBitrate { get; set; }
public long? StartTimeTicks { get; set; }
public int? AudioStreamIndex { get; set; }
public int? SubtitleStreamIndex { get; set; }
public int? MaxAudioChannels { get; set; }
public string MediaSourceId { get; set; }
public string LiveStreamId { get; set; }
public DeviceProfile DeviceProfile { get; set; }
public bool EnableDirectPlay { get; set; }
public bool EnableDirectStream { get; set; }
public bool EnableTranscoding { get; set; }
public bool AllowVideoStreamCopy { get; set; }
public bool AllowAudioStreamCopy { get; set; }
public bool IsPlayback { get; set; }
public bool AutoOpenLiveStream { get; set; }
public MediaProtocol[] DirectPlayProtocols { get; set; }
}
}

View File

@@ -8,8 +8,6 @@ namespace MediaBrowser.Model.MediaInfo
public const string SSA = "ssa";
public const string ASS = "ass";
public const string VTT = "vtt";
public const string SUB = "sub";
public const string SMI = "smi";
public const string TTML = "ttml";
}
}

View File

@@ -1,33 +0,0 @@
namespace MediaBrowser.Model.Net
{
/// <summary>
/// Enum NetworkShareType.
/// </summary>
public enum NetworkShareType
{
/// <summary>
/// Disk share.
/// </summary>
Disk,
/// <summary>
/// Printer share.
/// </summary>
Printer,
/// <summary>
/// Device share.
/// </summary>
Device,
/// <summary>
/// IPC share.
/// </summary>
Ipc,
/// <summary>
/// Special share.
/// </summary>
Special
}
}