mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 01:23:53 -07:00
Episode grid will show downloading on grab
New: Update episode status in UI on grab and download
This commit is contained in:
parent
b6693a20a9
commit
daeb2fc652
37 changed files with 613 additions and 128 deletions
|
@ -1,16 +1,22 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Api.REST;
|
||||
using NzbDrone.Core.Datastore.Events;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
using NzbDrone.Api.Mapping;
|
||||
using NzbDrone.Core.MediaFiles.Events;
|
||||
using NzbDrone.Core.Messaging.Commands;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
|
||||
namespace NzbDrone.Api.EpisodeFiles
|
||||
{
|
||||
public class EpisodeModule : NzbDroneRestModule<EpisodeFileResource>
|
||||
public class EpisodeModule : NzbDroneRestModuleWithSignalR<EpisodeFileResource, EpisodeFile>,
|
||||
IHandle<EpisodeFileAddedEvent>
|
||||
{
|
||||
private readonly IMediaFileService _mediaFileService;
|
||||
|
||||
public EpisodeModule(IMediaFileService mediaFileService)
|
||||
: base("/episodefile")
|
||||
public EpisodeModule(ICommandExecutor commandExecutor, IMediaFileService mediaFileService)
|
||||
: base(commandExecutor)
|
||||
{
|
||||
_mediaFileService = mediaFileService;
|
||||
GetResourceById = GetEpisodeFile;
|
||||
|
@ -41,5 +47,10 @@ namespace NzbDrone.Api.EpisodeFiles
|
|||
episodeFile.Quality = episodeFileResource.Quality;
|
||||
_mediaFileService.Update(episodeFile);
|
||||
}
|
||||
|
||||
public void Handle(EpisodeFileAddedEvent message)
|
||||
{
|
||||
BroadcastResourceChange(ModelAction.Updated, message.EpisodeFile.Id);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue