mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-29 13:25:13 +02:00
Delay Profiles
New: Select preferred protocol (usenet/torrent) New: Option to delay grabs from usenet/torrents independently
This commit is contained in:
@@ -99,6 +99,27 @@ define(
|
||||
}
|
||||
],
|
||||
|
||||
templateHelpers: function () {
|
||||
|
||||
var episodeCount = this.episodeCollection.filter(function (episode) {
|
||||
return episode.get('hasFile') || (episode.get('monitored') && moment(episode.get('airDateUtc')).isBefore(moment()));
|
||||
}).length;
|
||||
|
||||
var episodeFileCount = this.episodeCollection.where({ hasFile: true }).length;
|
||||
var percentOfEpisodes = 100;
|
||||
|
||||
if (episodeCount > 0) {
|
||||
percentOfEpisodes = episodeFileCount / episodeCount * 100;
|
||||
}
|
||||
|
||||
return {
|
||||
showingEpisodes : this.showingEpisodes,
|
||||
episodeCount : episodeCount,
|
||||
episodeFileCount : episodeFileCount,
|
||||
percentOfEpisodes: percentOfEpisodes
|
||||
};
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
|
||||
if (!options.episodeCollection) {
|
||||
@@ -229,27 +250,6 @@ define(
|
||||
});
|
||||
},
|
||||
|
||||
templateHelpers: function () {
|
||||
|
||||
var episodeCount = this.episodeCollection.filter(function (episode) {
|
||||
return episode.get('hasFile') || (episode.get('monitored') && moment(episode.get('airDateUtc')).isBefore(moment()));
|
||||
}).length;
|
||||
|
||||
var episodeFileCount = this.episodeCollection.where({ hasFile: true }).length;
|
||||
var percentOfEpisodes = 100;
|
||||
|
||||
if (episodeCount > 0) {
|
||||
percentOfEpisodes = episodeFileCount / episodeCount * 100;
|
||||
}
|
||||
|
||||
return {
|
||||
showingEpisodes : this.showingEpisodes,
|
||||
episodeCount : episodeCount,
|
||||
episodeFileCount : episodeFileCount,
|
||||
percentOfEpisodes: percentOfEpisodes
|
||||
};
|
||||
},
|
||||
|
||||
_showHideEpisodes: function () {
|
||||
if (this.showingEpisodes) {
|
||||
this.showingEpisodes = false;
|
||||
|
Reference in New Issue
Block a user