We now show "Available" for tv shows that is fully available #1602

pull/1634/head
tidusjar 7 years ago
parent 7e4de5cbd7
commit fe7ca844dc

@ -46,6 +46,11 @@ namespace Ombi.Core.Rule.Rules.Search
}
}
}
if (search.SeasonRequests.All(x => x.Episodes.All(e => e.Available)))
{
search.FullyAvailable = true;
}
}
}
}

@ -78,8 +78,6 @@
<div class="col-sm-2">
<input name="{{type}}Id" type="text" value="{{node.data.id}}" hidden="hidden" />
<div *ngIf="!node.data.fullyAvailable" class="dropdown">
<button class="btn btn-primary-outline dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<i class="fa fa-plus"></i> Request

@ -197,11 +197,12 @@ export class TvSearchComponent implements OnInit, OnDestroy {
private updateItem(key: TreeNode, updated: TreeNode) {
const index = this.tvResults.indexOf(key, 0);
if (index > -1) {
// Update certian properties, otherwise we will loose some data
// Update certain properties, otherwise we will loose some data
this.tvResults[index].data.banner = updated.data.banner;
this.tvResults[index].data.imdbId = updated.data.imdbId;
this.tvResults[index].data.seasonRequests = updated.data.seasonRequests;
this.tvResults[index].data.seriesId = updated.data.seriesId;
this.tvResults[index].data.fullyAvailable = updated.data.fullyAvailable;
}
}

Loading…
Cancel
Save