mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-30 19:56:54 +00:00
More info on calendar
New: Show more information of grabbed and failed downloads on calendar
This commit is contained in:
parent
75236118dd
commit
c3fee509f6
3 changed files with 35 additions and 12 deletions
|
@ -60,15 +60,24 @@ define(
|
|||
var progress = 100 - (event.downloading.get('sizeleft') / event.downloading.get('size') * 100);
|
||||
var releaseTitle = event.downloading.get('title');
|
||||
var estimatedCompletionTime = moment(event.downloading.get('estimatedCompletionTime')).fromNow();
|
||||
var status = event.downloading.get('status').toLocaleLowerCase();
|
||||
var errorMessage = event.downloading.get('errorMessage');
|
||||
|
||||
if (event.downloading.get('status').toLocaleLowerCase() === 'pending') {
|
||||
this.$(element).find('.fc-event-time')
|
||||
.after('<span class="pending pull-right"><i class="icon-time"></i></span>');
|
||||
if (status === 'pending') {
|
||||
this._addStatusIcon(element, 'icon-time', 'Release will be processed {0}'.format(estimatedCompletionTime));
|
||||
}
|
||||
|
||||
this.$(element).find('.pending').tooltip({
|
||||
title: 'Release will be processed {0}'.format(estimatedCompletionTime),
|
||||
container: 'body'
|
||||
});
|
||||
else if (errorMessage) {
|
||||
if (status === 'completed') {
|
||||
this._addStatusIcon(element, 'icon-nd-import-failed', 'Import failed: {0}'.format(errorMessage));
|
||||
}
|
||||
else {
|
||||
this._addStatusIcon(element, 'icon-nd-download-failed', 'Download failed: {0}'.format(errorMessage));
|
||||
}
|
||||
}
|
||||
|
||||
else if (status === 'failed') {
|
||||
this._addStatusIcon(element, 'icon-nd-download-failed', 'Download failed: check download client for more details');
|
||||
}
|
||||
|
||||
else {
|
||||
|
@ -218,6 +227,16 @@ define(
|
|||
};
|
||||
|
||||
return options;
|
||||
},
|
||||
|
||||
_addStatusIcon: function (element, icon, tooltip) {
|
||||
this.$(element).find('.fc-event-time')
|
||||
.after('<span class="status pull-right"><i class="{0}"></i></span>'.format(icon));
|
||||
|
||||
this.$(element).find('.status').tooltip({
|
||||
title: tooltip,
|
||||
container: 'body'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
.fc-event {
|
||||
.clickable;
|
||||
|
||||
.pending {
|
||||
.status {
|
||||
margin-right : 4px;
|
||||
}
|
||||
}
|
||||
|
@ -173,8 +173,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.ical
|
||||
{
|
||||
.ical {
|
||||
color: @btn-link-disabled-color;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
@ -37,14 +37,19 @@ define(
|
|||
title = 'Pending';
|
||||
}
|
||||
|
||||
if (status === 'failed') {
|
||||
icon = 'icon-nd-download-failed';
|
||||
title = 'Download failed: check download client for more details';
|
||||
}
|
||||
|
||||
if (errorMessage !== '') {
|
||||
if (status === 'completed') {
|
||||
icon = 'icon-nd-import-failed';
|
||||
title = "Import failed";
|
||||
title = 'Import failed';
|
||||
}
|
||||
else {
|
||||
icon = 'icon-nd-download-failed';
|
||||
title = "Download failed";
|
||||
title = 'Download failed';
|
||||
}
|
||||
this.$el.html('<i class="{0}"></i>'.format(icon));
|
||||
|
||||
|
|
Loading…
Reference in a new issue