rework television media (#26)
* rework television media * refactor poster saving * television and movie views are working again * remove dead code * use paper styling for all cards * add show poster, plot to seasons page * remove missing shows; cleanup interfaces * fix split show display (same show in different folders/sources) * add placeholder "add to schedule" button * no more duplicate television shows, even with the same show split across sources * stop releasing CLI for now * use season number as season placeholder * add television shows to collections * add television seasons to collections * add television episodes to collections * add movies to collections * remove movies, shows, seasons, episodes from collections * fix page width and menus * fix buffer size defaults * fix chronological episode ordering * allow deleting media collections * don't get stuck building a playout with an empty collection * schedule editing and playouts work again * minor cleanup * remove dead code * fix bugs with viewing movies as they are loading * add scanner tests; support nested movie folders * update collections docs * rearrange order of schedule items * add show and season to schedule * delete schedules that use legacy collections, reset all posters * move cleanup to new migration * load fallback metadata when nfo fails; don't require metadata in ui * update readme and screenshots
This commit is contained in:
@@ -12,16 +12,10 @@ namespace ErsatzTV.Application.MediaSources.Commands
|
||||
public class
|
||||
DeleteLocalMediaSourceHandler : IRequestHandler<DeleteLocalMediaSource, Either<BaseError, Task>>
|
||||
{
|
||||
private readonly IMediaCollectionRepository _mediaCollectionRepository;
|
||||
private readonly IMediaSourceRepository _mediaSourceRepository;
|
||||
|
||||
public DeleteLocalMediaSourceHandler(
|
||||
IMediaSourceRepository mediaSourceRepository,
|
||||
IMediaCollectionRepository mediaCollectionRepository)
|
||||
{
|
||||
public DeleteLocalMediaSourceHandler(IMediaSourceRepository mediaSourceRepository) =>
|
||||
_mediaSourceRepository = mediaSourceRepository;
|
||||
_mediaCollectionRepository = mediaCollectionRepository;
|
||||
}
|
||||
|
||||
public async Task<Either<BaseError, Task>> Handle(
|
||||
DeleteLocalMediaSource request,
|
||||
@@ -30,14 +24,8 @@ namespace ErsatzTV.Application.MediaSources.Commands
|
||||
.Map(DoDeletion)
|
||||
.ToEither<Task>();
|
||||
|
||||
private async Task DoDeletion(LocalMediaSource mediaSource)
|
||||
{
|
||||
private async Task DoDeletion(LocalMediaSource mediaSource) =>
|
||||
await _mediaSourceRepository.Delete(mediaSource.Id);
|
||||
if (mediaSource.MediaType == MediaType.TvShow)
|
||||
{
|
||||
await _mediaCollectionRepository.DeleteEmptyTelevisionCollections();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<Validation<BaseError, LocalMediaSource>> MediaSourceMustExist(
|
||||
DeleteLocalMediaSource deleteMediaSource) =>
|
||||
|
||||
Reference in New Issue
Block a user