using Kyoo.Models; using Kyoo.Models.Watch; using System.Collections.Generic; namespace Kyoo.Controllers { public interface ILibraryManager { //Read values string GetShowExternalIDs(long showID); Studio GetStudio(long showID); IEnumerable GetPeople(long showID); IEnumerable GetGenreForShow(long showID); IEnumerable GetSeasons(long showID); int GetSeasonCount(string showSlug, long seasonNumber); IEnumerable GetShowsInCollection(long collectionID); IEnumerable GetShowsInLibrary(long libraryID); IEnumerable GetShowsByPeople(string peopleSlug); IEnumerable GetLibrariesPath(); //Internal read (Track video, IEnumerable audios, IEnumerable subtitles) GetStreams(long episodeID, string showSlug); Track GetSubtitle(string showSlug, long seasonNumber, long episodeNumber, string languageTag, bool forced); //Public read IEnumerable GetShows(); IEnumerable GetShows(string searchQuery); Library GetLibrary(string librarySlug); IEnumerable GetLibraries(); Show GetShowBySlug(string slug); Show GetShow(string path); Season GetSeason(string showSlug, long seasonNumber); IEnumerable GetEpisodes(string showSlug); IEnumerable GetEpisodes(string showSlug, long seasonNumber); Episode GetEpisode(string showSlug, long seasonNumber, long episodeNumber); WatchItem GetWatchItem(string showSlug, long seasonNumber, long episodeNumber, bool complete = true); People GetPeopleBySlug(string slug); Genre GetGenreBySlug(string slug); Studio GetStudioBySlug(string slug); Collection GetCollection(string slug); IEnumerable GetAllEpisodes(); IEnumerable SearchEpisodes(string searchQuery); IEnumerable SearchPeople(string searchQuery); IEnumerable SearchGenres(string searchQuery); IEnumerable SearchStudios(string searchQuery); //Check if value exists bool IsCollectionRegistered(string collectionSlug, out long collectionID); bool IsShowRegistered(string showPath, out long showID); bool IsSeasonRegistered(long showID, long seasonNumber, out long seasonID); bool IsEpisodeRegistered(string episodePath, out long episodeID); //Register values long RegisterCollection(Collection collection); long RegisterShow(Show show); long RegisterSeason(Season season); long RegisterEpisode(Episode episode); long RegisterTrack(Track track); void RegisterShowLinks(Library library, Collection collection, Show show); void RemoveShow(long showID); void RemoveSeason(long seasonID); void RemoveEpisode(long episodeID); void ClearSubtitles(long episodeID); } }