mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
SignalR will now update quality in UI as well (when applicable)
This commit is contained in:
parent
c5df00cc87
commit
03a7643b75
6 changed files with 34 additions and 12 deletions
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Model;
|
||||
using NzbDrone.Core.Repository.Quality;
|
||||
using SignalR;
|
||||
using SignalR.Hosting.AspNet;
|
||||
using SignalR.Hubs;
|
||||
|
@ -15,11 +16,25 @@ namespace NzbDrone.Core.Providers
|
|||
{
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public virtual void UpdateEpisodeStatus(int episodeId, EpisodeStatusType episodeStatus)
|
||||
public virtual void UpdateEpisodeStatus(int episodeId, EpisodeStatusType episodeStatus, Quality quality)
|
||||
{
|
||||
logger.Trace("Sending Status update to client. EpisodeId: {0}, Status: {1}", episodeId, episodeStatus);
|
||||
try
|
||||
{
|
||||
logger.Trace("Sending Status update to client. EpisodeId: {0}, Status: {1}", episodeId, episodeStatus);
|
||||
|
||||
GetClients().updatedStatus(episodeId, episodeStatus.ToString());
|
||||
GetClients().updatedStatus(new
|
||||
{
|
||||
EpisodeId = episodeId,
|
||||
EpisodeStatus = episodeStatus.ToString(),
|
||||
Quality = (quality == null ? String.Empty : quality.QualityType.ToString())
|
||||
});
|
||||
var test = 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Trace("Error");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private dynamic GetClients()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue