Added a PartlyAvailable flag for tv shows

pull/1551/head
Jamie.Rees 7 years ago
parent e1ea188109
commit 106a46dea5

@ -55,6 +55,8 @@ namespace Ombi.Core.Models.Search
/// This is where we have EVERY Episode for that series
/// </summary>
public bool FullyAvailable { get; set; }
// We only have some episodes
public bool PartlyAvailable { get; set; }
public override RequestType Type => RequestType.TvShow;
}

@ -87,6 +87,10 @@ namespace Ombi.Core.Rule.Rules.Search
{
request.FullyAvailable = true;
}
if (request.SeasonRequests.Any() && request.SeasonRequests.All(x => x.Episodes.Any(e => e.Approved)))
{
request.PartlyAvailable = true;
}
return Task.FromResult(Success());

@ -62,6 +62,7 @@
<ng-template [ngIf]="node.data.available"><span class="label label-success">Available</span></ng-template>
<ng-template [ngIf]="node.data.partlyAvailable"><span class="label label-warning">Partially Available</span></ng-template>
<a *ngIf="node.data.homepage" href="{{node.data.homepage}}" target="_blank"><span class="label label-info">HomePage</span></a>

Loading…
Cancel
Save