* add ability to deep scan just a single tv show for Plex, Emby, and Jellyfin
Including "/api/libraries/{id:int}/scan-show" REST API endpoint to
trigger.
* restrict plex search results to the intended library
* restrict scanning to media server libraries that are marked to sync with etv
* fix previous commit
* also guard library scan api
* add scan buttons to show ui
* scan single plex show by id
* scan jellyfin and emby single shows by id
* update changelog
---------
Co-authored-by: Jeff Slutter <MrMustard@gmail.com>
Co-authored-by: Jason Dove <1695733+jasongdove@users.noreply.github.com>
104 lines
3.2 KiB
C#
104 lines
3.2 KiB
C#
using ErsatzTV.Core.Domain;
|
|
using ErsatzTV.Core.Plex;
|
|
|
|
namespace ErsatzTV.Core.Interfaces.Plex;
|
|
|
|
public interface IPlexServerApiClient
|
|
{
|
|
Task<bool> Ping(
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token,
|
|
CancellationToken cancellationToken);
|
|
|
|
Task<Either<BaseError, List<PlexLibrary>>> GetLibraries(
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token);
|
|
|
|
IAsyncEnumerable<Tuple<PlexMovie, int>> GetMovieLibraryContents(
|
|
PlexLibrary library,
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token);
|
|
|
|
IAsyncEnumerable<Tuple<PlexOtherVideo, int>> GetOtherVideoLibraryContents(
|
|
PlexLibrary library,
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token);
|
|
|
|
IAsyncEnumerable<Tuple<PlexShow, int>> GetShowLibraryContents(
|
|
PlexLibrary library,
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token);
|
|
|
|
IAsyncEnumerable<Tuple<PlexSeason, int>> GetShowSeasons(
|
|
PlexLibrary library,
|
|
PlexShow show,
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token);
|
|
|
|
IAsyncEnumerable<Tuple<PlexEpisode, int>> GetSeasonEpisodes(
|
|
PlexLibrary library,
|
|
PlexSeason season,
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token);
|
|
|
|
Task<Either<BaseError, ShowMetadata>> GetShowMetadata(
|
|
PlexLibrary library,
|
|
string key,
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token);
|
|
|
|
Task<Either<BaseError, Tuple<MovieMetadata, MediaVersion>>> GetMovieMetadataAndStatistics(
|
|
int plexMediaSourceId,
|
|
string key,
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token);
|
|
|
|
Task<Either<BaseError, Tuple<OtherVideoMetadata, MediaVersion>>> GetOtherVideoMetadataAndStatistics(
|
|
int plexMediaSourceId,
|
|
string key,
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token,
|
|
PlexLibrary library);
|
|
|
|
Task<Either<BaseError, Tuple<EpisodeMetadata, MediaVersion>>> GetEpisodeMetadataAndStatistics(
|
|
int plexMediaSourceId,
|
|
string key,
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token);
|
|
|
|
IAsyncEnumerable<Tuple<PlexCollection, int>> GetAllCollections(
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token,
|
|
CancellationToken cancellationToken);
|
|
|
|
IAsyncEnumerable<Tuple<MediaItem, int>> GetCollectionItems(
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token,
|
|
string key,
|
|
CancellationToken cancellationToken);
|
|
|
|
IAsyncEnumerable<Tuple<PlexTag, int>> GetAllTags(
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token,
|
|
int tagType,
|
|
CancellationToken cancellationToken);
|
|
|
|
IAsyncEnumerable<Tuple<PlexShow, int>> GetTagShowContents(
|
|
PlexLibrary library,
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token,
|
|
PlexTag tag);
|
|
|
|
Task<Either<BaseError, List<PlexShow>>> SearchShowsByTitle(
|
|
PlexLibrary library,
|
|
string showTitle,
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token);
|
|
|
|
Task<Either<BaseError, Option<PlexShow>>> GetSingleShow(
|
|
PlexLibrary library,
|
|
string showKey,
|
|
PlexConnection connection,
|
|
PlexServerAuthToken token);
|
|
}
|