refactor namespaces and imports (#670)
* re-namespace * optimize usings * more usings * more of the same * more implicit/global usings * cleanup all usings * minor fixes
This commit is contained in:
@@ -1,38 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Emby;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Emby
|
||||
namespace ErsatzTV.Core.Interfaces.Emby;
|
||||
|
||||
public interface IEmbyApiClient
|
||||
{
|
||||
public interface IEmbyApiClient
|
||||
{
|
||||
Task<Either<BaseError, EmbyServerInformation>> GetServerInformation(string address, string apiKey);
|
||||
Task<Either<BaseError, List<EmbyLibrary>>> GetLibraries(string address, string apiKey);
|
||||
Task<Either<BaseError, EmbyServerInformation>> GetServerInformation(string address, string apiKey);
|
||||
Task<Either<BaseError, List<EmbyLibrary>>> GetLibraries(string address, string apiKey);
|
||||
|
||||
Task<Either<BaseError, List<EmbyMovie>>> GetMovieLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string libraryId);
|
||||
Task<Either<BaseError, List<EmbyMovie>>> GetMovieLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string libraryId);
|
||||
|
||||
Task<Either<BaseError, List<EmbyShow>>> GetShowLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string libraryId);
|
||||
Task<Either<BaseError, List<EmbyShow>>> GetShowLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string libraryId);
|
||||
|
||||
Task<Either<BaseError, List<EmbySeason>>> GetSeasonLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string showId);
|
||||
Task<Either<BaseError, List<EmbySeason>>> GetSeasonLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string showId);
|
||||
|
||||
Task<Either<BaseError, List<EmbyEpisode>>> GetEpisodeLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string seasonId);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, List<EmbyEpisode>>> GetEpisodeLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string seasonId);
|
||||
}
|
||||
@@ -1,15 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Emby
|
||||
namespace ErsatzTV.Core.Interfaces.Emby;
|
||||
|
||||
public interface IEmbyMovieLibraryScanner
|
||||
{
|
||||
public interface IEmbyMovieLibraryScanner
|
||||
{
|
||||
Task<Either<BaseError, Unit>> ScanLibrary(
|
||||
string address,
|
||||
string apiKey,
|
||||
EmbyLibrary library,
|
||||
string ffprobePath);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Unit>> ScanLibrary(
|
||||
string address,
|
||||
string apiKey,
|
||||
EmbyLibrary library,
|
||||
string ffprobePath);
|
||||
}
|
||||
@@ -1,12 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Emby
|
||||
namespace ErsatzTV.Core.Interfaces.Emby;
|
||||
|
||||
public interface IEmbyPathReplacementService
|
||||
{
|
||||
public interface IEmbyPathReplacementService
|
||||
{
|
||||
Task<string> GetReplacementEmbyPath(int libraryPathId, string path);
|
||||
string GetReplacementEmbyPath(List<EmbyPathReplacement> pathReplacements, string path, bool log = true);
|
||||
}
|
||||
}
|
||||
Task<string> GetReplacementEmbyPath(int libraryPathId, string path);
|
||||
string GetReplacementEmbyPath(List<EmbyPathReplacement> pathReplacements, string path, bool log = true);
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
using ErsatzTV.Core.Emby;
|
||||
using ErsatzTV.Core.Interfaces.MediaSources;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Emby
|
||||
namespace ErsatzTV.Core.Interfaces.Emby;
|
||||
|
||||
public interface IEmbySecretStore : IRemoteMediaSourceSecretStore<EmbySecrets>
|
||||
{
|
||||
public interface IEmbySecretStore : IRemoteMediaSourceSecretStore<EmbySecrets>
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Emby
|
||||
namespace ErsatzTV.Core.Interfaces.Emby;
|
||||
|
||||
public interface IEmbyTelevisionLibraryScanner
|
||||
{
|
||||
public interface IEmbyTelevisionLibraryScanner
|
||||
{
|
||||
Task<Either<BaseError, Unit>> ScanLibrary(
|
||||
string address,
|
||||
string apiKey,
|
||||
EmbyLibrary library,
|
||||
string ffprobePath);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Unit>> ScanLibrary(
|
||||
string address,
|
||||
string apiKey,
|
||||
EmbyLibrary library,
|
||||
string ffprobePath);
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg;
|
||||
|
||||
public interface IDisplaySize
|
||||
{
|
||||
public interface IDisplaySize
|
||||
{
|
||||
int Width { get; }
|
||||
int Height { get; }
|
||||
}
|
||||
}
|
||||
int Width { get; }
|
||||
int Height { get; }
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg;
|
||||
|
||||
public interface IFFmpegLocator
|
||||
{
|
||||
public interface IFFmpegLocator
|
||||
{
|
||||
Task<Option<string>> ValidatePath(string executableBase, ConfigElementKey key);
|
||||
}
|
||||
}
|
||||
Task<Option<string>> ValidatePath(string executableBase, ConfigElementKey key);
|
||||
}
|
||||
@@ -1,65 +1,61 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using System.Diagnostics;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain.Filler;
|
||||
using ErsatzTV.Core.FFmpeg;
|
||||
using ErsatzTV.FFmpeg.State;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg;
|
||||
|
||||
public interface IFFmpegProcessService
|
||||
{
|
||||
public interface IFFmpegProcessService
|
||||
{
|
||||
Task<Process> ForPlayoutItem(
|
||||
string ffmpegPath,
|
||||
bool saveReports,
|
||||
Channel channel,
|
||||
MediaVersion videoVersion,
|
||||
MediaVersion audioVersion,
|
||||
string videoPath,
|
||||
string audioPath,
|
||||
DateTimeOffset start,
|
||||
DateTimeOffset finish,
|
||||
DateTimeOffset now,
|
||||
Option<ChannelWatermark> globalWatermark,
|
||||
VaapiDriver vaapiDriver,
|
||||
string vaapiDevice,
|
||||
bool hlsRealtime,
|
||||
FillerKind fillerKind,
|
||||
TimeSpan inPoint,
|
||||
TimeSpan outPoint,
|
||||
long ptsOffset,
|
||||
Option<int> targetFramerate);
|
||||
Task<Process> ForPlayoutItem(
|
||||
string ffmpegPath,
|
||||
bool saveReports,
|
||||
Channel channel,
|
||||
MediaVersion videoVersion,
|
||||
MediaVersion audioVersion,
|
||||
string videoPath,
|
||||
string audioPath,
|
||||
DateTimeOffset start,
|
||||
DateTimeOffset finish,
|
||||
DateTimeOffset now,
|
||||
Option<ChannelWatermark> globalWatermark,
|
||||
VaapiDriver vaapiDriver,
|
||||
string vaapiDevice,
|
||||
bool hlsRealtime,
|
||||
FillerKind fillerKind,
|
||||
TimeSpan inPoint,
|
||||
TimeSpan outPoint,
|
||||
long ptsOffset,
|
||||
Option<int> targetFramerate);
|
||||
|
||||
Task<Process> ForError(
|
||||
string ffmpegPath,
|
||||
Channel channel,
|
||||
Option<TimeSpan> duration,
|
||||
string errorMessage,
|
||||
bool hlsRealtime,
|
||||
long ptsOffset);
|
||||
Task<Process> ForError(
|
||||
string ffmpegPath,
|
||||
Channel channel,
|
||||
Option<TimeSpan> duration,
|
||||
string errorMessage,
|
||||
bool hlsRealtime,
|
||||
long ptsOffset);
|
||||
|
||||
Process ConcatChannel(string ffmpegPath, bool saveReports, Channel channel, string scheme, string host);
|
||||
Process ConcatChannel(string ffmpegPath, bool saveReports, Channel channel, string scheme, string host);
|
||||
|
||||
Process WrapSegmenter(string ffmpegPath, bool saveReports, Channel channel, string scheme, string host);
|
||||
Process WrapSegmenter(string ffmpegPath, bool saveReports, Channel channel, string scheme, string host);
|
||||
|
||||
Process ConvertToPng(string ffmpegPath, string inputFile, string outputFile);
|
||||
Process ConvertToPng(string ffmpegPath, string inputFile, string outputFile);
|
||||
|
||||
Process ExtractAttachedPicAsPng(string ffmpegPath, string inputFile, int streamIndex, string outputFile);
|
||||
Process ExtractAttachedPicAsPng(string ffmpegPath, string inputFile, int streamIndex, string outputFile);
|
||||
|
||||
Task<Either<BaseError, string>> GenerateSongImage(
|
||||
string ffmpegPath,
|
||||
Option<string> subtitleFile,
|
||||
Channel channel,
|
||||
Option<ChannelWatermark> globalWatermark,
|
||||
MediaVersion videoVersion,
|
||||
string videoPath,
|
||||
bool boxBlur,
|
||||
Option<string> watermarkPath,
|
||||
WatermarkLocation watermarkLocation,
|
||||
int horizontalMarginPercent,
|
||||
int verticalMarginPercent,
|
||||
int watermarkWidthPercent);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, string>> GenerateSongImage(
|
||||
string ffmpegPath,
|
||||
Option<string> subtitleFile,
|
||||
Channel channel,
|
||||
Option<ChannelWatermark> globalWatermark,
|
||||
MediaVersion videoVersion,
|
||||
string videoPath,
|
||||
bool boxBlur,
|
||||
Option<string> watermarkPath,
|
||||
WatermarkLocation watermarkLocation,
|
||||
int horizontalMarginPercent,
|
||||
int verticalMarginPercent,
|
||||
int watermarkWidthPercent);
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg
|
||||
{
|
||||
public interface IFFmpegSegmenterService
|
||||
{
|
||||
ConcurrentDictionary<string, IHlsSessionWorker> SessionWorkers { get; }
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg;
|
||||
|
||||
void TouchChannel(string channelNumber);
|
||||
}
|
||||
}
|
||||
public interface IFFmpegSegmenterService
|
||||
{
|
||||
ConcurrentDictionary<string, IHlsSessionWorker> SessionWorkers { get; }
|
||||
|
||||
void TouchChannel(string channelNumber);
|
||||
}
|
||||
@@ -1,12 +1,9 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg;
|
||||
|
||||
public interface IFFmpegStreamSelector
|
||||
{
|
||||
public interface IFFmpegStreamSelector
|
||||
{
|
||||
Task<MediaStream> SelectVideoStream(Channel channel, MediaVersion version);
|
||||
Task<Option<MediaStream>> SelectAudioStream(Channel channel, MediaVersion version);
|
||||
}
|
||||
}
|
||||
Task<MediaStream> SelectVideoStream(Channel channel, MediaVersion version);
|
||||
Task<Option<MediaStream>> SelectAudioStream(Channel channel, MediaVersion version);
|
||||
}
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg
|
||||
public interface IHlsSessionWorker
|
||||
{
|
||||
public interface IHlsSessionWorker
|
||||
{
|
||||
DateTimeOffset PlaylistStart { get; }
|
||||
void Touch();
|
||||
}
|
||||
}
|
||||
DateTimeOffset PlaylistStart { get; }
|
||||
void Touch();
|
||||
}
|
||||
@@ -1,16 +1,12 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg;
|
||||
|
||||
public interface ISongVideoGenerator
|
||||
{
|
||||
public interface ISongVideoGenerator
|
||||
{
|
||||
Task<Tuple<string, MediaVersion>> GenerateSongVideo(
|
||||
Song song,
|
||||
Channel channel,
|
||||
Option<ChannelWatermark> maybeGlobalWatermark,
|
||||
string ffmpegPath);
|
||||
}
|
||||
}
|
||||
Task<Tuple<string, MediaVersion>> GenerateSongVideo(
|
||||
Song song,
|
||||
Channel channel,
|
||||
Option<ChannelWatermark> maybeGlobalWatermark,
|
||||
string ffmpegPath);
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
using ErsatzTV.Core.FFmpeg;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg
|
||||
namespace ErsatzTV.Core.Interfaces.FFmpeg;
|
||||
|
||||
public interface ITempFilePool
|
||||
{
|
||||
public interface ITempFilePool
|
||||
{
|
||||
string GetNextTempFile(TempFileCategory category);
|
||||
}
|
||||
}
|
||||
string GetNextTempFile(TempFileCategory category);
|
||||
}
|
||||
@@ -1,12 +1,7 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using LanguageExt;
|
||||
namespace ErsatzTV.Core.Interfaces.GitHub;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.GitHub
|
||||
public interface IGitHubApiClient
|
||||
{
|
||||
public interface IGitHubApiClient
|
||||
{
|
||||
Task<Either<BaseError, string>> GetLatestReleaseNotes(CancellationToken cancellationToken);
|
||||
Task<Either<BaseError, string>> GetReleaseNotes(string tag, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, string>> GetLatestReleaseNotes(CancellationToken cancellationToken);
|
||||
Task<Either<BaseError, string>> GetReleaseNotes(string tag, CancellationToken cancellationToken);
|
||||
}
|
||||
@@ -1,19 +1,15 @@
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Interfaces.FFmpeg;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Images
|
||||
namespace ErsatzTV.Core.Interfaces.Images;
|
||||
|
||||
public interface IImageCache
|
||||
{
|
||||
public interface IImageCache
|
||||
{
|
||||
Task<Either<BaseError, byte[]>> ResizeImage(byte[] imageBuffer, int height);
|
||||
Task<Either<BaseError, string>> SaveArtworkToCache(Stream stream, ArtworkKind artworkKind);
|
||||
Task<Either<BaseError, string>> CopyArtworkToCache(string path, ArtworkKind artworkKind);
|
||||
string GetPathForImage(string fileName, ArtworkKind artworkKind, Option<int> maybeMaxHeight);
|
||||
Task<bool> IsAnimated(string fileName);
|
||||
Task<string> CalculateBlurHash(string fileName, ArtworkKind artworkKind, int x, int y);
|
||||
Task<string> WriteBlurHash(string blurHash, IDisplaySize targetSize);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, byte[]>> ResizeImage(byte[] imageBuffer, int height);
|
||||
Task<Either<BaseError, string>> SaveArtworkToCache(Stream stream, ArtworkKind artworkKind);
|
||||
Task<Either<BaseError, string>> CopyArtworkToCache(string path, ArtworkKind artworkKind);
|
||||
string GetPathForImage(string fileName, ArtworkKind artworkKind, Option<int> maybeMaxHeight);
|
||||
Task<bool> IsAnimated(string fileName);
|
||||
Task<string> CalculateBlurHash(string fileName, ArtworkKind artworkKind, int x, int y);
|
||||
Task<string> WriteBlurHash(string blurHash, IDisplaySize targetSize);
|
||||
}
|
||||
@@ -1,39 +1,35 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Jellyfin;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Jellyfin
|
||||
namespace ErsatzTV.Core.Interfaces.Jellyfin;
|
||||
|
||||
public interface IJellyfinApiClient
|
||||
{
|
||||
public interface IJellyfinApiClient
|
||||
{
|
||||
Task<Either<BaseError, JellyfinServerInformation>> GetServerInformation(string address, string apiKey);
|
||||
Task<Either<BaseError, List<JellyfinLibrary>>> GetLibraries(string address, string apiKey);
|
||||
Task<Either<BaseError, string>> GetAdminUserId(string address, string apiKey);
|
||||
Task<Either<BaseError, JellyfinServerInformation>> GetServerInformation(string address, string apiKey);
|
||||
Task<Either<BaseError, List<JellyfinLibrary>>> GetLibraries(string address, string apiKey);
|
||||
Task<Either<BaseError, string>> GetAdminUserId(string address, string apiKey);
|
||||
|
||||
Task<Either<BaseError, List<JellyfinMovie>>> GetMovieLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string libraryId);
|
||||
Task<Either<BaseError, List<JellyfinMovie>>> GetMovieLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string libraryId);
|
||||
|
||||
Task<Either<BaseError, List<JellyfinShow>>> GetShowLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string libraryId);
|
||||
Task<Either<BaseError, List<JellyfinShow>>> GetShowLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string libraryId);
|
||||
|
||||
Task<Either<BaseError, List<JellyfinSeason>>> GetSeasonLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string showId);
|
||||
Task<Either<BaseError, List<JellyfinSeason>>> GetSeasonLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string showId);
|
||||
|
||||
Task<Either<BaseError, List<JellyfinEpisode>>> GetEpisodeLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string seasonId);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, List<JellyfinEpisode>>> GetEpisodeLibraryItems(
|
||||
string address,
|
||||
string apiKey,
|
||||
int mediaSourceId,
|
||||
string seasonId);
|
||||
}
|
||||
@@ -1,15 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Jellyfin
|
||||
namespace ErsatzTV.Core.Interfaces.Jellyfin;
|
||||
|
||||
public interface IJellyfinMovieLibraryScanner
|
||||
{
|
||||
public interface IJellyfinMovieLibraryScanner
|
||||
{
|
||||
Task<Either<BaseError, Unit>> ScanLibrary(
|
||||
string address,
|
||||
string apiKey,
|
||||
JellyfinLibrary library,
|
||||
string ffprobePath);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Unit>> ScanLibrary(
|
||||
string address,
|
||||
string apiKey,
|
||||
JellyfinLibrary library,
|
||||
string ffprobePath);
|
||||
}
|
||||
@@ -1,12 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Jellyfin
|
||||
namespace ErsatzTV.Core.Interfaces.Jellyfin;
|
||||
|
||||
public interface IJellyfinPathReplacementService
|
||||
{
|
||||
public interface IJellyfinPathReplacementService
|
||||
{
|
||||
Task<string> GetReplacementJellyfinPath(int libraryPathId, string path);
|
||||
string GetReplacementJellyfinPath(List<JellyfinPathReplacement> pathReplacements, string path, bool log = true);
|
||||
}
|
||||
}
|
||||
Task<string> GetReplacementJellyfinPath(int libraryPathId, string path);
|
||||
string GetReplacementJellyfinPath(List<JellyfinPathReplacement> pathReplacements, string path, bool log = true);
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
using ErsatzTV.Core.Interfaces.MediaSources;
|
||||
using ErsatzTV.Core.Jellyfin;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Jellyfin
|
||||
namespace ErsatzTV.Core.Interfaces.Jellyfin;
|
||||
|
||||
public interface IJellyfinSecretStore : IRemoteMediaSourceSecretStore<JellyfinSecrets>
|
||||
{
|
||||
public interface IJellyfinSecretStore : IRemoteMediaSourceSecretStore<JellyfinSecrets>
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Jellyfin
|
||||
namespace ErsatzTV.Core.Interfaces.Jellyfin;
|
||||
|
||||
public interface IJellyfinTelevisionLibraryScanner
|
||||
{
|
||||
public interface IJellyfinTelevisionLibraryScanner
|
||||
{
|
||||
Task<Either<BaseError, Unit>> ScanLibrary(
|
||||
string address,
|
||||
string apiKey,
|
||||
JellyfinLibrary library,
|
||||
string ffprobePath);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Unit>> ScanLibrary(
|
||||
string address,
|
||||
string apiKey,
|
||||
JellyfinLibrary library,
|
||||
string ffprobePath);
|
||||
}
|
||||
@@ -1,24 +1,21 @@
|
||||
using System;
|
||||
namespace ErsatzTV.Core.Interfaces.Locking;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Locking
|
||||
public interface IEntityLocker
|
||||
{
|
||||
public interface IEntityLocker
|
||||
{
|
||||
event EventHandler OnLibraryChanged;
|
||||
event EventHandler OnPlexChanged;
|
||||
event EventHandler<Type> OnRemoteMediaSourceChanged;
|
||||
event EventHandler OnTraktChanged;
|
||||
bool LockLibrary(int libraryId);
|
||||
bool UnlockLibrary(int libraryId);
|
||||
bool IsLibraryLocked(int libraryId);
|
||||
bool LockPlex();
|
||||
bool UnlockPlex();
|
||||
bool IsPlexLocked();
|
||||
bool IsRemoteMediaSourceLocked<TMediaSource>();
|
||||
bool LockRemoteMediaSource<TMediaSource>();
|
||||
bool UnlockRemoteMediaSource<TMediaSource>();
|
||||
bool IsTraktLocked();
|
||||
bool LockTrakt();
|
||||
bool UnlockTrakt();
|
||||
}
|
||||
}
|
||||
event EventHandler OnLibraryChanged;
|
||||
event EventHandler OnPlexChanged;
|
||||
event EventHandler<Type> OnRemoteMediaSourceChanged;
|
||||
event EventHandler OnTraktChanged;
|
||||
bool LockLibrary(int libraryId);
|
||||
bool UnlockLibrary(int libraryId);
|
||||
bool IsLibraryLocked(int libraryId);
|
||||
bool LockPlex();
|
||||
bool UnlockPlex();
|
||||
bool IsPlexLocked();
|
||||
bool IsRemoteMediaSourceLocked<TMediaSource>();
|
||||
bool LockRemoteMediaSource<TMediaSource>();
|
||||
bool UnlockRemoteMediaSource<TMediaSource>();
|
||||
bool IsTraktLocked();
|
||||
bool LockTrakt();
|
||||
bool UnlockTrakt();
|
||||
}
|
||||
@@ -1,12 +1,8 @@
|
||||
using System.Threading.Tasks;
|
||||
using LanguageExt;
|
||||
namespace ErsatzTV.Core.Interfaces.MediaSources;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.MediaSources
|
||||
public interface IRemoteMediaSourceSecretStore<TSecrets>
|
||||
{
|
||||
public interface IRemoteMediaSourceSecretStore<TSecrets>
|
||||
{
|
||||
Task<Unit> DeleteAll();
|
||||
Task<TSecrets> ReadSecrets();
|
||||
Task<Unit> SaveSecrets(TSecrets jellyfinSecrets);
|
||||
}
|
||||
}
|
||||
Task<Unit> DeleteAll();
|
||||
Task<TSecrets> ReadSecrets();
|
||||
Task<Unit> SaveSecrets(TSecrets jellyfinSecrets);
|
||||
}
|
||||
@@ -1,18 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata;
|
||||
|
||||
public interface IFallbackMetadataProvider
|
||||
{
|
||||
public interface IFallbackMetadataProvider
|
||||
{
|
||||
ShowMetadata GetFallbackMetadataForShow(string showFolder);
|
||||
ArtistMetadata GetFallbackMetadataForArtist(string artistFolder);
|
||||
List<EpisodeMetadata> GetFallbackMetadata(Episode episode);
|
||||
MovieMetadata GetFallbackMetadata(Movie movie);
|
||||
Option<MusicVideoMetadata> GetFallbackMetadata(MusicVideo musicVideo);
|
||||
Option<OtherVideoMetadata> GetFallbackMetadata(OtherVideo otherVideo);
|
||||
Option<SongMetadata> GetFallbackMetadata(Song song);
|
||||
string GetSortTitle(string title);
|
||||
}
|
||||
}
|
||||
ShowMetadata GetFallbackMetadataForShow(string showFolder);
|
||||
ArtistMetadata GetFallbackMetadataForArtist(string artistFolder);
|
||||
List<EpisodeMetadata> GetFallbackMetadata(Episode episode);
|
||||
MovieMetadata GetFallbackMetadata(Movie movie);
|
||||
Option<MusicVideoMetadata> GetFallbackMetadata(MusicVideo musicVideo);
|
||||
Option<OtherVideoMetadata> GetFallbackMetadata(OtherVideo otherVideo);
|
||||
Option<SongMetadata> GetFallbackMetadata(Song song);
|
||||
string GetSortTitle(string title);
|
||||
}
|
||||
@@ -1,21 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata;
|
||||
|
||||
public interface ILocalFileSystem
|
||||
{
|
||||
public interface ILocalFileSystem
|
||||
{
|
||||
Unit EnsureFolderExists(string folder);
|
||||
DateTime GetLastWriteTime(string path);
|
||||
bool IsLibraryPathAccessible(LibraryPath libraryPath);
|
||||
IEnumerable<string> ListSubdirectories(string folder);
|
||||
IEnumerable<string> ListFiles(string folder);
|
||||
bool FileExists(string path);
|
||||
bool FolderExists(string folder);
|
||||
Task<Either<BaseError, Unit>> CopyFile(string source, string destination);
|
||||
Unit EmptyFolder(string folder);
|
||||
}
|
||||
}
|
||||
Unit EnsureFolderExists(string folder);
|
||||
DateTime GetLastWriteTime(string path);
|
||||
bool IsLibraryPathAccessible(LibraryPath libraryPath);
|
||||
IEnumerable<string> ListSubdirectories(string folder);
|
||||
IEnumerable<string> ListFiles(string folder);
|
||||
bool FileExists(string path);
|
||||
bool FolderExists(string folder);
|
||||
Task<Either<BaseError, Unit>> CopyFile(string source, string destination);
|
||||
Unit EmptyFolder(string folder);
|
||||
}
|
||||
@@ -1,24 +1,22 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata;
|
||||
|
||||
public interface ILocalMetadataProvider
|
||||
{
|
||||
public interface ILocalMetadataProvider
|
||||
{
|
||||
Task<ShowMetadata> GetMetadataForShow(string showFolder);
|
||||
Task<ArtistMetadata> GetMetadataForArtist(string artistFolder);
|
||||
Task<bool> RefreshSidecarMetadata(Movie movie, string nfoFileName);
|
||||
Task<bool> RefreshSidecarMetadata(Show televisionShow, string nfoFileName);
|
||||
Task<bool> RefreshSidecarMetadata(Episode episode, string nfoFileName);
|
||||
Task<bool> RefreshSidecarMetadata(Artist artist, string nfoFileName);
|
||||
Task<bool> RefreshSidecarMetadata(MusicVideo musicVideo, string nfoFileName);
|
||||
Task<bool> RefreshTagMetadata(Song song, string ffprobePath);
|
||||
Task<bool> RefreshFallbackMetadata(Movie movie);
|
||||
Task<bool> RefreshFallbackMetadata(Episode episode);
|
||||
Task<bool> RefreshFallbackMetadata(Artist artist, string artistFolder);
|
||||
Task<bool> RefreshFallbackMetadata(MusicVideo musicVideo);
|
||||
Task<bool> RefreshFallbackMetadata(OtherVideo otherVideo);
|
||||
Task<bool> RefreshFallbackMetadata(Song song);
|
||||
Task<bool> RefreshFallbackMetadata(Show televisionShow, string showFolder);
|
||||
}
|
||||
}
|
||||
Task<ShowMetadata> GetMetadataForShow(string showFolder);
|
||||
Task<ArtistMetadata> GetMetadataForArtist(string artistFolder);
|
||||
Task<bool> RefreshSidecarMetadata(Movie movie, string nfoFileName);
|
||||
Task<bool> RefreshSidecarMetadata(Show televisionShow, string nfoFileName);
|
||||
Task<bool> RefreshSidecarMetadata(Episode episode, string nfoFileName);
|
||||
Task<bool> RefreshSidecarMetadata(Artist artist, string nfoFileName);
|
||||
Task<bool> RefreshSidecarMetadata(MusicVideo musicVideo, string nfoFileName);
|
||||
Task<bool> RefreshTagMetadata(Song song, string ffprobePath);
|
||||
Task<bool> RefreshFallbackMetadata(Movie movie);
|
||||
Task<bool> RefreshFallbackMetadata(Episode episode);
|
||||
Task<bool> RefreshFallbackMetadata(Artist artist, string artistFolder);
|
||||
Task<bool> RefreshFallbackMetadata(MusicVideo musicVideo);
|
||||
Task<bool> RefreshFallbackMetadata(OtherVideo otherVideo);
|
||||
Task<bool> RefreshFallbackMetadata(Song song);
|
||||
Task<bool> RefreshFallbackMetadata(Show televisionShow, string showFolder);
|
||||
}
|
||||
@@ -1,15 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata;
|
||||
|
||||
public interface ILocalStatisticsProvider
|
||||
{
|
||||
public interface ILocalStatisticsProvider
|
||||
{
|
||||
Task<Either<BaseError, bool>> RefreshStatistics(string ffprobePath, MediaItem mediaItem);
|
||||
Task<Either<BaseError, bool>> RefreshStatistics(string ffprobePath, MediaItem mediaItem, string mediaItemPath);
|
||||
Task<Either<BaseError, bool>> RefreshStatistics(string ffprobePath, MediaItem mediaItem);
|
||||
Task<Either<BaseError, bool>> RefreshStatistics(string ffprobePath, MediaItem mediaItem, string mediaItemPath);
|
||||
|
||||
Task<Either<BaseError, Dictionary<string, string>>> GetFormatTags(string ffprobePath, MediaItem mediaItem);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Dictionary<string, string>>> GetFormatTags(string ffprobePath, MediaItem mediaItem);
|
||||
}
|
||||
@@ -1,15 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata;
|
||||
|
||||
public interface IMovieFolderScanner
|
||||
{
|
||||
public interface IMovieFolderScanner
|
||||
{
|
||||
Task<Either<BaseError, Unit>> ScanFolder(
|
||||
LibraryPath libraryPath,
|
||||
string ffprobePath,
|
||||
decimal progressMin,
|
||||
decimal progressMax);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Unit>> ScanFolder(
|
||||
LibraryPath libraryPath,
|
||||
string ffprobePath,
|
||||
decimal progressMin,
|
||||
decimal progressMax);
|
||||
}
|
||||
@@ -1,15 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata;
|
||||
|
||||
public interface IMusicVideoFolderScanner
|
||||
{
|
||||
public interface IMusicVideoFolderScanner
|
||||
{
|
||||
Task<Either<BaseError, Unit>> ScanFolder(
|
||||
LibraryPath libraryPath,
|
||||
string ffprobePath,
|
||||
decimal progressMin,
|
||||
decimal progressMax);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Unit>> ScanFolder(
|
||||
LibraryPath libraryPath,
|
||||
string ffprobePath,
|
||||
decimal progressMin,
|
||||
decimal progressMax);
|
||||
}
|
||||
@@ -1,15 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata;
|
||||
|
||||
public interface IOtherVideoFolderScanner
|
||||
{
|
||||
public interface IOtherVideoFolderScanner
|
||||
{
|
||||
Task<Either<BaseError, Unit>> ScanFolder(
|
||||
LibraryPath libraryPath,
|
||||
string ffprobePath,
|
||||
decimal progressMin,
|
||||
decimal progressMax);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Unit>> ScanFolder(
|
||||
LibraryPath libraryPath,
|
||||
string ffprobePath,
|
||||
decimal progressMin,
|
||||
decimal progressMax);
|
||||
}
|
||||
@@ -1,16 +1,13 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata;
|
||||
|
||||
public interface ISongFolderScanner
|
||||
{
|
||||
public interface ISongFolderScanner
|
||||
{
|
||||
Task<Either<BaseError, Unit>> ScanFolder(
|
||||
LibraryPath libraryPath,
|
||||
string ffprobePath,
|
||||
string ffmpegPath,
|
||||
decimal progressMin,
|
||||
decimal progressMax);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Unit>> ScanFolder(
|
||||
LibraryPath libraryPath,
|
||||
string ffprobePath,
|
||||
string ffmpegPath,
|
||||
decimal progressMin,
|
||||
decimal progressMax);
|
||||
}
|
||||
@@ -1,15 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata;
|
||||
|
||||
public interface ITelevisionFolderScanner
|
||||
{
|
||||
public interface ITelevisionFolderScanner
|
||||
{
|
||||
Task<Either<BaseError, Unit>> ScanFolder(
|
||||
LibraryPath libraryPath,
|
||||
string ffprobePath,
|
||||
decimal progressMin,
|
||||
decimal progressMax);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Unit>> ScanFolder(
|
||||
LibraryPath libraryPath,
|
||||
string ffprobePath,
|
||||
decimal progressMin,
|
||||
decimal progressMax);
|
||||
}
|
||||
@@ -1,12 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Metadata.Nfo;
|
||||
using ErsatzTV.Core.Metadata.Nfo;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata.Nfo
|
||||
namespace ErsatzTV.Core.Interfaces.Metadata.Nfo;
|
||||
|
||||
public interface IEpisodeNfoReader
|
||||
{
|
||||
public interface IEpisodeNfoReader
|
||||
{
|
||||
Task<List<TvShowEpisodeNfo>> Read(Stream input);
|
||||
}
|
||||
}
|
||||
Task<List<TvShowEpisodeNfo>> Read(Stream input);
|
||||
}
|
||||
@@ -1,16 +1,13 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Plex;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Plex
|
||||
namespace ErsatzTV.Core.Interfaces.Plex;
|
||||
|
||||
public interface IPlexMovieLibraryScanner
|
||||
{
|
||||
public interface IPlexMovieLibraryScanner
|
||||
{
|
||||
Task<Either<BaseError, Unit>> ScanLibrary(
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token,
|
||||
PlexLibrary library,
|
||||
string ffprobePath);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Unit>> ScanLibrary(
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token,
|
||||
PlexLibrary library,
|
||||
string ffprobePath);
|
||||
}
|
||||
@@ -1,12 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Plex
|
||||
namespace ErsatzTV.Core.Interfaces.Plex;
|
||||
|
||||
public interface IPlexPathReplacementService
|
||||
{
|
||||
public interface IPlexPathReplacementService
|
||||
{
|
||||
Task<string> GetReplacementPlexPath(int libraryPathId, string path);
|
||||
string GetReplacementPlexPath(List<PlexPathReplacement> pathReplacements, string path, bool log = true);
|
||||
}
|
||||
}
|
||||
Task<string> GetReplacementPlexPath(int libraryPathId, string path);
|
||||
string GetReplacementPlexPath(List<PlexPathReplacement> pathReplacements, string path, bool log = true);
|
||||
}
|
||||
@@ -1,17 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Plex;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Plex;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Plex
|
||||
namespace ErsatzTV.Core.Interfaces.Plex;
|
||||
|
||||
public interface IPlexSecretStore
|
||||
{
|
||||
public interface IPlexSecretStore
|
||||
{
|
||||
Task<string> GetClientIdentifier();
|
||||
Task<List<PlexUserAuthToken>> GetUserAuthTokens();
|
||||
Task<Unit> UpsertUserAuthToken(PlexUserAuthToken userAuthToken);
|
||||
Task<Option<PlexServerAuthToken>> GetServerAuthToken(string clientIdentifier);
|
||||
Task<Unit> UpsertServerAuthToken(PlexServerAuthToken serverAuthToken);
|
||||
Task<Unit> DeleteAll();
|
||||
}
|
||||
}
|
||||
Task<string> GetClientIdentifier();
|
||||
Task<List<PlexUserAuthToken>> GetUserAuthTokens();
|
||||
Task<Unit> UpsertUserAuthToken(PlexUserAuthToken userAuthToken);
|
||||
Task<Option<PlexServerAuthToken>> GetServerAuthToken(string clientIdentifier);
|
||||
Task<Unit> UpsertServerAuthToken(PlexServerAuthToken serverAuthToken);
|
||||
Task<Unit> DeleteAll();
|
||||
}
|
||||
@@ -1,66 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Plex;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Plex
|
||||
namespace ErsatzTV.Core.Interfaces.Plex;
|
||||
|
||||
public interface IPlexServerApiClient
|
||||
{
|
||||
public interface IPlexServerApiClient
|
||||
{
|
||||
Task<bool> Ping(
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
Task<bool> Ping(
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
|
||||
Task<Either<BaseError, List<PlexLibrary>>> GetLibraries(
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
Task<Either<BaseError, List<PlexLibrary>>> GetLibraries(
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
|
||||
Task<Either<BaseError, List<PlexMovie>>> GetMovieLibraryContents(
|
||||
PlexLibrary library,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
Task<Either<BaseError, List<PlexMovie>>> GetMovieLibraryContents(
|
||||
PlexLibrary library,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
|
||||
Task<Either<BaseError, List<PlexShow>>> GetShowLibraryContents(
|
||||
PlexLibrary library,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
Task<Either<BaseError, List<PlexShow>>> GetShowLibraryContents(
|
||||
PlexLibrary library,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
|
||||
Task<Either<BaseError, List<PlexSeason>>> GetShowSeasons(
|
||||
PlexLibrary library,
|
||||
PlexShow show,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
Task<Either<BaseError, List<PlexSeason>>> GetShowSeasons(
|
||||
PlexLibrary library,
|
||||
PlexShow show,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
|
||||
Task<Either<BaseError, List<PlexEpisode>>> GetSeasonEpisodes(
|
||||
PlexLibrary library,
|
||||
PlexSeason season,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
Task<Either<BaseError, List<PlexEpisode>>> GetSeasonEpisodes(
|
||||
PlexLibrary library,
|
||||
PlexSeason season,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
|
||||
Task<Either<BaseError, MovieMetadata>> GetMovieMetadata(
|
||||
PlexLibrary library,
|
||||
string key,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
Task<Either<BaseError, MovieMetadata>> GetMovieMetadata(
|
||||
PlexLibrary library,
|
||||
string key,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
|
||||
Task<Either<BaseError, ShowMetadata>> GetShowMetadata(
|
||||
PlexLibrary library,
|
||||
string key,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
Task<Either<BaseError, ShowMetadata>> GetShowMetadata(
|
||||
PlexLibrary library,
|
||||
string key,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
|
||||
Task<Either<BaseError, Tuple<MovieMetadata, MediaVersion>>> GetMovieMetadataAndStatistics(
|
||||
PlexLibrary library,
|
||||
string key,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
Task<Either<BaseError, Tuple<MovieMetadata, MediaVersion>>> GetMovieMetadataAndStatistics(
|
||||
PlexLibrary library,
|
||||
string key,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
|
||||
Task<Either<BaseError, Tuple<EpisodeMetadata, MediaVersion>>> GetEpisodeMetadataAndStatistics(
|
||||
PlexLibrary library,
|
||||
string key,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Tuple<EpisodeMetadata, MediaVersion>>> GetEpisodeMetadataAndStatistics(
|
||||
PlexLibrary library,
|
||||
string key,
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token);
|
||||
}
|
||||
@@ -1,16 +1,13 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Plex;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Plex
|
||||
namespace ErsatzTV.Core.Interfaces.Plex;
|
||||
|
||||
public interface IPlexTelevisionLibraryScanner
|
||||
{
|
||||
public interface IPlexTelevisionLibraryScanner
|
||||
{
|
||||
Task<Either<BaseError, Unit>> ScanLibrary(
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token,
|
||||
PlexLibrary library,
|
||||
string ffprobePath);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Unit>> ScanLibrary(
|
||||
PlexConnection connection,
|
||||
PlexServerAuthToken token,
|
||||
PlexLibrary library,
|
||||
string ffprobePath);
|
||||
}
|
||||
@@ -1,15 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Plex;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Plex
|
||||
namespace ErsatzTV.Core.Interfaces.Plex;
|
||||
|
||||
public interface IPlexTvApiClient
|
||||
{
|
||||
public interface IPlexTvApiClient
|
||||
{
|
||||
Task<Either<BaseError, PlexAuthPin>> StartPinFlow();
|
||||
Task<bool> TryCompletePinFlow(PlexAuthPin authPin);
|
||||
Task<Either<BaseError, List<PlexMediaSource>>> GetServers();
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, PlexAuthPin>> StartPinFlow();
|
||||
Task<bool> TryCompletePinFlow(PlexAuthPin authPin);
|
||||
Task<Either<BaseError, List<PlexMediaSource>>> GetServers();
|
||||
}
|
||||
@@ -1,27 +1,23 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Metadata;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IArtistRepository
|
||||
{
|
||||
public interface IArtistRepository
|
||||
{
|
||||
Task<Option<Artist>> GetArtistByMetadata(int libraryPathId, ArtistMetadata metadata);
|
||||
Task<Option<Artist>> GetArtistByMetadata(int libraryPathId, ArtistMetadata metadata);
|
||||
|
||||
Task<Either<BaseError, MediaItemScanResult<Artist>>> AddArtist(
|
||||
int libraryPathId,
|
||||
string artistFolder,
|
||||
ArtistMetadata metadata);
|
||||
Task<Either<BaseError, MediaItemScanResult<Artist>>> AddArtist(
|
||||
int libraryPathId,
|
||||
string artistFolder,
|
||||
ArtistMetadata metadata);
|
||||
|
||||
Task<List<int>> DeleteEmptyArtists(LibraryPath libraryPath);
|
||||
Task<Option<Artist>> GetArtist(int artistId);
|
||||
Task<List<ArtistMetadata>> GetArtistsForCards(List<int> ids);
|
||||
Task<bool> AddGenre(ArtistMetadata metadata, Genre genre);
|
||||
Task<bool> AddStyle(ArtistMetadata metadata, Style style);
|
||||
Task<bool> AddMood(ArtistMetadata metadata, Mood mood);
|
||||
Task<List<MusicVideo>> GetArtistItems(int artistId);
|
||||
Task<List<Artist>> GetAllArtists();
|
||||
}
|
||||
}
|
||||
Task<List<int>> DeleteEmptyArtists(LibraryPath libraryPath);
|
||||
Task<Option<Artist>> GetArtist(int artistId);
|
||||
Task<List<ArtistMetadata>> GetArtistsForCards(List<int> ids);
|
||||
Task<bool> AddGenre(ArtistMetadata metadata, Genre genre);
|
||||
Task<bool> AddStyle(ArtistMetadata metadata, Style style);
|
||||
Task<bool> AddMood(ArtistMetadata metadata, Mood mood);
|
||||
Task<List<MusicVideo>> GetArtistItems(int artistId);
|
||||
Task<List<Artist>> GetAllArtists();
|
||||
}
|
||||
@@ -1,13 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IArtworkRepository
|
||||
{
|
||||
public interface IArtworkRepository
|
||||
{
|
||||
Task<List<Artwork>> GetOrphanedArtwork();
|
||||
Task<Unit> Delete(List<Artwork> artwork);
|
||||
}
|
||||
}
|
||||
Task<List<Artwork>> GetOrphanedArtwork();
|
||||
Task<Unit> Delete(List<Artwork> artwork);
|
||||
}
|
||||
@@ -1,16 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IChannelRepository
|
||||
{
|
||||
public interface IChannelRepository
|
||||
{
|
||||
Task<Option<Channel>> Get(int id);
|
||||
Task<Option<Channel>> GetByNumber(string number);
|
||||
Task<List<Channel>> GetAll();
|
||||
Task<List<Channel>> GetAllForGuide();
|
||||
Task Delete(int channelId);
|
||||
}
|
||||
}
|
||||
Task<Option<Channel>> Get(int id);
|
||||
Task<Option<Channel>> GetByNumber(string number);
|
||||
Task<List<Channel>> GetAll();
|
||||
Task<List<Channel>> GetAllForGuide();
|
||||
Task Delete(int channelId);
|
||||
}
|
||||
@@ -1,15 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IConfigElementRepository
|
||||
{
|
||||
public interface IConfigElementRepository
|
||||
{
|
||||
Task<Unit> Upsert<T>(ConfigElementKey configElementKey, T value);
|
||||
Task<Option<ConfigElement>> Get(ConfigElementKey key);
|
||||
Task<Option<T>> GetValue<T>(ConfigElementKey key);
|
||||
Task Delete(ConfigElement configElement);
|
||||
Task<Unit> Delete(ConfigElementKey configElementKey);
|
||||
}
|
||||
}
|
||||
Task<Unit> Upsert<T>(ConfigElementKey configElementKey, T value);
|
||||
Task<Option<ConfigElement>> Get(ConfigElementKey key);
|
||||
Task<Option<T>> GetValue<T>(ConfigElementKey key);
|
||||
Task Delete(ConfigElement configElement);
|
||||
Task<Unit> Delete(ConfigElementKey configElementKey);
|
||||
}
|
||||
@@ -1,26 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Emby;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IEmbyTelevisionRepository
|
||||
{
|
||||
public interface IEmbyTelevisionRepository
|
||||
{
|
||||
Task<List<EmbyItemEtag>> GetExistingShows(EmbyLibrary library);
|
||||
Task<List<EmbyItemEtag>> GetExistingSeasons(EmbyLibrary library, string showItemId);
|
||||
Task<List<EmbyItemEtag>> GetExistingEpisodes(EmbyLibrary library, string seasonItemId);
|
||||
Task<bool> AddShow(EmbyShow show);
|
||||
Task<Option<EmbyShow>> Update(EmbyShow show);
|
||||
Task<bool> AddSeason(EmbyShow show, EmbySeason season);
|
||||
Task<Option<EmbySeason>> Update(EmbySeason season);
|
||||
Task<bool> AddEpisode(EmbySeason season, EmbyEpisode episode);
|
||||
Task<Option<EmbyEpisode>> Update(EmbyEpisode episode);
|
||||
Task<List<int>> RemoveMissingShows(EmbyLibrary library, List<string> showIds);
|
||||
Task<Unit> RemoveMissingSeasons(EmbyLibrary library, List<string> seasonIds);
|
||||
Task<List<int>> RemoveMissingEpisodes(EmbyLibrary library, List<string> episodeIds);
|
||||
Task<Unit> DeleteEmptySeasons(EmbyLibrary library);
|
||||
Task<List<int>> DeleteEmptyShows(EmbyLibrary library);
|
||||
}
|
||||
}
|
||||
Task<List<EmbyItemEtag>> GetExistingShows(EmbyLibrary library);
|
||||
Task<List<EmbyItemEtag>> GetExistingSeasons(EmbyLibrary library, string showItemId);
|
||||
Task<List<EmbyItemEtag>> GetExistingEpisodes(EmbyLibrary library, string seasonItemId);
|
||||
Task<bool> AddShow(EmbyShow show);
|
||||
Task<Option<EmbyShow>> Update(EmbyShow show);
|
||||
Task<bool> AddSeason(EmbyShow show, EmbySeason season);
|
||||
Task<Option<EmbySeason>> Update(EmbySeason season);
|
||||
Task<bool> AddEpisode(EmbySeason season, EmbyEpisode episode);
|
||||
Task<Option<EmbyEpisode>> Update(EmbyEpisode episode);
|
||||
Task<List<int>> RemoveMissingShows(EmbyLibrary library, List<string> showIds);
|
||||
Task<Unit> RemoveMissingSeasons(EmbyLibrary library, List<string> seasonIds);
|
||||
Task<List<int>> RemoveMissingEpisodes(EmbyLibrary library, List<string> episodeIds);
|
||||
Task<Unit> DeleteEmptySeasons(EmbyLibrary library);
|
||||
Task<List<int>> DeleteEmptyShows(EmbyLibrary library);
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IFFmpegProfileRepository
|
||||
{
|
||||
public interface IFFmpegProfileRepository
|
||||
{
|
||||
Task<FFmpegProfile> Copy(int ffmpegProfileId, string name);
|
||||
}
|
||||
}
|
||||
Task<FFmpegProfile> Copy(int ffmpegProfileId, string name);
|
||||
}
|
||||
@@ -1,26 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Jellyfin;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IJellyfinTelevisionRepository
|
||||
{
|
||||
public interface IJellyfinTelevisionRepository
|
||||
{
|
||||
Task<List<JellyfinItemEtag>> GetExistingShows(JellyfinLibrary library);
|
||||
Task<List<JellyfinItemEtag>> GetExistingSeasons(JellyfinLibrary library, string showItemId);
|
||||
Task<List<JellyfinItemEtag>> GetExistingEpisodes(JellyfinLibrary library, string seasonItemId);
|
||||
Task<bool> AddShow(JellyfinShow show);
|
||||
Task<Option<JellyfinShow>> Update(JellyfinShow show);
|
||||
Task<bool> AddSeason(JellyfinShow show, JellyfinSeason season);
|
||||
Task<Option<JellyfinSeason>> Update(JellyfinSeason season);
|
||||
Task<bool> AddEpisode(JellyfinSeason season, JellyfinEpisode episode);
|
||||
Task<Option<JellyfinEpisode>> Update(JellyfinEpisode episode);
|
||||
Task<List<int>> RemoveMissingShows(JellyfinLibrary library, List<string> showIds);
|
||||
Task<Unit> RemoveMissingSeasons(JellyfinLibrary library, List<string> seasonIds);
|
||||
Task<List<int>> RemoveMissingEpisodes(JellyfinLibrary library, List<string> episodeIds);
|
||||
Task<Unit> DeleteEmptySeasons(JellyfinLibrary library);
|
||||
Task<List<int>> DeleteEmptyShows(JellyfinLibrary library);
|
||||
}
|
||||
}
|
||||
Task<List<JellyfinItemEtag>> GetExistingShows(JellyfinLibrary library);
|
||||
Task<List<JellyfinItemEtag>> GetExistingSeasons(JellyfinLibrary library, string showItemId);
|
||||
Task<List<JellyfinItemEtag>> GetExistingEpisodes(JellyfinLibrary library, string seasonItemId);
|
||||
Task<bool> AddShow(JellyfinShow show);
|
||||
Task<Option<JellyfinShow>> Update(JellyfinShow show);
|
||||
Task<bool> AddSeason(JellyfinShow show, JellyfinSeason season);
|
||||
Task<Option<JellyfinSeason>> Update(JellyfinSeason season);
|
||||
Task<bool> AddEpisode(JellyfinSeason season, JellyfinEpisode episode);
|
||||
Task<Option<JellyfinEpisode>> Update(JellyfinEpisode episode);
|
||||
Task<List<int>> RemoveMissingShows(JellyfinLibrary library, List<string> showIds);
|
||||
Task<Unit> RemoveMissingSeasons(JellyfinLibrary library, List<string> seasonIds);
|
||||
Task<List<int>> RemoveMissingEpisodes(JellyfinLibrary library, List<string> episodeIds);
|
||||
Task<Unit> DeleteEmptySeasons(JellyfinLibrary library);
|
||||
Task<List<int>> DeleteEmptyShows(JellyfinLibrary library);
|
||||
}
|
||||
@@ -1,24 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface ILibraryRepository
|
||||
{
|
||||
public interface ILibraryRepository
|
||||
{
|
||||
Task<LibraryPath> Add(LibraryPath libraryPath);
|
||||
Task<Option<Library>> Get(int libraryId);
|
||||
Task<Option<LocalLibrary>> GetLocal(int libraryId);
|
||||
Task<List<Library>> GetAll();
|
||||
Task<Unit> UpdateLastScan(Library library);
|
||||
Task<Unit> UpdateLastScan(LibraryPath libraryPath);
|
||||
Task<List<LibraryPath>> GetLocalPaths(int libraryId);
|
||||
Task<Option<LibraryPath>> GetPath(int libraryPathId);
|
||||
Task<int> CountMediaItemsByPath(int libraryPathId);
|
||||
Task<List<int>> GetMediaIdsByLocalPath(int libraryPathId);
|
||||
Task DeleteLocalPath(int libraryPathId);
|
||||
Task<Unit> SetEtag(LibraryPath libraryPath, Option<LibraryFolder> knownFolder, string path, string etag);
|
||||
Task<Unit> CleanEtagsForLibraryPath(LibraryPath libraryPath);
|
||||
}
|
||||
}
|
||||
Task<LibraryPath> Add(LibraryPath libraryPath);
|
||||
Task<Option<Library>> Get(int libraryId);
|
||||
Task<Option<LocalLibrary>> GetLocal(int libraryId);
|
||||
Task<List<Library>> GetAll();
|
||||
Task<Unit> UpdateLastScan(Library library);
|
||||
Task<Unit> UpdateLastScan(LibraryPath libraryPath);
|
||||
Task<List<LibraryPath>> GetLocalPaths(int libraryId);
|
||||
Task<Option<LibraryPath>> GetPath(int libraryPathId);
|
||||
Task<int> CountMediaItemsByPath(int libraryPathId);
|
||||
Task<List<int>> GetMediaIdsByLocalPath(int libraryPathId);
|
||||
Task DeleteLocalPath(int libraryPathId);
|
||||
Task<Unit> SetEtag(LibraryPath libraryPath, Option<LibraryFolder> knownFolder, string path, string etag);
|
||||
Task<Unit> CleanEtagsForLibraryPath(LibraryPath libraryPath);
|
||||
}
|
||||
@@ -1,23 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Scheduling;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IMediaCollectionRepository
|
||||
{
|
||||
public interface IMediaCollectionRepository
|
||||
{
|
||||
Task<Option<Collection>> GetCollectionWithCollectionItemsUntracked(int id);
|
||||
Task<List<MediaItem>> GetItems(int id);
|
||||
Task<List<MediaItem>> GetMultiCollectionItems(int id);
|
||||
Task<List<MediaItem>> GetSmartCollectionItems(int id);
|
||||
Task<List<CollectionWithItems>> GetMultiCollectionCollections(int id);
|
||||
Task<List<CollectionWithItems>> GetFakeMultiCollectionCollections(int? collectionId, int? smartCollectionId);
|
||||
Task<List<int>> PlayoutIdsUsingCollection(int collectionId);
|
||||
Task<List<int>> PlayoutIdsUsingMultiCollection(int multiCollectionId);
|
||||
Task<List<int>> PlayoutIdsUsingSmartCollection(int smartCollectionId);
|
||||
Task<bool> IsCustomPlaybackOrder(int collectionId);
|
||||
Task<Option<string>> GetNameFromKey(CollectionKey emptyCollection);
|
||||
}
|
||||
}
|
||||
Task<Option<Collection>> GetCollectionWithCollectionItemsUntracked(int id);
|
||||
Task<List<MediaItem>> GetItems(int id);
|
||||
Task<List<MediaItem>> GetMultiCollectionItems(int id);
|
||||
Task<List<MediaItem>> GetSmartCollectionItems(int id);
|
||||
Task<List<CollectionWithItems>> GetMultiCollectionCollections(int id);
|
||||
Task<List<CollectionWithItems>> GetFakeMultiCollectionCollections(int? collectionId, int? smartCollectionId);
|
||||
Task<List<int>> PlayoutIdsUsingCollection(int collectionId);
|
||||
Task<List<int>> PlayoutIdsUsingMultiCollection(int multiCollectionId);
|
||||
Task<List<int>> PlayoutIdsUsingSmartCollection(int smartCollectionId);
|
||||
Task<bool> IsCustomPlaybackOrder(int collectionId);
|
||||
Task<Option<string>> GetNameFromKey(CollectionKey emptyCollection);
|
||||
}
|
||||
@@ -1,15 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IMediaItemRepository
|
||||
{
|
||||
public interface IMediaItemRepository
|
||||
{
|
||||
Task<List<string>> GetAllLanguageCodes();
|
||||
Task<List<int>> FlagFileNotFound(LibraryPath libraryPath, string path);
|
||||
Task<Unit> FlagNormal(MediaItem mediaItem);
|
||||
Task<Either<BaseError, Unit>> DeleteItems(List<int> mediaItemIds);
|
||||
}
|
||||
}
|
||||
Task<List<string>> GetAllLanguageCodes();
|
||||
Task<List<int>> FlagFileNotFound(LibraryPath libraryPath, string path);
|
||||
Task<Unit> FlagNormal(MediaItem mediaItem);
|
||||
Task<Either<BaseError, Unit>> DeleteItems(List<int> mediaItemIds);
|
||||
}
|
||||
@@ -1,88 +1,84 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IMediaSourceRepository
|
||||
{
|
||||
public interface IMediaSourceRepository
|
||||
{
|
||||
Task<PlexMediaSource> Add(PlexMediaSource plexMediaSource);
|
||||
Task<List<PlexMediaSource>> GetAllPlex();
|
||||
Task<List<PlexLibrary>> GetPlexLibraries(int plexMediaSourceId);
|
||||
Task<List<PlexPathReplacement>> GetPlexPathReplacements(int plexMediaSourceId);
|
||||
Task<Option<PlexLibrary>> GetPlexLibrary(int plexLibraryId);
|
||||
Task<Option<PlexMediaSource>> GetPlex(int id);
|
||||
Task<Option<PlexMediaSource>> GetPlexByLibraryId(int plexLibraryId);
|
||||
Task<List<PlexPathReplacement>> GetPlexPathReplacementsByLibraryId(int plexLibraryPathId);
|
||||
Task<PlexMediaSource> Add(PlexMediaSource plexMediaSource);
|
||||
Task<List<PlexMediaSource>> GetAllPlex();
|
||||
Task<List<PlexLibrary>> GetPlexLibraries(int plexMediaSourceId);
|
||||
Task<List<PlexPathReplacement>> GetPlexPathReplacements(int plexMediaSourceId);
|
||||
Task<Option<PlexLibrary>> GetPlexLibrary(int plexLibraryId);
|
||||
Task<Option<PlexMediaSource>> GetPlex(int id);
|
||||
Task<Option<PlexMediaSource>> GetPlexByLibraryId(int plexLibraryId);
|
||||
Task<List<PlexPathReplacement>> GetPlexPathReplacementsByLibraryId(int plexLibraryPathId);
|
||||
|
||||
Task Update(
|
||||
PlexMediaSource plexMediaSource,
|
||||
List<PlexConnection> toAdd,
|
||||
List<PlexConnection> toDelete);
|
||||
Task Update(
|
||||
PlexMediaSource plexMediaSource,
|
||||
List<PlexConnection> toAdd,
|
||||
List<PlexConnection> toDelete);
|
||||
|
||||
Task<List<int>> UpdateLibraries(
|
||||
int plexMediaSourceId,
|
||||
List<PlexLibrary> toAdd,
|
||||
List<PlexLibrary> toDelete);
|
||||
Task<List<int>> UpdateLibraries(
|
||||
int plexMediaSourceId,
|
||||
List<PlexLibrary> toAdd,
|
||||
List<PlexLibrary> toDelete);
|
||||
|
||||
Task<List<int>> UpdateLibraries(
|
||||
int jellyfinMediaSourceId,
|
||||
List<JellyfinLibrary> toAdd,
|
||||
List<JellyfinLibrary> toDelete);
|
||||
Task<List<int>> UpdateLibraries(
|
||||
int jellyfinMediaSourceId,
|
||||
List<JellyfinLibrary> toAdd,
|
||||
List<JellyfinLibrary> toDelete);
|
||||
|
||||
Task<List<int>> UpdateLibraries(
|
||||
int embyMediaSourceId,
|
||||
List<EmbyLibrary> toAdd,
|
||||
List<EmbyLibrary> toDelete);
|
||||
Task<List<int>> UpdateLibraries(
|
||||
int embyMediaSourceId,
|
||||
List<EmbyLibrary> toAdd,
|
||||
List<EmbyLibrary> toDelete);
|
||||
|
||||
Task<Unit> UpdatePathReplacements(
|
||||
int plexMediaSourceId,
|
||||
List<PlexPathReplacement> toAdd,
|
||||
List<PlexPathReplacement> toUpdate,
|
||||
List<PlexPathReplacement> toDelete);
|
||||
Task<Unit> UpdatePathReplacements(
|
||||
int plexMediaSourceId,
|
||||
List<PlexPathReplacement> toAdd,
|
||||
List<PlexPathReplacement> toUpdate,
|
||||
List<PlexPathReplacement> toDelete);
|
||||
|
||||
Task<List<int>> DeleteAllPlex();
|
||||
Task<List<int>> DeletePlex(PlexMediaSource plexMediaSource);
|
||||
Task<List<int>> DisablePlexLibrarySync(List<int> libraryIds);
|
||||
Task EnablePlexLibrarySync(IEnumerable<int> libraryIds);
|
||||
Task<List<int>> DeleteAllPlex();
|
||||
Task<List<int>> DeletePlex(PlexMediaSource plexMediaSource);
|
||||
Task<List<int>> DisablePlexLibrarySync(List<int> libraryIds);
|
||||
Task EnablePlexLibrarySync(IEnumerable<int> libraryIds);
|
||||
|
||||
Task<Unit> UpsertJellyfin(string address, string serverName, string operatingSystem);
|
||||
Task<List<JellyfinMediaSource>> GetAllJellyfin();
|
||||
Task<Option<JellyfinMediaSource>> GetJellyfin(int id);
|
||||
Task<List<JellyfinLibrary>> GetJellyfinLibraries(int jellyfinMediaSourceId);
|
||||
Task<Unit> EnableJellyfinLibrarySync(IEnumerable<int> libraryIds);
|
||||
Task<List<int>> DisableJellyfinLibrarySync(List<int> libraryIds);
|
||||
Task<Option<JellyfinLibrary>> GetJellyfinLibrary(int jellyfinLibraryId);
|
||||
Task<Option<JellyfinMediaSource>> GetJellyfinByLibraryId(int jellyfinLibraryId);
|
||||
Task<List<JellyfinPathReplacement>> GetJellyfinPathReplacements(int jellyfinMediaSourceId);
|
||||
Task<List<JellyfinPathReplacement>> GetJellyfinPathReplacementsByLibraryId(int jellyfinLibraryPathId);
|
||||
Task<Unit> UpsertJellyfin(string address, string serverName, string operatingSystem);
|
||||
Task<List<JellyfinMediaSource>> GetAllJellyfin();
|
||||
Task<Option<JellyfinMediaSource>> GetJellyfin(int id);
|
||||
Task<List<JellyfinLibrary>> GetJellyfinLibraries(int jellyfinMediaSourceId);
|
||||
Task<Unit> EnableJellyfinLibrarySync(IEnumerable<int> libraryIds);
|
||||
Task<List<int>> DisableJellyfinLibrarySync(List<int> libraryIds);
|
||||
Task<Option<JellyfinLibrary>> GetJellyfinLibrary(int jellyfinLibraryId);
|
||||
Task<Option<JellyfinMediaSource>> GetJellyfinByLibraryId(int jellyfinLibraryId);
|
||||
Task<List<JellyfinPathReplacement>> GetJellyfinPathReplacements(int jellyfinMediaSourceId);
|
||||
Task<List<JellyfinPathReplacement>> GetJellyfinPathReplacementsByLibraryId(int jellyfinLibraryPathId);
|
||||
|
||||
Task<Unit> UpdatePathReplacements(
|
||||
int jellyfinMediaSourceId,
|
||||
List<JellyfinPathReplacement> toAdd,
|
||||
List<JellyfinPathReplacement> toUpdate,
|
||||
List<JellyfinPathReplacement> toDelete);
|
||||
Task<Unit> UpdatePathReplacements(
|
||||
int jellyfinMediaSourceId,
|
||||
List<JellyfinPathReplacement> toAdd,
|
||||
List<JellyfinPathReplacement> toUpdate,
|
||||
List<JellyfinPathReplacement> toDelete);
|
||||
|
||||
Task<List<int>> DeleteAllJellyfin();
|
||||
Task<List<int>> DeleteAllJellyfin();
|
||||
|
||||
Task<Unit> UpsertEmby(string address, string serverName, string operatingSystem);
|
||||
Task<List<EmbyMediaSource>> GetAllEmby();
|
||||
Task<Option<EmbyMediaSource>> GetEmby(int id);
|
||||
Task<Option<EmbyMediaSource>> GetEmbyByLibraryId(int embyLibraryId);
|
||||
Task<Option<EmbyLibrary>> GetEmbyLibrary(int embyLibraryId);
|
||||
Task<List<EmbyLibrary>> GetEmbyLibraries(int embyMediaSourceId);
|
||||
Task<List<EmbyPathReplacement>> GetEmbyPathReplacements(int embyMediaSourceId);
|
||||
Task<List<EmbyPathReplacement>> GetEmbyPathReplacementsByLibraryId(int embyLibraryPathId);
|
||||
Task<Unit> UpsertEmby(string address, string serverName, string operatingSystem);
|
||||
Task<List<EmbyMediaSource>> GetAllEmby();
|
||||
Task<Option<EmbyMediaSource>> GetEmby(int id);
|
||||
Task<Option<EmbyMediaSource>> GetEmbyByLibraryId(int embyLibraryId);
|
||||
Task<Option<EmbyLibrary>> GetEmbyLibrary(int embyLibraryId);
|
||||
Task<List<EmbyLibrary>> GetEmbyLibraries(int embyMediaSourceId);
|
||||
Task<List<EmbyPathReplacement>> GetEmbyPathReplacements(int embyMediaSourceId);
|
||||
Task<List<EmbyPathReplacement>> GetEmbyPathReplacementsByLibraryId(int embyLibraryPathId);
|
||||
|
||||
Task<Unit> UpdatePathReplacements(
|
||||
int embyMediaSourceId,
|
||||
List<EmbyPathReplacement> toAdd,
|
||||
List<EmbyPathReplacement> toUpdate,
|
||||
List<EmbyPathReplacement> toDelete);
|
||||
Task<Unit> UpdatePathReplacements(
|
||||
int embyMediaSourceId,
|
||||
List<EmbyPathReplacement> toAdd,
|
||||
List<EmbyPathReplacement> toUpdate,
|
||||
List<EmbyPathReplacement> toDelete);
|
||||
|
||||
Task<List<int>> DeleteAllEmby();
|
||||
Task<Unit> EnableEmbyLibrarySync(IEnumerable<int> libraryIds);
|
||||
Task<List<int>> DisableEmbyLibrarySync(List<int> libraryIds);
|
||||
}
|
||||
}
|
||||
Task<List<int>> DeleteAllEmby();
|
||||
Task<Unit> EnableEmbyLibrarySync(IEnumerable<int> libraryIds);
|
||||
Task<List<int>> DisableEmbyLibrarySync(List<int> libraryIds);
|
||||
}
|
||||
@@ -1,42 +1,38 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IMetadataRepository
|
||||
{
|
||||
public interface IMetadataRepository
|
||||
{
|
||||
Task<bool> RemoveGenre(Genre genre);
|
||||
Task<bool> RemoveTag(Tag tag);
|
||||
Task<bool> RemoveStudio(Studio studio);
|
||||
Task<bool> RemoveStyle(Style style);
|
||||
Task<bool> RemoveMood(Mood mood);
|
||||
Task<bool> RemoveActor(Actor actor);
|
||||
Task<bool> Update(Domain.Metadata metadata);
|
||||
Task<bool> Add(Domain.Metadata metadata);
|
||||
Task<bool> UpdateLocalStatistics(MediaItem mediaItem, MediaVersion incoming, bool updateVersion = true);
|
||||
Task<bool> UpdatePlexStatistics(int mediaVersionId, MediaVersion incoming);
|
||||
Task<Unit> UpdateArtworkPath(Artwork artwork);
|
||||
Task<Unit> AddArtwork(Domain.Metadata metadata, Artwork artwork);
|
||||
Task<Unit> RemoveArtwork(Domain.Metadata metadata, ArtworkKind artworkKind);
|
||||
Task<bool> CloneArtwork(
|
||||
Domain.Metadata metadata,
|
||||
Option<Artwork> maybeArtwork,
|
||||
ArtworkKind artworkKind,
|
||||
string sourcePath,
|
||||
DateTime lastWriteTime);
|
||||
Task<Unit> MarkAsUpdated(ShowMetadata metadata, DateTime dateUpdated);
|
||||
Task<Unit> MarkAsUpdated(SeasonMetadata metadata, DateTime dateUpdated);
|
||||
Task<Unit> MarkAsUpdated(MovieMetadata metadata, DateTime dateUpdated);
|
||||
Task<Unit> MarkAsUpdated(EpisodeMetadata metadata, DateTime dateUpdated);
|
||||
Task<Unit> MarkAsExternal(ShowMetadata metadata);
|
||||
Task<Unit> SetContentRating(ShowMetadata metadata, string contentRating);
|
||||
Task<Unit> MarkAsExternal(MovieMetadata metadata);
|
||||
Task<Unit> SetContentRating(MovieMetadata metadata, string contentRating);
|
||||
Task<bool> RemoveGuid(MetadataGuid guid);
|
||||
Task<bool> AddGuid(Domain.Metadata metadata, MetadataGuid guid);
|
||||
Task<bool> RemoveDirector(Director director);
|
||||
Task<bool> RemoveWriter(Writer writer);
|
||||
}
|
||||
}
|
||||
Task<bool> RemoveGenre(Genre genre);
|
||||
Task<bool> RemoveTag(Tag tag);
|
||||
Task<bool> RemoveStudio(Studio studio);
|
||||
Task<bool> RemoveStyle(Style style);
|
||||
Task<bool> RemoveMood(Mood mood);
|
||||
Task<bool> RemoveActor(Actor actor);
|
||||
Task<bool> Update(Domain.Metadata metadata);
|
||||
Task<bool> Add(Domain.Metadata metadata);
|
||||
Task<bool> UpdateLocalStatistics(MediaItem mediaItem, MediaVersion incoming, bool updateVersion = true);
|
||||
Task<bool> UpdatePlexStatistics(int mediaVersionId, MediaVersion incoming);
|
||||
Task<Unit> UpdateArtworkPath(Artwork artwork);
|
||||
Task<Unit> AddArtwork(Domain.Metadata metadata, Artwork artwork);
|
||||
Task<Unit> RemoveArtwork(Domain.Metadata metadata, ArtworkKind artworkKind);
|
||||
Task<bool> CloneArtwork(
|
||||
Domain.Metadata metadata,
|
||||
Option<Artwork> maybeArtwork,
|
||||
ArtworkKind artworkKind,
|
||||
string sourcePath,
|
||||
DateTime lastWriteTime);
|
||||
Task<Unit> MarkAsUpdated(ShowMetadata metadata, DateTime dateUpdated);
|
||||
Task<Unit> MarkAsUpdated(SeasonMetadata metadata, DateTime dateUpdated);
|
||||
Task<Unit> MarkAsUpdated(MovieMetadata metadata, DateTime dateUpdated);
|
||||
Task<Unit> MarkAsUpdated(EpisodeMetadata metadata, DateTime dateUpdated);
|
||||
Task<Unit> MarkAsExternal(ShowMetadata metadata);
|
||||
Task<Unit> SetContentRating(ShowMetadata metadata, string contentRating);
|
||||
Task<Unit> MarkAsExternal(MovieMetadata metadata);
|
||||
Task<Unit> SetContentRating(MovieMetadata metadata, string contentRating);
|
||||
Task<bool> RemoveGuid(MetadataGuid guid);
|
||||
Task<bool> AddGuid(Domain.Metadata metadata, MetadataGuid guid);
|
||||
Task<bool> RemoveDirector(Director director);
|
||||
Task<bool> RemoveWriter(Writer writer);
|
||||
}
|
||||
@@ -1,38 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Emby;
|
||||
using ErsatzTV.Core.Jellyfin;
|
||||
using ErsatzTV.Core.Metadata;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IMovieRepository
|
||||
{
|
||||
public interface IMovieRepository
|
||||
{
|
||||
Task<bool> AllMoviesExist(List<int> movieIds);
|
||||
Task<Option<Movie>> GetMovie(int movieId);
|
||||
Task<Either<BaseError, MediaItemScanResult<Movie>>> GetOrAdd(LibraryPath libraryPath, string path);
|
||||
Task<Either<BaseError, MediaItemScanResult<PlexMovie>>> GetOrAdd(PlexLibrary library, PlexMovie item);
|
||||
Task<List<MovieMetadata>> GetMoviesForCards(List<int> ids);
|
||||
Task<IEnumerable<string>> FindMoviePaths(LibraryPath libraryPath);
|
||||
Task<List<int>> DeleteByPath(LibraryPath libraryPath, string path);
|
||||
Task<bool> AddGenre(MovieMetadata metadata, Genre genre);
|
||||
Task<bool> AddTag(MovieMetadata metadata, Tag tag);
|
||||
Task<bool> AddStudio(MovieMetadata metadata, Studio studio);
|
||||
Task<bool> AddActor(MovieMetadata metadata, Actor actor);
|
||||
Task<List<int>> RemoveMissingPlexMovies(PlexLibrary library, List<string> movieKeys);
|
||||
Task<bool> UpdateSortTitle(MovieMetadata movieMetadata);
|
||||
Task<List<JellyfinItemEtag>> GetExistingJellyfinMovies(JellyfinLibrary library);
|
||||
Task<List<int>> RemoveMissingJellyfinMovies(JellyfinLibrary library, List<string> movieIds);
|
||||
Task<bool> AddJellyfin(JellyfinMovie movie);
|
||||
Task<Option<JellyfinMovie>> UpdateJellyfin(JellyfinMovie movie);
|
||||
Task<List<EmbyItemEtag>> GetExistingEmbyMovies(EmbyLibrary library);
|
||||
Task<List<int>> RemoveMissingEmbyMovies(EmbyLibrary library, List<string> movieIds);
|
||||
Task<bool> AddEmby(EmbyMovie movie);
|
||||
Task<Option<EmbyMovie>> UpdateEmby(EmbyMovie movie);
|
||||
Task<bool> AddDirector(MovieMetadata metadata, Director director);
|
||||
Task<bool> AddWriter(MovieMetadata metadata, Writer writer);
|
||||
Task<Unit> UpdatePath(int mediaFileId, string path);
|
||||
}
|
||||
}
|
||||
Task<bool> AllMoviesExist(List<int> movieIds);
|
||||
Task<Option<Movie>> GetMovie(int movieId);
|
||||
Task<Either<BaseError, MediaItemScanResult<Movie>>> GetOrAdd(LibraryPath libraryPath, string path);
|
||||
Task<Either<BaseError, MediaItemScanResult<PlexMovie>>> GetOrAdd(PlexLibrary library, PlexMovie item);
|
||||
Task<List<MovieMetadata>> GetMoviesForCards(List<int> ids);
|
||||
Task<IEnumerable<string>> FindMoviePaths(LibraryPath libraryPath);
|
||||
Task<List<int>> DeleteByPath(LibraryPath libraryPath, string path);
|
||||
Task<bool> AddGenre(MovieMetadata metadata, Genre genre);
|
||||
Task<bool> AddTag(MovieMetadata metadata, Tag tag);
|
||||
Task<bool> AddStudio(MovieMetadata metadata, Studio studio);
|
||||
Task<bool> AddActor(MovieMetadata metadata, Actor actor);
|
||||
Task<List<int>> RemoveMissingPlexMovies(PlexLibrary library, List<string> movieKeys);
|
||||
Task<bool> UpdateSortTitle(MovieMetadata movieMetadata);
|
||||
Task<List<JellyfinItemEtag>> GetExistingJellyfinMovies(JellyfinLibrary library);
|
||||
Task<List<int>> RemoveMissingJellyfinMovies(JellyfinLibrary library, List<string> movieIds);
|
||||
Task<bool> AddJellyfin(JellyfinMovie movie);
|
||||
Task<Option<JellyfinMovie>> UpdateJellyfin(JellyfinMovie movie);
|
||||
Task<List<EmbyItemEtag>> GetExistingEmbyMovies(EmbyLibrary library);
|
||||
Task<List<int>> RemoveMissingEmbyMovies(EmbyLibrary library, List<string> movieIds);
|
||||
Task<bool> AddEmby(EmbyMovie movie);
|
||||
Task<Option<EmbyMovie>> UpdateEmby(EmbyMovie movie);
|
||||
Task<bool> AddDirector(MovieMetadata metadata, Director director);
|
||||
Task<bool> AddWriter(MovieMetadata metadata, Writer writer);
|
||||
Task<Unit> UpdatePath(int mediaFileId, string path);
|
||||
}
|
||||
@@ -1,26 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Metadata;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IMusicVideoRepository
|
||||
{
|
||||
public interface IMusicVideoRepository
|
||||
{
|
||||
Task<Either<BaseError, MediaItemScanResult<MusicVideo>>> GetOrAdd(
|
||||
Artist artist,
|
||||
LibraryPath libraryPath,
|
||||
string path);
|
||||
Task<Either<BaseError, MediaItemScanResult<MusicVideo>>> GetOrAdd(
|
||||
Artist artist,
|
||||
LibraryPath libraryPath,
|
||||
string path);
|
||||
|
||||
Task<IEnumerable<string>> FindMusicVideoPaths(LibraryPath libraryPath);
|
||||
Task<List<int>> DeleteByPath(LibraryPath libraryPath, string path);
|
||||
Task<bool> AddGenre(MusicVideoMetadata metadata, Genre genre);
|
||||
Task<bool> AddTag(MusicVideoMetadata metadata, Tag tag);
|
||||
Task<bool> AddStudio(MusicVideoMetadata metadata, Studio studio);
|
||||
Task<List<MusicVideoMetadata>> GetMusicVideosForCards(List<int> ids);
|
||||
Task<IEnumerable<string>> FindOrphanPaths(LibraryPath libraryPath);
|
||||
Task<int> GetMusicVideoCount(int artistId);
|
||||
Task<List<MusicVideoMetadata>> GetPagedMusicVideos(int artistId, int pageNumber, int pageSize);
|
||||
}
|
||||
}
|
||||
Task<IEnumerable<string>> FindMusicVideoPaths(LibraryPath libraryPath);
|
||||
Task<List<int>> DeleteByPath(LibraryPath libraryPath, string path);
|
||||
Task<bool> AddGenre(MusicVideoMetadata metadata, Genre genre);
|
||||
Task<bool> AddTag(MusicVideoMetadata metadata, Tag tag);
|
||||
Task<bool> AddStudio(MusicVideoMetadata metadata, Studio studio);
|
||||
Task<List<MusicVideoMetadata>> GetMusicVideosForCards(List<int> ids);
|
||||
Task<IEnumerable<string>> FindOrphanPaths(LibraryPath libraryPath);
|
||||
Task<int> GetMusicVideoCount(int artistId);
|
||||
Task<List<MusicVideoMetadata>> GetPagedMusicVideos(int artistId, int pageNumber, int pageSize);
|
||||
}
|
||||
@@ -1,19 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Metadata;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IOtherVideoRepository
|
||||
{
|
||||
public interface IOtherVideoRepository
|
||||
{
|
||||
Task<Either<BaseError, MediaItemScanResult<OtherVideo>>> GetOrAdd(LibraryPath libraryPath, string path);
|
||||
Task<IEnumerable<string>> FindOtherVideoPaths(LibraryPath libraryPath);
|
||||
Task<List<int>> DeleteByPath(LibraryPath libraryPath, string path);
|
||||
Task<bool> AddTag(OtherVideoMetadata metadata, Tag tag);
|
||||
Task<List<OtherVideoMetadata>> GetOtherVideosForCards(List<int> ids);
|
||||
// Task<int> GetOtherVideoCount(int artistId);
|
||||
// Task<List<OtherVideoMetadata>> GetPagedOtherVideos(int artistId, int pageNumber, int pageSize);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, MediaItemScanResult<OtherVideo>>> GetOrAdd(LibraryPath libraryPath, string path);
|
||||
Task<IEnumerable<string>> FindOtherVideoPaths(LibraryPath libraryPath);
|
||||
Task<List<int>> DeleteByPath(LibraryPath libraryPath, string path);
|
||||
Task<bool> AddTag(OtherVideoMetadata metadata, Tag tag);
|
||||
Task<List<OtherVideoMetadata>> GetOtherVideosForCards(List<int> ids);
|
||||
// Task<int> GetOtherVideoCount(int artistId);
|
||||
// Task<List<OtherVideoMetadata>> GetPagedOtherVideos(int artistId, int pageNumber, int pageSize);
|
||||
}
|
||||
@@ -1,17 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface ISearchRepository
|
||||
{
|
||||
public interface ISearchRepository
|
||||
{
|
||||
Task<List<int>> GetItemIdsToIndex();
|
||||
Task<Option<MediaItem>> GetItemToIndex(int id);
|
||||
Task<List<string>> GetLanguagesForShow(Show show);
|
||||
Task<List<string>> GetLanguagesForSeason(Season season);
|
||||
Task<List<string>> GetLanguagesForArtist(Artist artist);
|
||||
Task<List<string>> GetAllLanguageCodes(List<string> mediaCodes);
|
||||
}
|
||||
}
|
||||
Task<List<int>> GetItemIdsToIndex();
|
||||
Task<Option<MediaItem>> GetItemToIndex(int id);
|
||||
Task<List<string>> GetLanguagesForShow(Show show);
|
||||
Task<List<string>> GetLanguagesForSeason(Season season);
|
||||
Task<List<string>> GetLanguagesForArtist(Artist artist);
|
||||
Task<List<string>> GetAllLanguageCodes(List<string> mediaCodes);
|
||||
}
|
||||
@@ -1,18 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Metadata;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface ISongRepository
|
||||
{
|
||||
public interface ISongRepository
|
||||
{
|
||||
Task<Either<BaseError, MediaItemScanResult<Song>>> GetOrAdd(LibraryPath libraryPath, string path);
|
||||
Task<IEnumerable<string>> FindSongPaths(LibraryPath libraryPath);
|
||||
Task<List<int>> DeleteByPath(LibraryPath libraryPath, string path);
|
||||
Task<bool> AddGenre(SongMetadata metadata, Genre genre);
|
||||
Task<bool> AddTag(SongMetadata metadata, Tag tag);
|
||||
Task<List<SongMetadata>> GetSongsForCards(List<int> ids);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, MediaItemScanResult<Song>>> GetOrAdd(LibraryPath libraryPath, string path);
|
||||
Task<IEnumerable<string>> FindSongPaths(LibraryPath libraryPath);
|
||||
Task<List<int>> DeleteByPath(LibraryPath libraryPath, string path);
|
||||
Task<bool> AddGenre(SongMetadata metadata, Genre genre);
|
||||
Task<bool> AddTag(SongMetadata metadata, Tag tag);
|
||||
Task<List<SongMetadata>> GetSongsForCards(List<int> ids);
|
||||
}
|
||||
@@ -1,56 +1,52 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Metadata;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories
|
||||
namespace ErsatzTV.Core.Interfaces.Repositories;
|
||||
|
||||
public interface ITelevisionRepository
|
||||
{
|
||||
public interface ITelevisionRepository
|
||||
{
|
||||
Task<bool> AllShowsExist(List<int> showIds);
|
||||
Task<bool> AllSeasonsExist(List<int> seasonIds);
|
||||
Task<bool> AllEpisodesExist(List<int> episodeIds);
|
||||
Task<List<Show>> GetAllShows();
|
||||
Task<Option<Show>> GetShow(int showId);
|
||||
Task<List<ShowMetadata>> GetShowsForCards(List<int> ids);
|
||||
Task<List<SeasonMetadata>> GetSeasonsForCards(List<int> ids);
|
||||
Task<List<EpisodeMetadata>> GetEpisodesForCards(List<int> ids);
|
||||
Task<List<Episode>> GetShowItems(int showId);
|
||||
Task<List<Season>> GetAllSeasons();
|
||||
Task<Option<Season>> GetSeason(int seasonId);
|
||||
Task<int> GetSeasonCount(int showId);
|
||||
Task<List<Season>> GetPagedSeasons(int televisionShowId, int pageNumber, int pageSize);
|
||||
Task<List<Episode>> GetSeasonItems(int seasonId);
|
||||
Task<int> GetEpisodeCount(int seasonId);
|
||||
Task<List<EpisodeMetadata>> GetPagedEpisodes(int seasonId, int pageNumber, int pageSize);
|
||||
Task<Option<Show>> GetShowByMetadata(int libraryPathId, ShowMetadata metadata);
|
||||
Task<bool> AllShowsExist(List<int> showIds);
|
||||
Task<bool> AllSeasonsExist(List<int> seasonIds);
|
||||
Task<bool> AllEpisodesExist(List<int> episodeIds);
|
||||
Task<List<Show>> GetAllShows();
|
||||
Task<Option<Show>> GetShow(int showId);
|
||||
Task<List<ShowMetadata>> GetShowsForCards(List<int> ids);
|
||||
Task<List<SeasonMetadata>> GetSeasonsForCards(List<int> ids);
|
||||
Task<List<EpisodeMetadata>> GetEpisodesForCards(List<int> ids);
|
||||
Task<List<Episode>> GetShowItems(int showId);
|
||||
Task<List<Season>> GetAllSeasons();
|
||||
Task<Option<Season>> GetSeason(int seasonId);
|
||||
Task<int> GetSeasonCount(int showId);
|
||||
Task<List<Season>> GetPagedSeasons(int televisionShowId, int pageNumber, int pageSize);
|
||||
Task<List<Episode>> GetSeasonItems(int seasonId);
|
||||
Task<int> GetEpisodeCount(int seasonId);
|
||||
Task<List<EpisodeMetadata>> GetPagedEpisodes(int seasonId, int pageNumber, int pageSize);
|
||||
Task<Option<Show>> GetShowByMetadata(int libraryPathId, ShowMetadata metadata);
|
||||
|
||||
Task<Either<BaseError, MediaItemScanResult<Show>>> AddShow(
|
||||
int libraryPathId,
|
||||
string showFolder,
|
||||
ShowMetadata metadata);
|
||||
Task<Either<BaseError, MediaItemScanResult<Show>>> AddShow(
|
||||
int libraryPathId,
|
||||
string showFolder,
|
||||
ShowMetadata metadata);
|
||||
|
||||
Task<Either<BaseError, Season>> GetOrAddSeason(Show show, int libraryPathId, int seasonNumber);
|
||||
Task<Either<BaseError, Episode>> GetOrAddEpisode(Season season, LibraryPath libraryPath, string path);
|
||||
Task<IEnumerable<string>> FindEpisodePaths(LibraryPath libraryPath);
|
||||
Task<Unit> DeleteByPath(LibraryPath libraryPath, string path);
|
||||
Task<Unit> DeleteEmptySeasons(LibraryPath libraryPath);
|
||||
Task<List<int>> DeleteEmptyShows(LibraryPath libraryPath);
|
||||
Task<Either<BaseError, MediaItemScanResult<PlexShow>>> GetOrAddPlexShow(PlexLibrary library, PlexShow item);
|
||||
Task<Either<BaseError, PlexSeason>> GetOrAddPlexSeason(PlexLibrary library, PlexSeason item);
|
||||
Task<Either<BaseError, PlexEpisode>> GetOrAddPlexEpisode(PlexLibrary library, PlexEpisode item);
|
||||
Task<bool> AddGenre(ShowMetadata metadata, Genre genre);
|
||||
Task<bool> AddTag(ShowMetadata metadata, Tag tag);
|
||||
Task<bool> AddStudio(ShowMetadata metadata, Studio studio);
|
||||
Task<bool> AddActor(ShowMetadata metadata, Actor actor);
|
||||
Task<bool> AddActor(EpisodeMetadata metadata, Actor actor);
|
||||
Task<List<int>> RemoveMissingPlexShows(PlexLibrary library, List<string> showKeys);
|
||||
Task<Unit> RemoveMissingPlexSeasons(string showKey, List<string> seasonKeys);
|
||||
Task<List<int>> RemoveMissingPlexEpisodes(string seasonKey, List<string> episodeKeys);
|
||||
Task<Unit> RemoveMetadata(Episode episode, EpisodeMetadata metadata);
|
||||
Task<bool> AddDirector(EpisodeMetadata metadata, Director director);
|
||||
Task<bool> AddWriter(EpisodeMetadata metadata, Writer writer);
|
||||
Task<Unit> UpdatePath(int mediaFileId, string path);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, Season>> GetOrAddSeason(Show show, int libraryPathId, int seasonNumber);
|
||||
Task<Either<BaseError, Episode>> GetOrAddEpisode(Season season, LibraryPath libraryPath, string path);
|
||||
Task<IEnumerable<string>> FindEpisodePaths(LibraryPath libraryPath);
|
||||
Task<Unit> DeleteByPath(LibraryPath libraryPath, string path);
|
||||
Task<Unit> DeleteEmptySeasons(LibraryPath libraryPath);
|
||||
Task<List<int>> DeleteEmptyShows(LibraryPath libraryPath);
|
||||
Task<Either<BaseError, MediaItemScanResult<PlexShow>>> GetOrAddPlexShow(PlexLibrary library, PlexShow item);
|
||||
Task<Either<BaseError, PlexSeason>> GetOrAddPlexSeason(PlexLibrary library, PlexSeason item);
|
||||
Task<Either<BaseError, PlexEpisode>> GetOrAddPlexEpisode(PlexLibrary library, PlexEpisode item);
|
||||
Task<bool> AddGenre(ShowMetadata metadata, Genre genre);
|
||||
Task<bool> AddTag(ShowMetadata metadata, Tag tag);
|
||||
Task<bool> AddStudio(ShowMetadata metadata, Studio studio);
|
||||
Task<bool> AddActor(ShowMetadata metadata, Actor actor);
|
||||
Task<bool> AddActor(EpisodeMetadata metadata, Actor actor);
|
||||
Task<List<int>> RemoveMissingPlexShows(PlexLibrary library, List<string> showKeys);
|
||||
Task<Unit> RemoveMissingPlexSeasons(string showKey, List<string> seasonKeys);
|
||||
Task<List<int>> RemoveMissingPlexEpisodes(string seasonKey, List<string> episodeKeys);
|
||||
Task<Unit> RemoveMetadata(Episode episode, EpisodeMetadata metadata);
|
||||
Task<bool> AddDirector(EpisodeMetadata metadata, Director director);
|
||||
Task<bool> AddWriter(EpisodeMetadata metadata, Writer writer);
|
||||
Task<Unit> UpdatePath(int mediaFileId, string path);
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Runtime
|
||||
namespace ErsatzTV.Core.Interfaces.Runtime;
|
||||
|
||||
public interface IRuntimeInfo
|
||||
{
|
||||
public interface IRuntimeInfo
|
||||
{
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
bool IsOSPlatform(OSPlatform osPlatform);
|
||||
}
|
||||
}
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
bool IsOSPlatform(OSPlatform osPlatform);
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Scheduling
|
||||
namespace ErsatzTV.Core.Interfaces.Scheduling;
|
||||
|
||||
public interface IMediaCollectionEnumerator
|
||||
{
|
||||
public interface IMediaCollectionEnumerator
|
||||
{
|
||||
CollectionEnumeratorState State { get; }
|
||||
Option<MediaItem> Current { get; }
|
||||
void MoveNext();
|
||||
Option<MediaItem> Peek(int offset);
|
||||
}
|
||||
}
|
||||
CollectionEnumeratorState State { get; }
|
||||
Option<MediaItem> Current { get; }
|
||||
void MoveNext();
|
||||
Option<MediaItem> Peek(int offset);
|
||||
}
|
||||
@@ -1,17 +1,14 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Scheduling
|
||||
namespace ErsatzTV.Core.Interfaces.Scheduling;
|
||||
|
||||
public interface IPlayoutBuilder
|
||||
{
|
||||
public interface IPlayoutBuilder
|
||||
{
|
||||
Task<Playout> BuildPlayoutItems(Playout playout, bool rebuild = false);
|
||||
Task<Playout> BuildPlayoutItems(Playout playout, bool rebuild = false);
|
||||
|
||||
Task<Playout> BuildPlayoutItems(
|
||||
Playout playout,
|
||||
DateTimeOffset playoutStart,
|
||||
DateTimeOffset playoutFinish,
|
||||
bool rebuild = false);
|
||||
}
|
||||
}
|
||||
Task<Playout> BuildPlayoutItems(
|
||||
Playout playout,
|
||||
DateTimeOffset playoutStart,
|
||||
DateTimeOffset playoutFinish,
|
||||
bool rebuild = false);
|
||||
}
|
||||
@@ -1,17 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Scheduling;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Scheduling
|
||||
namespace ErsatzTV.Core.Interfaces.Scheduling;
|
||||
|
||||
public interface IPlayoutModeScheduler<in T> where T : ProgramScheduleItem
|
||||
{
|
||||
public interface IPlayoutModeScheduler<in T> where T : ProgramScheduleItem
|
||||
{
|
||||
Tuple<PlayoutBuilderState, List<PlayoutItem>> Schedule(
|
||||
PlayoutBuilderState playoutBuilderState,
|
||||
Dictionary<CollectionKey, IMediaCollectionEnumerator> collectionEnumerators,
|
||||
T scheduleItem,
|
||||
ProgramScheduleItem nextScheduleItem,
|
||||
DateTimeOffset hardStop);
|
||||
}
|
||||
}
|
||||
Tuple<PlayoutBuilderState, List<PlayoutItem>> Schedule(
|
||||
PlayoutBuilderState playoutBuilderState,
|
||||
Dictionary<CollectionKey, IMediaCollectionEnumerator> collectionEnumerators,
|
||||
T scheduleItem,
|
||||
ProgramScheduleItem nextScheduleItem,
|
||||
DateTimeOffset hardStop);
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using ErsatzTV.Core.Domain;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Scheduling;
|
||||
|
||||
|
||||
@@ -1,24 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Interfaces.Metadata;
|
||||
using ErsatzTV.Core.Interfaces.Repositories;
|
||||
using ErsatzTV.Core.Search;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Search
|
||||
namespace ErsatzTV.Core.Interfaces.Search;
|
||||
|
||||
public interface ISearchIndex : IDisposable
|
||||
{
|
||||
public interface ISearchIndex : IDisposable
|
||||
{
|
||||
public int Version { get; }
|
||||
Task<bool> Initialize(ILocalFileSystem localFileSystem);
|
||||
Task<Unit> Rebuild(ISearchRepository searchRepository, List<int> itemIds);
|
||||
Task<Unit> RebuildItems(ISearchRepository searchRepository, List<int> itemIds);
|
||||
Task<Unit> AddItems(ISearchRepository searchRepository, List<MediaItem> items);
|
||||
Task<Unit> UpdateItems(ISearchRepository searchRepository, List<MediaItem> items);
|
||||
Task<Unit> RemoveItems(List<int> ids);
|
||||
Task<SearchResult> Search(string query, int skip, int limit, string searchField = "");
|
||||
void Commit();
|
||||
}
|
||||
}
|
||||
public int Version { get; }
|
||||
Task<bool> Initialize(ILocalFileSystem localFileSystem);
|
||||
Task<Unit> Rebuild(ISearchRepository searchRepository, List<int> itemIds);
|
||||
Task<Unit> RebuildItems(ISearchRepository searchRepository, List<int> itemIds);
|
||||
Task<Unit> AddItems(ISearchRepository searchRepository, List<MediaItem> items);
|
||||
Task<Unit> UpdateItems(ISearchRepository searchRepository, List<MediaItem> items);
|
||||
Task<Unit> RemoveItems(List<int> ids);
|
||||
Task<SearchResult> Search(string query, int skip, int limit, string searchField = "");
|
||||
void Commit();
|
||||
}
|
||||
@@ -1,14 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Domain;
|
||||
using ErsatzTV.Core.Trakt;
|
||||
using LanguageExt;
|
||||
|
||||
namespace ErsatzTV.Core.Interfaces.Trakt
|
||||
namespace ErsatzTV.Core.Interfaces.Trakt;
|
||||
|
||||
public interface ITraktApiClient
|
||||
{
|
||||
public interface ITraktApiClient
|
||||
{
|
||||
Task<Either<BaseError, TraktList>> GetUserList(string user, string list);
|
||||
Task<Either<BaseError, List<TraktListItemWithGuids>>> GetUserListItems(string user, string list);
|
||||
}
|
||||
}
|
||||
Task<Either<BaseError, TraktList>> GetUserList(string user, string list);
|
||||
Task<Either<BaseError, List<TraktListItemWithGuids>>> GetUserListItems(string user, string list);
|
||||
}
|
||||
Reference in New Issue
Block a user