mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -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
|
@ -63,9 +63,9 @@ $(function () {
|
|||
var signalRProvider = $.connection.signalRProvider;
|
||||
|
||||
// Declare a function on the chat hub so the server can invoke it
|
||||
signalRProvider.updatedStatus = function (episodeId, episodeStatus) {
|
||||
var imageSrc = '../../Content/Images/' + episodeStatus + '.png';
|
||||
var row = $('tr.episodeId_' + episodeId);
|
||||
signalRProvider.updatedStatus = function (data) {
|
||||
var imageSrc = '../../Content/Images/' + data.EpisodeStatus + '.png';
|
||||
var row = $('tr.episodeId_' + data.EpisodeId);
|
||||
|
||||
if (row.length == 0)
|
||||
return;
|
||||
|
@ -75,13 +75,20 @@ $(function () {
|
|||
if (statusImage.length == 0)
|
||||
return;
|
||||
|
||||
statusImage.attr('alt', episodeStatus);
|
||||
statusImage.attr('title', episodeStatus);
|
||||
statusImage.attr('alt', data.EpisodeStatus);
|
||||
statusImage.attr('title', data.EpisodeStatus);
|
||||
statusImage.attr('src', imageSrc);
|
||||
|
||||
if (episodeStatus != "Missing") {
|
||||
if (data.EpisodeStatus != "Missing") {
|
||||
statusImage.parent('td').removeClass('episodeMissing');
|
||||
}
|
||||
|
||||
if (data.Quality != null) {
|
||||
var qualityColumn = $(row).find('.episodeQuality');
|
||||
|
||||
if (qualityColumn)
|
||||
qualityColumn.text(data.Quality);
|
||||
}
|
||||
};
|
||||
|
||||
// Start the connection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue