diff --git a/src/NzbDrone.Api/Calendar/CalendarModule.cs b/src/NzbDrone.Api/Calendar/CalendarModule.cs index 141961ad5..484d3a52b 100644 --- a/src/NzbDrone.Api/Calendar/CalendarModule.cs +++ b/src/NzbDrone.Api/Calendar/CalendarModule.cs @@ -59,7 +59,7 @@ public void Handle(EpisodeGrabbedEvent message) foreach (var episode in message.Episode.Episodes) { var resource = episode.InjectTo(); - resource.Downloading = true; + resource.Grabbed = true; BroadcastResourceChange(ModelAction.Updated, resource); } diff --git a/src/NzbDrone.Api/Episodes/EpisodeModule.cs b/src/NzbDrone.Api/Episodes/EpisodeModule.cs index 91589b850..4e24cb78f 100644 --- a/src/NzbDrone.Api/Episodes/EpisodeModule.cs +++ b/src/NzbDrone.Api/Episodes/EpisodeModule.cs @@ -54,7 +54,7 @@ public void Handle(EpisodeGrabbedEvent message) foreach (var episode in message.Episode.Episodes) { var resource = episode.InjectTo(); - resource.Downloading = true; + resource.Grabbed = true; BroadcastResourceChange(ModelAction.Updated, resource); } diff --git a/src/NzbDrone.Api/Episodes/EpisodeResource.cs b/src/NzbDrone.Api/Episodes/EpisodeResource.cs index a767ef9e6..e1210cc7d 100644 --- a/src/NzbDrone.Api/Episodes/EpisodeResource.cs +++ b/src/NzbDrone.Api/Episodes/EpisodeResource.cs @@ -1,4 +1,5 @@ using System; +using Newtonsoft.Json; using NzbDrone.Api.REST; using NzbDrone.Core.MediaFiles; @@ -27,6 +28,8 @@ public class EpisodeResource : RestResource public Core.Tv.Series Series { get; set; } public String SeriesTitle { get; set; } - public Boolean Downloading { get; set; } + //Hiding this so people don't think its usable (only used to set the initial state) + [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] + public Boolean Grabbed { get; set; } } } diff --git a/src/UI/Calendar/CalendarView.js b/src/UI/Calendar/CalendarView.js index 4ff2b5043..c6dc6de65 100644 --- a/src/UI/Calendar/CalendarView.js +++ b/src/UI/Calendar/CalendarView.js @@ -106,7 +106,7 @@ define( _getStatusLevel: function (element, endTime) { var hasFile = element.get('hasFile'); - var downloading = QueueCollection.findEpisode(element.get('id')) || element.get('downloading'); + var downloading = QueueCollection.findEpisode(element.get('id')) || element.get('grabbed'); var currentTime = moment(); var start = moment(element.get('airDateUtc')); var end = moment(endTime); diff --git a/src/UI/Cells/EpisodeStatusCell.js b/src/UI/Cells/EpisodeStatusCell.js index c2b23a41f..167ac8671 100644 --- a/src/UI/Cells/EpisodeStatusCell.js +++ b/src/UI/Cells/EpisodeStatusCell.js @@ -69,12 +69,19 @@ define( if (downloading) { var progress = 100 - (downloading.get('sizeleft') / downloading.get('size') * 100); - this.$el.html('
'.format(progress.toFixed(1), downloading.get('title')) + - '
'.format(progress)); - return; + if (progress === 0) { + icon = 'icon-nd-downloading'; + tooltip = 'Episode is downloading'; + } + + else { + this.$el.html('
'.format(progress.toFixed(1), downloading.get('title')) + + '
'.format(progress)); + return; + } } - else if (this.model.get('downloading')) { + else if (this.model.get('grabbed')) { icon = 'icon-nd-downloading'; tooltip = 'Episode is downloading'; } diff --git a/src/UI/Content/progress-bars.less b/src/UI/Content/progress-bars.less index 6d4e0911f..9211b1c87 100644 --- a/src/UI/Content/progress-bars.less +++ b/src/UI/Content/progress-bars.less @@ -34,6 +34,6 @@ } } -.progress-purple .bar, .progress .bar-purple { +.progress-bar-purple { #gradient > .vertical(@purple, @nzbdronePurple); }