mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-31 12:00:06 -07:00
Fixed #1878 and added a Request all button when selecting episodes
This commit is contained in:
parent
6d02882990
commit
108d343fec
5 changed files with 15 additions and 27 deletions
|
@ -83,11 +83,11 @@ namespace Ombi.Core.Rule.Rules.Search
|
|||
}
|
||||
}
|
||||
|
||||
if (request.SeasonRequests.Any() && request.SeasonRequests.All(x => x.Episodes.All(e => e.Approved)))
|
||||
if (request.SeasonRequests.Any() && request.SeasonRequests.All(x => x.Episodes.All(e => e.Available)))
|
||||
{
|
||||
request.FullyAvailable = true;
|
||||
}
|
||||
if (request.SeasonRequests.Any() && request.SeasonRequests.All(x => x.Episodes.Any(e => e.Approved)))
|
||||
if (request.SeasonRequests.Any() && request.SeasonRequests.All(x => x.Episodes.Any(e => e.Available)))
|
||||
{
|
||||
request.PartlyAvailable = true;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" id="search" class="form-control form-control-custom searchwidth" placeholder="Search" (keyup)="search($event)">
|
||||
<span class="input-group-btn"> <button class="btn btn-sm btn-info-outline" (click)="filterDisplay = true" >
|
||||
<span class="input-group-btn">
|
||||
<button id="filterBtn" class="btn btn-sm btn-info-outline" (click)="filterDisplay = true" >
|
||||
<i class="fa fa-filter"></i> {{ 'Requests.Filter' | translate }}</button>
|
||||
</span>
|
||||
|
||||
|
@ -191,12 +192,6 @@
|
|||
<label for="approved">{{ 'Filter.Approved' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="notApproved" name="Status" (click)="filterStatus(filterType.NotApproved)">
|
||||
<label for="notApproved">{{ 'Filter.NotApproved' | translate }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="radio">
|
||||
<input type="radio" id="Processing" name="Status" (click)="filterStatus(filterType.Processing)">
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<ng-template ngbTabContent>
|
||||
<h2>Season: {{season.seasonNumber}}</h2>
|
||||
|
||||
<button (click)="addAllEpisodes(season)" class="btn btn-sm btn-primary-outline">Select All in Season {{season.seasonNumber}}</button>
|
||||
<table class="table table-striped table-hover table-responsive table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
import { Component, Input, OnDestroy, OnInit} from "@angular/core";
|
||||
import { Subject } from "rxjs/Subject";
|
||||
|
||||
import { Component, Input, OnInit} from "@angular/core";
|
||||
import "rxjs/add/operator/takeUntil";
|
||||
|
||||
import { NotificationService } from "../services";
|
||||
import { RequestService } from "../services";
|
||||
import { SearchService } from "../services";
|
||||
|
||||
import { IRequestEngineResult } from "../interfaces";
|
||||
import { INewSeasonRequests, IRequestEngineResult } from "../interfaces";
|
||||
import { IEpisodesRequests } from "../interfaces";
|
||||
import { ISearchTvResult } from "../interfaces";
|
||||
|
||||
|
@ -16,20 +14,18 @@ import { ISearchTvResult } from "../interfaces";
|
|||
templateUrl: "./seriesinformation.component.html",
|
||||
styleUrls: ["./seriesinformation.component.scss"],
|
||||
})
|
||||
export class SeriesInformationComponent implements OnInit, OnDestroy {
|
||||
export class SeriesInformationComponent implements OnInit {
|
||||
|
||||
public result: IRequestEngineResult;
|
||||
public series: ISearchTvResult;
|
||||
public requestedEpisodes: IEpisodesRequests[] = [];
|
||||
|
||||
@Input() private seriesId: number;
|
||||
private subscriptions = new Subject<void>();
|
||||
|
||||
constructor(private searchService: SearchService, private requestService: RequestService, private notificationService: NotificationService) { }
|
||||
|
||||
public ngOnInit() {
|
||||
this.searchService.getShowInformation(this.seriesId)
|
||||
.takeUntil(this.subscriptions)
|
||||
.subscribe(x => {
|
||||
this.series = x;
|
||||
});
|
||||
|
@ -51,7 +47,6 @@ export class SeriesInformationComponent implements OnInit, OnDestroy {
|
|||
this.series.requested = true;
|
||||
|
||||
this.requestService.requestTv(this.series)
|
||||
.takeUntil(this.subscriptions)
|
||||
.subscribe(x => {
|
||||
this.result = x as IRequestEngineResult;
|
||||
if (this.result.result) {
|
||||
|
@ -80,8 +75,7 @@ export class SeriesInformationComponent implements OnInit, OnDestroy {
|
|||
episode.selected = false;
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
this.subscriptions.next();
|
||||
this.subscriptions.complete();
|
||||
public addAllEpisodes(season: INewSeasonRequests) {
|
||||
season.episodes.forEach((ep) => this.addRequest(ep));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,12 +79,10 @@
|
|||
<span *ngIf="node.data.network" class="label label-info" id="networkLabel" target="_blank">{{node.data.network}}</span>
|
||||
|
||||
|
||||
<ng-template [ngIf]="node.data.available">
|
||||
<span class="label label-success" id="availableLabel">Available</span>
|
||||
</ng-template>
|
||||
<ng-template [ngIf]="node.data.partlyAvailable">
|
||||
<span class="label label-warning" id="partiallyAvailableLabel">Partially Available</span>
|
||||
</ng-template>
|
||||
<span *ngIf="node.data.available" class="label label-success" id="availableLabel">Available</span>
|
||||
|
||||
<span *ngIf="node.data.partlyAvailable" class="label label-warning" id="partiallyAvailableLabel">Partially Available</span>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue