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:
@@ -7,7 +7,6 @@ using ErsatzTV.Application;
|
||||
using ErsatzTV.Application.MediaSources.Commands;
|
||||
using ErsatzTV.Application.Playouts.Commands;
|
||||
using ErsatzTV.Core.Interfaces.Locking;
|
||||
using ErsatzTV.Core.Metadata;
|
||||
using ErsatzTV.Infrastructure.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
@@ -83,7 +82,7 @@ namespace ErsatzTV.Services
|
||||
if (_entityLocker.LockMediaSource(mediaSourceId))
|
||||
{
|
||||
await _channel.WriteAsync(
|
||||
new ScanLocalMediaSource(mediaSourceId, ScanningMode.Default),
|
||||
new ScanLocalMediaSource(mediaSourceId),
|
||||
cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Threading;
|
||||
using System.Threading.Channels;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Application;
|
||||
using ErsatzTV.Application.MediaItems.Commands;
|
||||
using ErsatzTV.Application.MediaSources.Commands;
|
||||
using ErsatzTV.Application.Playouts.Commands;
|
||||
using ErsatzTV.Core;
|
||||
@@ -56,28 +55,6 @@ namespace ErsatzTV.Services
|
||||
buildPlayout.PlayoutId,
|
||||
error.Value));
|
||||
break;
|
||||
case RefreshMediaItem refreshMediaItem:
|
||||
string type = refreshMediaItem switch
|
||||
{
|
||||
// RefreshMediaItemMetadata => "metadata",
|
||||
RefreshMediaItemStatistics => "statistics",
|
||||
RefreshMediaItemCollections => "collections",
|
||||
RefreshMediaItemPoster => "poster",
|
||||
_ => ""
|
||||
};
|
||||
|
||||
// TODO: different request types for different media source types?
|
||||
Either<BaseError, Unit> refreshMediaItemResult =
|
||||
await mediator.Send(refreshMediaItem, cancellationToken);
|
||||
refreshMediaItemResult.Match(
|
||||
_ => _logger.LogDebug(
|
||||
$"Refreshed {type} for media item {{MediaItemId}}",
|
||||
refreshMediaItem.MediaItemId),
|
||||
error => _logger.LogWarning(
|
||||
$"Unable to refresh {type} for media item {{MediaItemId}}: {{Error}}",
|
||||
refreshMediaItem.MediaItemId,
|
||||
error.Value));
|
||||
break;
|
||||
case ScanLocalMediaSource scanLocalMediaSource:
|
||||
Either<BaseError, string> scanResult = await mediator.Send(
|
||||
scanLocalMediaSource,
|
||||
|
||||
Reference in New Issue
Block a user