Remove some dead code
This commit is contained in:
parent
5c5d49ee60
commit
994101fcf4
|
@ -1,5 +1,3 @@
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
#pragma warning disable CA1819, CS1591
|
#pragma warning disable CA1819, CS1591
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
#pragma warning disable CS1591
|
#pragma warning disable CS1591
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
#pragma warning disable CS1591
|
#pragma warning disable CS1591
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.MediaInfo
|
namespace MediaBrowser.Model.MediaInfo
|
||||||
{
|
{
|
||||||
public static class AudioCodec
|
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)
|
public static string GetFriendlyName(string codec)
|
||||||
{
|
{
|
||||||
if (codec.Length == 0)
|
if (codec.Length == 0)
|
||||||
|
@ -15,17 +13,20 @@ namespace MediaBrowser.Model.MediaInfo
|
||||||
return codec;
|
return codec;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (codec.ToLowerInvariant())
|
if (string.Equals(codec, "ac3", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
case "ac3":
|
|
||||||
return "Dolby Digital";
|
return "Dolby Digital";
|
||||||
case "eac3":
|
}
|
||||||
|
else if (string.Equals(codec, "eac3", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
return "Dolby Digital+";
|
return "Dolby Digital+";
|
||||||
case "dca":
|
}
|
||||||
|
else if (string.Equals(codec, "dca", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
return "DTS";
|
return "DTS";
|
||||||
default:
|
}
|
||||||
|
|
||||||
return codec.ToUpperInvariant();
|
return codec.ToUpperInvariant();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -16,22 +16,6 @@ namespace MediaBrowser.Model.MediaInfo
|
||||||
DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http };
|
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 string OpenToken { get; set; }
|
||||||
|
|
||||||
public Guid UserId { get; set; }
|
public Guid UserId { get; set; }
|
||||||
|
|
|
@ -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; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -8,8 +8,6 @@ namespace MediaBrowser.Model.MediaInfo
|
||||||
public const string SSA = "ssa";
|
public const string SSA = "ssa";
|
||||||
public const string ASS = "ass";
|
public const string ASS = "ass";
|
||||||
public const string VTT = "vtt";
|
public const string VTT = "vtt";
|
||||||
public const string SUB = "sub";
|
|
||||||
public const string SMI = "smi";
|
|
||||||
public const string TTML = "ttml";
|
public const string TTML = "ttml";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -235,12 +235,12 @@ namespace Jellyfin.Providers.Tests.Manager
|
||||||
.ReturnsAsync(imageResponse);
|
.ReturnsAsync(imageResponse);
|
||||||
|
|
||||||
var refreshOptions = forceRefresh
|
var refreshOptions = forceRefresh
|
||||||
? new ImageRefreshOptions(null)
|
? new ImageRefreshOptions(Mock.Of<IDirectoryService>())
|
||||||
{
|
{
|
||||||
ImageRefreshMode = MetadataRefreshMode.FullRefresh,
|
ImageRefreshMode = MetadataRefreshMode.FullRefresh,
|
||||||
ReplaceAllImages = true
|
ReplaceAllImages = true
|
||||||
}
|
}
|
||||||
: new ImageRefreshOptions(null);
|
: new ImageRefreshOptions(Mock.Of<IDirectoryService>());
|
||||||
|
|
||||||
var itemImageProvider = GetItemImageProvider(null, new Mock<IFileSystem>());
|
var itemImageProvider = GetItemImageProvider(null, new Mock<IFileSystem>());
|
||||||
var result = await itemImageProvider.RefreshImages(item, libraryOptions, new List<IImageProvider> { dynamicProvider.Object }, refreshOptions, CancellationToken.None);
|
var result = await itemImageProvider.RefreshImages(item, libraryOptions, new List<IImageProvider> { dynamicProvider.Object }, refreshOptions, CancellationToken.None);
|
||||||
|
@ -290,7 +290,7 @@ namespace Jellyfin.Providers.Tests.Manager
|
||||||
dynamicProvider.Setup(rp => rp.GetImage(item, imageType, It.IsAny<CancellationToken>()))
|
dynamicProvider.Setup(rp => rp.GetImage(item, imageType, It.IsAny<CancellationToken>()))
|
||||||
.ReturnsAsync(imageResponse);
|
.ReturnsAsync(imageResponse);
|
||||||
|
|
||||||
var refreshOptions = new ImageRefreshOptions(null);
|
var refreshOptions = new ImageRefreshOptions(Mock.Of<IDirectoryService>());
|
||||||
|
|
||||||
var providerManager = new Mock<IProviderManager>(MockBehavior.Strict);
|
var providerManager = new Mock<IProviderManager>(MockBehavior.Strict);
|
||||||
providerManager.Setup(pm => pm.SaveImage(item, It.IsAny<Stream>(), It.IsAny<string>(), imageType, null, It.IsAny<CancellationToken>()))
|
providerManager.Setup(pm => pm.SaveImage(item, It.IsAny<Stream>(), It.IsAny<string>(), imageType, null, It.IsAny<CancellationToken>()))
|
||||||
|
@ -329,12 +329,12 @@ namespace Jellyfin.Providers.Tests.Manager
|
||||||
.Returns(new[] { imageType });
|
.Returns(new[] { imageType });
|
||||||
|
|
||||||
var refreshOptions = forceRefresh
|
var refreshOptions = forceRefresh
|
||||||
? new ImageRefreshOptions(null)
|
? new ImageRefreshOptions(Mock.Of<IDirectoryService>())
|
||||||
{
|
{
|
||||||
ImageRefreshMode = MetadataRefreshMode.FullRefresh,
|
ImageRefreshMode = MetadataRefreshMode.FullRefresh,
|
||||||
ReplaceAllImages = true
|
ReplaceAllImages = true
|
||||||
}
|
}
|
||||||
: new ImageRefreshOptions(null);
|
: new ImageRefreshOptions(Mock.Of<IDirectoryService>());
|
||||||
|
|
||||||
var remoteInfo = new RemoteImageInfo[imageCount];
|
var remoteInfo = new RemoteImageInfo[imageCount];
|
||||||
for (int i = 0; i < imageCount; i++)
|
for (int i = 0; i < imageCount; i++)
|
||||||
|
@ -399,12 +399,12 @@ namespace Jellyfin.Providers.Tests.Manager
|
||||||
});
|
});
|
||||||
|
|
||||||
var refreshOptions = fullRefresh
|
var refreshOptions = fullRefresh
|
||||||
? new ImageRefreshOptions(null)
|
? new ImageRefreshOptions(Mock.Of<IDirectoryService>())
|
||||||
{
|
{
|
||||||
ImageRefreshMode = MetadataRefreshMode.FullRefresh,
|
ImageRefreshMode = MetadataRefreshMode.FullRefresh,
|
||||||
ReplaceAllImages = true
|
ReplaceAllImages = true
|
||||||
}
|
}
|
||||||
: new ImageRefreshOptions(null);
|
: new ImageRefreshOptions(Mock.Of<IDirectoryService>());
|
||||||
|
|
||||||
var remoteInfo = new RemoteImageInfo[targetImageCount];
|
var remoteInfo = new RemoteImageInfo[targetImageCount];
|
||||||
for (int i = 0; i < targetImageCount; i++)
|
for (int i = 0; i < targetImageCount; i++)
|
||||||
|
@ -448,7 +448,7 @@ namespace Jellyfin.Providers.Tests.Manager
|
||||||
remoteProvider.Setup(rp => rp.GetSupportedImages(item))
|
remoteProvider.Setup(rp => rp.GetSupportedImages(item))
|
||||||
.Returns(new[] { imageType });
|
.Returns(new[] { imageType });
|
||||||
|
|
||||||
var refreshOptions = new ImageRefreshOptions(null);
|
var refreshOptions = new ImageRefreshOptions(Mock.Of<IDirectoryService>());
|
||||||
|
|
||||||
// populate remote with double the required images to verify count is trimmed to the library option count
|
// populate remote with double the required images to verify count is trimmed to the library option count
|
||||||
var remoteInfoCount = imageCount * 2;
|
var remoteInfoCount = imageCount * 2;
|
||||||
|
@ -493,7 +493,7 @@ namespace Jellyfin.Providers.Tests.Manager
|
||||||
remoteProvider.Setup(rp => rp.GetSupportedImages(item))
|
remoteProvider.Setup(rp => rp.GetSupportedImages(item))
|
||||||
.Returns(new[] { imageType });
|
.Returns(new[] { imageType });
|
||||||
|
|
||||||
var refreshOptions = new ImageRefreshOptions(null)
|
var refreshOptions = new ImageRefreshOptions(Mock.Of<IDirectoryService>())
|
||||||
{
|
{
|
||||||
ImageRefreshMode = MetadataRefreshMode.FullRefresh,
|
ImageRefreshMode = MetadataRefreshMode.FullRefresh,
|
||||||
ReplaceAllImages = true
|
ReplaceAllImages = true
|
||||||
|
|
Loading…
Reference in New Issue
Block a user