mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
78 lines
2.6 KiB
C#
78 lines
2.6 KiB
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Kyoo.Models;
|
|
|
|
namespace Kyoo.Controllers
|
|
{
|
|
// ReSharper disable once PossibleInterfaceMemberAmbiguity
|
|
public interface ILibraryManager
|
|
{
|
|
// Get by slug
|
|
Library GetLibrary(string librarySlug);
|
|
Collection GetCollection(string slug);
|
|
Show GetShow(string slug);
|
|
Season GetSeason(string showSlug, long seasonNumber);
|
|
Episode GetEpisode(string showSlug, long seasonNumber, long episodeNumber);
|
|
Episode GetMovieEpisode(string movieSlug);
|
|
Genre GetGenre(string slug);
|
|
Studio GetStudio(string slug);
|
|
People GetPeople(string slug);
|
|
|
|
// Get all
|
|
IEnumerable<Library> GetLibraries();
|
|
IEnumerable<Collection> GetCollections();
|
|
IEnumerable<Show> GetShows();
|
|
IEnumerable<Season> GetSeasons();
|
|
IEnumerable<Episode> GetEpisodes();
|
|
IEnumerable<Studio> GetStudios();
|
|
IEnumerable<People> GetPeoples();
|
|
IEnumerable<Genre> GetGenres();
|
|
|
|
// Search
|
|
IEnumerable<Library> SearchLibraries(string searchQuery);
|
|
IEnumerable<Collection> SearchCollections(string searchQuery);
|
|
IEnumerable<Show> SearchShows(string searchQuery);
|
|
IEnumerable<Season> SearchSeasons(string searchQuery);
|
|
IEnumerable<Episode> SearchEpisodes(string searchQuery);
|
|
IEnumerable<Genre> SearchGenres(string searchQuery);
|
|
IEnumerable<Studio> SearchStudios(string searchQuery);
|
|
IEnumerable<People> SearchPeople(string searchQuery);
|
|
|
|
// Other get helpers
|
|
Show GetShowByPath(string path);
|
|
IEnumerable<string> GetLibrariesPath();
|
|
IEnumerable<Episode> GetEpisodes(string showSlug, long seasonNumber);
|
|
|
|
//Register values
|
|
void RegisterLibrary(Library library);
|
|
void RegisterCollection(Collection collection);
|
|
void RegisterShow(Show show);
|
|
void RegisterSeason(Season season);
|
|
void RegisterEpisode(Episode episode);
|
|
void RegisterGenre(Genre genre);
|
|
void RegisterStudio(Studio studio);
|
|
void RegisterPeople(People people);
|
|
|
|
// Edit values
|
|
void EditLibrary(Library library, bool resetOld);
|
|
void EditCollection(Collection collection, bool resetOld);
|
|
void EditShow(Show show, bool resetOld);
|
|
void EditSeason(Season season, bool resetOld);
|
|
void EditEpisode(Episode episode, bool resetOld);
|
|
void EditGenre(Genre genre, bool resetOld);
|
|
void EditStudio(Studio studio, bool resetOld);
|
|
void EditPeople(People people, bool resetOld);
|
|
|
|
|
|
// Delete values
|
|
void DelteLibrary(Library library);
|
|
void DeleteCollection(Collection collection);
|
|
void DeleteShow(Show show);
|
|
void DeleteSeason(Season season);
|
|
void DeleteEpisode(Episode episode);
|
|
void DeleteGenre(Genre genre);
|
|
void DeleteStudio(Studio studio);
|
|
void DeletePeople(People people);
|
|
}
|
|
}
|