mirror of https://github.com/jellyfin/jellyfin.git
Remove some dead code
This commit is contained in:
parent
7ccf7e6157
commit
adad13b865
|
@ -21,7 +21,6 @@ using MediaBrowser.Controller.LiveTv;
|
||||||
using MediaBrowser.Controller.Persistence;
|
using MediaBrowser.Controller.Persistence;
|
||||||
using MediaBrowser.Controller.Playlists;
|
using MediaBrowser.Controller.Playlists;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Drawing;
|
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
|
@ -738,8 +737,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
dto.Tags = item.Tags;
|
dto.Tags = item.Tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
var hasAspectRatio = item as IHasAspectRatio;
|
if (item is IHasAspectRatio hasAspectRatio)
|
||||||
if (hasAspectRatio != null)
|
|
||||||
{
|
{
|
||||||
dto.AspectRatio = hasAspectRatio.AspectRatio;
|
dto.AspectRatio = hasAspectRatio.AspectRatio;
|
||||||
}
|
}
|
||||||
|
@ -889,15 +887,13 @@ namespace Emby.Server.Implementations.Dto
|
||||||
dto.CommunityRating = item.CommunityRating;
|
dto.CommunityRating = item.CommunityRating;
|
||||||
}
|
}
|
||||||
|
|
||||||
var supportsPlaceHolders = item as ISupportsPlaceHolders;
|
if (item is ISupportsPlaceHolders supportsPlaceHolders && supportsPlaceHolders.IsPlaceHolder)
|
||||||
if (supportsPlaceHolders != null && supportsPlaceHolders.IsPlaceHolder)
|
|
||||||
{
|
{
|
||||||
dto.IsPlaceHolder = supportsPlaceHolders.IsPlaceHolder;
|
dto.IsPlaceHolder = supportsPlaceHolders.IsPlaceHolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add audio info
|
// Add audio info
|
||||||
var audio = item as Audio;
|
if (item is Audio audio)
|
||||||
if (audio != null)
|
|
||||||
{
|
{
|
||||||
dto.Album = audio.Album;
|
dto.Album = audio.Album;
|
||||||
if (audio.ExtraType.HasValue)
|
if (audio.ExtraType.HasValue)
|
||||||
|
@ -970,8 +966,7 @@ namespace Emby.Server.Implementations.Dto
|
||||||
}).Where(i => i != null).ToArray();
|
}).Where(i => i != null).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
var hasAlbumArtist = item as IHasAlbumArtist;
|
if (item is IHasAlbumArtist hasAlbumArtist)
|
||||||
if (hasAlbumArtist != null)
|
|
||||||
{
|
{
|
||||||
dto.AlbumArtist = hasAlbumArtist.AlbumArtists.FirstOrDefault();
|
dto.AlbumArtist = hasAlbumArtist.AlbumArtists.FirstOrDefault();
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,6 @@ using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Library;
|
using MediaBrowser.Model.Library;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using MediaBrowser.Model.Tasks;
|
using MediaBrowser.Model.Tasks;
|
||||||
using MediaBrowser.Providers.MediaInfo;
|
|
||||||
using Microsoft.Extensions.Caching.Memory;
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Episode = MediaBrowser.Controller.Entities.TV.Episode;
|
using Episode = MediaBrowser.Controller.Entities.TV.Episode;
|
||||||
|
@ -680,9 +679,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
|
|
||||||
if (result?.Items.Count > 0)
|
if (result?.Items.Count > 0)
|
||||||
{
|
{
|
||||||
var items = new List<BaseItem>();
|
var items = result.Items;
|
||||||
items.AddRange(result.Items);
|
|
||||||
|
|
||||||
foreach (var item in items)
|
foreach (var item in items)
|
||||||
{
|
{
|
||||||
ResolverHelper.SetInitialItemValues(item, parent, this, directoryService);
|
ResolverHelper.SetInitialItemValues(item, parent, this, directoryService);
|
||||||
|
@ -1030,15 +1027,6 @@ namespace Emby.Server.Implementations.Library
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Queues the library scan.
|
|
||||||
/// </summary>
|
|
||||||
public void QueueLibraryScan()
|
|
||||||
{
|
|
||||||
// Just run the scheduled task so that the user can see it
|
|
||||||
_taskManager.QueueScheduledTask<RefreshMediaLibraryTask>();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Validates the media library internal.
|
/// Validates the media library internal.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1644,27 +1632,6 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets all intro files.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>IEnumerable{System.String}.</returns>
|
|
||||||
public IEnumerable<string> GetAllIntroFiles()
|
|
||||||
{
|
|
||||||
return IntroProviders.SelectMany(i =>
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return i.GetAllIntroFiles().ToList();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error getting intro files");
|
|
||||||
|
|
||||||
return new List<string>();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resolves the intro.
|
/// Resolves the intro.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -2463,24 +2430,6 @@ namespace Emby.Server.Implementations.Library
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddExternalSubtitleStreams(
|
|
||||||
List<MediaStream> streams,
|
|
||||||
string videoPath,
|
|
||||||
string[] files)
|
|
||||||
{
|
|
||||||
new SubtitleResolver(BaseItem.LocalizationManager).AddExternalSubtitleStreams(streams, videoPath, streams.Count, files);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BaseItem GetParentItem(string parentId, Guid? userId)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(parentId))
|
|
||||||
{
|
|
||||||
return GetParentItem((Guid?)null, userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
return GetParentItem(new Guid(parentId), userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BaseItem GetParentItem(Guid? parentId, Guid? userId)
|
public BaseItem GetParentItem(Guid? parentId, Guid? userId)
|
||||||
{
|
{
|
||||||
if (parentId.HasValue)
|
if (parentId.HasValue)
|
||||||
|
@ -2488,7 +2437,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
return GetItemById(parentId.Value);
|
return GetItemById(parentId.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userId.HasValue && userId != Guid.Empty)
|
if (userId.HasValue && !userId.Equals(default))
|
||||||
{
|
{
|
||||||
return GetUserRootFolder();
|
return GetUserRootFolder();
|
||||||
}
|
}
|
||||||
|
@ -2778,16 +2727,6 @@ namespace Emby.Server.Implementations.Library
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string SubstitutePath(string path, string from, string to)
|
|
||||||
{
|
|
||||||
if (path.TryReplaceSubPath(from, to, out var newPath))
|
|
||||||
{
|
|
||||||
return newPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<PersonInfo> GetPeople(InternalPeopleQuery query)
|
public List<PersonInfo> GetPeople(InternalPeopleQuery query)
|
||||||
{
|
{
|
||||||
return _itemRepository.GetPeople(query);
|
return _itemRepository.GetPeople(query);
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class LiveTvManager.
|
/// Class LiveTvManager.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LiveTvManager : ILiveTvManager, IDisposable
|
public class LiveTvManager : ILiveTvManager
|
||||||
{
|
{
|
||||||
private const int MaxGuideDays = 14;
|
private const int MaxGuideDays = 14;
|
||||||
private const string ExternalServiceTag = "ExternalServiceId";
|
private const string ExternalServiceTag = "ExternalServiceId";
|
||||||
|
@ -63,8 +63,6 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
private ITunerHost[] _tunerHosts = Array.Empty<ITunerHost>();
|
private ITunerHost[] _tunerHosts = Array.Empty<ITunerHost>();
|
||||||
private IListingsProvider[] _listingProviders = Array.Empty<IListingsProvider>();
|
private IListingsProvider[] _listingProviders = Array.Empty<IListingsProvider>();
|
||||||
|
|
||||||
private bool _disposed = false;
|
|
||||||
|
|
||||||
public LiveTvManager(
|
public LiveTvManager(
|
||||||
IServerConfigurationManager config,
|
IServerConfigurationManager config,
|
||||||
ILogger<LiveTvManager> logger,
|
ILogger<LiveTvManager> logger,
|
||||||
|
@ -2092,36 +2090,6 @@ namespace Emby.Server.Implementations.LiveTv
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
Dispose(true);
|
|
||||||
GC.SuppressFinalize(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Releases unmanaged and - optionally - managed resources.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
|
|
||||||
protected virtual void Dispose(bool dispose)
|
|
||||||
{
|
|
||||||
if (_disposed)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dispose)
|
|
||||||
{
|
|
||||||
// TODO: Dispose stuff
|
|
||||||
}
|
|
||||||
|
|
||||||
_services = null;
|
|
||||||
_listingProviders = null;
|
|
||||||
_tunerHosts = null;
|
|
||||||
|
|
||||||
_disposed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private LiveTvServiceInfo[] GetServiceInfos()
|
private LiveTvServiceInfo[] GetServiceInfos()
|
||||||
{
|
{
|
||||||
return Services.Select(GetServiceInfo).ToArray();
|
return Services.Select(GetServiceInfo).ToArray();
|
||||||
|
|
|
@ -24,11 +24,5 @@ namespace MediaBrowser.Controller.Library
|
||||||
/// <param name="user">The user.</param>
|
/// <param name="user">The user.</param>
|
||||||
/// <returns>IEnumerable{System.String}.</returns>
|
/// <returns>IEnumerable{System.String}.</returns>
|
||||||
Task<IEnumerable<IntroInfo>> GetIntros(BaseItem item, Jellyfin.Data.Entities.User user);
|
Task<IEnumerable<IntroInfo>> GetIntros(BaseItem item, Jellyfin.Data.Entities.User user);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets all intro files.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>IEnumerable{System.String}.</returns>
|
|
||||||
IEnumerable<string> GetAllIntroFiles();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,11 +151,6 @@ namespace MediaBrowser.Controller.Library
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
Task ValidateMediaLibrary(IProgress<double> progress, CancellationToken cancellationToken);
|
Task ValidateMediaLibrary(IProgress<double> progress, CancellationToken cancellationToken);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Queues the library scan.
|
|
||||||
/// </summary>
|
|
||||||
void QueueLibraryScan();
|
|
||||||
|
|
||||||
Task UpdateImagesAsync(BaseItem item, bool forceUpdate = false);
|
Task UpdateImagesAsync(BaseItem item, bool forceUpdate = false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -181,12 +176,6 @@ namespace MediaBrowser.Controller.Library
|
||||||
/// <returns>IEnumerable{System.String}.</returns>
|
/// <returns>IEnumerable{System.String}.</returns>
|
||||||
Task<IEnumerable<Video>> GetIntros(BaseItem item, User user);
|
Task<IEnumerable<Video>> GetIntros(BaseItem item, User user);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets all intro files.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>IEnumerable{System.String}.</returns>
|
|
||||||
IEnumerable<string> GetAllIntroFiles();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds the parts.
|
/// Adds the parts.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -507,15 +496,6 @@ namespace MediaBrowser.Controller.Library
|
||||||
|
|
||||||
string GetPathAfterNetworkSubstitution(string path, BaseItem ownerItem = null);
|
string GetPathAfterNetworkSubstitution(string path, BaseItem ownerItem = null);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Substitutes the path.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="path">The path.</param>
|
|
||||||
/// <param name="from">From.</param>
|
|
||||||
/// <param name="to">To.</param>
|
|
||||||
/// <returns>System.String.</returns>
|
|
||||||
string SubstitutePath(string path, string from, string to);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts the image to local.
|
/// Converts the image to local.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -587,15 +567,8 @@ namespace MediaBrowser.Controller.Library
|
||||||
|
|
||||||
int GetCount(InternalItemsQuery query);
|
int GetCount(InternalItemsQuery query);
|
||||||
|
|
||||||
void AddExternalSubtitleStreams(
|
|
||||||
List<MediaStream> streams,
|
|
||||||
string videoPath,
|
|
||||||
string[] files);
|
|
||||||
|
|
||||||
Task RunMetadataSavers(BaseItem item, ItemUpdateType updateReason);
|
Task RunMetadataSavers(BaseItem item, ItemUpdateType updateReason);
|
||||||
|
|
||||||
BaseItem GetParentItem(string parentId, Guid? userId);
|
|
||||||
|
|
||||||
BaseItem GetParentItem(Guid? parentId, Guid? userId);
|
BaseItem GetParentItem(Guid? parentId, Guid? userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue