* fix plex library synchronization * add basic plex movie synchronization * proxy plex movie thumbnails (posters) * add plex path replacements * use transcoded plex artwork * remove unsynchronized plex movies on save; queue plex library scan on save * log plex path replacements * prefer buttons instead of menus * lock plex libraries before sync * add movie to collection from paged view * fix plex import memory use; quick add seasons/shows * quick add episode to collection * add favicon * add search page * disable plex for now
27 lines
1017 B
C#
27 lines
1017 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using ErsatzTV.Core.Interfaces.Repositories;
|
|
using LanguageExt;
|
|
using MediatR;
|
|
using static ErsatzTV.Application.Plex.Mapper;
|
|
|
|
namespace ErsatzTV.Application.Plex.Queries
|
|
{
|
|
public class GetPlexPathReplacementsBySourceIdHandler : IRequestHandler<GetPlexPathReplacementsBySourceId,
|
|
List<PlexPathReplacementViewModel>>
|
|
{
|
|
private readonly IMediaSourceRepository _mediaSourceRepository;
|
|
|
|
public GetPlexPathReplacementsBySourceIdHandler(IMediaSourceRepository mediaSourceRepository) =>
|
|
_mediaSourceRepository = mediaSourceRepository;
|
|
|
|
public Task<List<PlexPathReplacementViewModel>> Handle(
|
|
GetPlexPathReplacementsBySourceId request,
|
|
CancellationToken cancellationToken) =>
|
|
_mediaSourceRepository.GetPlexPathReplacements(request.PlexMediaSourceId)
|
|
.Map(list => list.Map(ProjectToViewModel).ToList());
|
|
}
|
|
}
|