mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-30 10:55:16 -04:00
Implementing shows/genres & GetGenresByShow
This commit is contained in:
@@ -128,6 +128,26 @@ namespace Kyoo.Controllers
|
||||
Expression<Func<PeopleLink, object>> sort,
|
||||
Pagination limit = default
|
||||
) => GetPeopleFromShow(showSlug, where, new Sort<PeopleLink>(sort), limit);
|
||||
|
||||
Task<ICollection<Genre>> GetGenresFromShow(int showID,
|
||||
Expression<Func<Genre, bool>> where = null,
|
||||
Sort<Genre> sort = default,
|
||||
Pagination limit = default);
|
||||
Task<ICollection<Genre>> GetGenresFromShow(int showID,
|
||||
[Optional] Expression<Func<Genre, bool>> where,
|
||||
Expression<Func<Genre, object>> sort,
|
||||
Pagination limit = default
|
||||
) => GetGenresFromShow(showID, where, new Sort<Genre>(sort), limit);
|
||||
|
||||
Task<ICollection<Genre>> GetGenresFromShow(string showSlug,
|
||||
Expression<Func<Genre, bool>> where = null,
|
||||
Sort<Genre> sort = default,
|
||||
Pagination limit = default);
|
||||
Task<ICollection<Genre>> GetGenresFromShow(string showSlug,
|
||||
[Optional] Expression<Func<Genre, bool>> where,
|
||||
Expression<Func<Genre, object>> sort,
|
||||
Pagination limit = default
|
||||
) => GetGenresFromShow(showSlug, where, new Sort<Genre>(sort), limit);
|
||||
|
||||
|
||||
// Helpers
|
||||
|
||||
@@ -195,7 +195,29 @@ namespace Kyoo.Controllers
|
||||
}
|
||||
public interface ILibraryRepository : IRepository<Library> {}
|
||||
public interface ICollectionRepository : IRepository<Collection> {}
|
||||
public interface IGenreRepository : IRepository<Genre> {}
|
||||
|
||||
public interface IGenreRepository : IRepository<Genre>
|
||||
{
|
||||
Task<ICollection<Genre>> GetFromShow(int showID,
|
||||
Expression<Func<Genre, bool>> where = null,
|
||||
Sort<Genre> sort = default,
|
||||
Pagination limit = default);
|
||||
Task<ICollection<Genre>> GetFromShow(int showID,
|
||||
[Optional] Expression<Func<Genre, bool>> where,
|
||||
Expression<Func<Genre, object>> sort,
|
||||
Pagination limit = default
|
||||
) => GetFromShow(showID, where, new Sort<Genre>(sort), limit);
|
||||
|
||||
Task<ICollection<Genre>> GetFromShow(string showSlug,
|
||||
Expression<Func<Genre, bool>> where = null,
|
||||
Sort<Genre> sort = default,
|
||||
Pagination limit = default);
|
||||
Task<ICollection<Genre>> GetFromShow(string showSlug,
|
||||
[Optional] Expression<Func<Genre, bool>> where,
|
||||
Expression<Func<Genre, object>> sort,
|
||||
Pagination limit = default
|
||||
) => GetFromShow(showSlug, where, new Sort<Genre>(sort), limit);
|
||||
}
|
||||
public interface IStudioRepository : IRepository<Studio> {}
|
||||
|
||||
public interface IPeopleRepository : IRepository<People>
|
||||
|
||||
@@ -271,6 +271,22 @@ namespace Kyoo.Controllers
|
||||
return PeopleRepository.GetFromShow(showSlug, where, sort, limit);
|
||||
}
|
||||
|
||||
public Task<ICollection<Genre>> GetGenresFromShow(int showID,
|
||||
Expression<Func<Genre, bool>> where = null,
|
||||
Sort<Genre> sort = default,
|
||||
Pagination limit = default)
|
||||
{
|
||||
return GenreRepository.GetFromShow(showID, where, sort, limit);
|
||||
}
|
||||
|
||||
public Task<ICollection<Genre>> GetGenresFromShow(string showSlug,
|
||||
Expression<Func<Genre, bool>> where = null,
|
||||
Sort<Genre> sort = default,
|
||||
Pagination limit = default)
|
||||
{
|
||||
return GenreRepository.GetFromShow(showSlug, where, sort, limit);
|
||||
}
|
||||
|
||||
public Task AddShowLink(int showID, int? libraryID, int? collectionID)
|
||||
{
|
||||
return ShowRepository.AddShowLink(showID, libraryID, collectionID);
|
||||
|
||||
Reference in New Issue
Block a user