diff --git a/Kyoo.Common/Controllers/ILibraryManager.cs b/Kyoo.Common/Controllers/ILibraryManager.cs
index ae1d0ccb..fb597293 100644
--- a/Kyoo.Common/Controllers/ILibraryManager.cs
+++ b/Kyoo.Common/Controllers/ILibraryManager.cs
@@ -5,284 +5,454 @@ using System.Runtime.InteropServices;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Kyoo.Models;
+using Kyoo.Models.Exceptions;
namespace Kyoo.Controllers
{
+ ///
+ /// An interface to interract with the database. Every repository is mapped through here.
+ ///
public interface ILibraryManager : IDisposable, IAsyncDisposable
{
- // Repositories
+ ///
+ /// Get the repository corresponding to the T item.
+ ///
+ /// The type you want
+ /// If the item is not found
+ /// The repository corresponding
+ IRepository GetRepository() where T : class, IResource;
+
+ ///
+ /// The repository that handle libraries.
+ ///
ILibraryRepository LibraryRepository { get; }
+
+ ///
+ /// The repository that handle libraries's items (a wrapper arround shows & collections).
+ ///
ILibraryItemRepository LibraryItemRepository { get; }
+
+ ///
+ /// The repository that handle collections.
+ ///
ICollectionRepository CollectionRepository { get; }
+
+ ///
+ /// The repository that handle shows.
+ ///
IShowRepository ShowRepository { get; }
+
+ ///
+ /// The repository that handle seasons.
+ ///
ISeasonRepository SeasonRepository { get; }
+
+ ///
+ /// The repository that handle episodes.
+ ///
IEpisodeRepository EpisodeRepository { get; }
+
+ ///
+ /// The repository that handle tracks.
+ ///
ITrackRepository TrackRepository { get; }
+
+ ///
+ /// The repository that handle people.
+ ///
IPeopleRepository PeopleRepository { get; }
+
+ ///
+ /// The repository that handle studios.
+ ///
IStudioRepository StudioRepository { get; }
+
+ ///
+ /// The repository that handle genres.
+ ///
IGenreRepository GenreRepository { get; }
+
+ ///
+ /// The repository that handle providers.
+ ///
IProviderRepository ProviderRepository { get; }
- // Get by id
- Task GetLibrary(int id);
- Task GetCollection(int id);
- Task GetShow(int id);
- Task GetSeason(int id);
- Task GetSeason(int showID, int seasonNumber);
- Task GetEpisode(int id);
- Task GetEpisode(int showID, int seasonNumber, int episodeNumber);
- Task GetGenre(int id);
- Task