mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 02:22:31 +01:00
Cleanup min availability (#846)
* some minor cleanup + changed filter on wanted/missing * MovieIndex Footer add counts + update legend * minor spelling error + typo
This commit is contained in:
parent
9d29776e8e
commit
0678908fd9
@ -37,3 +37,6 @@
|
||||
.progress-bar-purple {
|
||||
#gradient > .vertical(@purple, @nzbdronePurple);
|
||||
}
|
||||
.progress-bar-gray {
|
||||
#gradient > .vertical(@gray-light, @gray-light);
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
<div class="row">
|
||||
<div class="series-legend legend col-xs-6 col-sm-4">
|
||||
<ul class='legend-labels'>
|
||||
<li><span class="progress-bar"></span>Missing, but not yet considered availabile</li>
|
||||
<li><span class="progress-bar-success"></span>Downloaded and imported.</li>
|
||||
<li><span class="progress-bar-danger"></span>Missing and monitored.</li>
|
||||
<li><span class="progress-bar-warning"></span>Missing, but not monitored.</li>
|
||||
<li><span class="progress-bar"></span>Missing, but not yet considered available: {{missingNotAvailable}}</li>
|
||||
<li><span class="progress-bar-success"></span>Downloaded and imported: {{downloaded}}</li>
|
||||
<li><span class="progress-bar-gray"></span>Downloaded, but not monitored: {{downloadedNotMonitored}}</li>
|
||||
<li><span class="progress-bar-danger"></span>Missing and monitored: {{missingMonitored}}</li>
|
||||
<li><span class="progress-bar-warning"></span>Missing, but not monitored: {{missingNotMonitored}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-xs-5 col-sm-7">
|
||||
@ -12,7 +13,7 @@
|
||||
<div class="series-stats col-sm-4">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Movies</dt>
|
||||
<dd>{{series}}</dd>
|
||||
<dd>{{movies}}</dd>
|
||||
|
||||
<dt>Released</dt>
|
||||
<dd>{{released}}</dd>
|
||||
@ -27,23 +28,13 @@
|
||||
|
||||
<div class="series-stats col-sm-4">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Monitored</dt>
|
||||
<dd>{{monitored}}</dd>
|
||||
|
||||
<dt>Unmonitored</dt>
|
||||
<dd>{{unmonitored}}</dd>
|
||||
<dt>Available,Monitored&Missing</dt>
|
||||
<dd>{{missingMonitoredAvailable}}</dd>
|
||||
<dt>Monitored</dt>
|
||||
<dd>{{monitored}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="series-stats col-sm-4">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Episodes</dt>
|
||||
<dd>{{episodes}}</dd>
|
||||
|
||||
<dt>Files</dt>
|
||||
<dd>{{episodeFiles}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -323,40 +323,75 @@ module.exports = Marionette.Layout.extend({
|
||||
|
||||
_showFooter : function() {
|
||||
var footerModel = new FooterModel();
|
||||
var series = MoviesCollection.models.length;
|
||||
var episodes = 0;
|
||||
var episodeFiles = 0;
|
||||
var movies = MoviesCollection.models.length;
|
||||
|
||||
var announced = 0;
|
||||
var released = 0;
|
||||
var incinemas = 0;
|
||||
var monitored = 0;
|
||||
var released = 0;
|
||||
|
||||
var monitored = 0;
|
||||
|
||||
var downloaded =0;
|
||||
var missingMonitored=0;
|
||||
var missingNotMonitored=0;
|
||||
var missingNotAvailable=0;
|
||||
var missingMonitoredAvailable=0;
|
||||
|
||||
var downloadedNotMonitored=0;
|
||||
|
||||
_.each(MoviesCollection.models, function(model) {
|
||||
episodes += model.get('episodeCount');
|
||||
episodeFiles += model.get('episodeFileCount');
|
||||
|
||||
if (model.get('status').toLowerCase() === 'released') {
|
||||
released++;
|
||||
} else if (model.get('status').toLowerCase() === 'incinemas') {
|
||||
}
|
||||
else if (model.get('status').toLowerCase() === 'incinemas') {
|
||||
incinemas++;
|
||||
} else {
|
||||
}
|
||||
else if (model.get('status').toLowerCase() === 'announced') {
|
||||
announced++;
|
||||
}
|
||||
|
||||
if (model.get('monitored')) {
|
||||
monitored++;
|
||||
}
|
||||
else { //not monitored
|
||||
if (model.get('downloaded')) {
|
||||
downloadedNotMonitored++;
|
||||
}
|
||||
else { //missing
|
||||
missingNotMonitored++;
|
||||
}
|
||||
}
|
||||
|
||||
if (model.get('downloaded')) {
|
||||
downloaded++;
|
||||
}
|
||||
else { //missing
|
||||
if (!model.get('isAvailable')) {
|
||||
missingNotAvailable++;
|
||||
}
|
||||
|
||||
if (model.get('monitored')) {
|
||||
missingMonitored++;
|
||||
if (model.get('isAvailable')) {
|
||||
missingMonitoredAvailable++;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
footerModel.set({
|
||||
series : series,
|
||||
released : released,
|
||||
incinemas : incinemas,
|
||||
announced : announced,
|
||||
monitored : monitored,
|
||||
unmonitored : series - monitored,
|
||||
episodes : episodes,
|
||||
episodeFiles : episodeFiles
|
||||
movies : movies,
|
||||
announced : announced,
|
||||
incinemas : incinemas,
|
||||
released : released,
|
||||
monitored : monitored,
|
||||
downloaded : downloaded,
|
||||
downloadedNotMonitored : downloadedNotMonitored,
|
||||
missingMonitored : missingMonitored,
|
||||
missingMonitoredAvailable : missingMonitoredAvailable,
|
||||
missingNotAvailable : missingNotAvailable,
|
||||
missingNotMonitored : missingNotMonitored
|
||||
});
|
||||
|
||||
this.footer.show(new FooterView({ model : footerModel }));
|
||||
|
Loading…
Reference in New Issue
Block a user