mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 08:16:05 -07:00
#1513 !wip when we have every episode of a series, we now mark as available.
This commit is contained in:
parent
6e7e1e4660
commit
f986e8d132
5 changed files with 16 additions and 23 deletions
|
@ -202,7 +202,6 @@ namespace Ombi.Core.Engine
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (plexSettings.Enable)
|
||||
{
|
||||
|
@ -230,12 +229,15 @@ namespace Ombi.Core.Engine
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (item.SeasonRequests.Any() && item.SeasonRequests.All(x => x.Episodes.All(e => e.Approved)))
|
||||
{
|
||||
item.FullyAvailable = true;
|
||||
}
|
||||
|
||||
if (item.Id > 0)
|
||||
{
|
||||
// TODO need to check if the episodes are available
|
||||
var tvdbid = item.Id;
|
||||
if (existingRequests.ContainsKey(tvdbid))
|
||||
{
|
||||
|
@ -269,6 +271,7 @@ namespace Ombi.Core.Engine
|
|||
}
|
||||
}
|
||||
}
|
||||
// TODO CHECK SONARR/RADARR
|
||||
//if (sonarrCached.Select(x => x.TvdbId).Contains(tvdbid) || sickRageCache.Contains(tvdbid))
|
||||
// // compare to the sonarr/sickrage db
|
||||
//{
|
||||
|
|
|
@ -49,5 +49,10 @@ namespace Ombi.Core.Models.Search
|
|||
|
||||
public bool FirstSeason { get; set; }
|
||||
public bool LatestSeason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This is where we have EVERY Episode for that series
|
||||
/// </summary>
|
||||
public bool FullyAvailable { get; set; }
|
||||
}
|
||||
}
|
|
@ -42,7 +42,6 @@ export class SeriesInformationComponent implements OnInit, OnDestroy {
|
|||
this.requestService.requestTv(this.series)
|
||||
.takeUntil(this.subscriptions)
|
||||
.subscribe(x => {
|
||||
debugger;
|
||||
this.result = x as IRequestEngineResult;
|
||||
if (this.result.requestAdded) {
|
||||
this.notificationService.success("Request Added",
|
||||
|
|
|
@ -80,24 +80,7 @@
|
|||
<div class="col-sm-2">
|
||||
<input name="{{type}}Id" type="text" value="{{node.data.id}}" hidden="hidden" />
|
||||
|
||||
|
||||
<!--<div *ngIf="node.data.requested; then requestedBtn else notRequestedBtn"></div>
|
||||
<template #requestedBtn>
|
||||
<button style="text-align: right" class="btn btn-primary-outline disabled" [disabled]><i class="fa fa-check"></i> Requested</button>
|
||||
</template>
|
||||
<template #notRequestedBtn>
|
||||
<button id="{{node.data.id}}" style="text-align: right" class="btn btn-primary-outline" (click)="request(result)"><i class="fa fa-plus"></i> Request</button>
|
||||
</template>-->
|
||||
<!--{{#if_eq type "tv"}}
|
||||
{{#if_eq tvFullyAvailable true}}
|
||||
@*//TODO Not used yet*@
|
||||
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Available</button><br/>
|
||||
{{else}}
|
||||
{{#if_eq enableTvRequestsForOnlySeries true}}
|
||||
<button id="{{id}}" style="text-align: right" class="btn {{#if available}}btn-success-outline{{else}}btn-primary-outline dropdownTv{{/if}} btn-primary-outline" season-select="0" type="button" {{#if available}} disabled{{/if}}><i class="fa fa-plus"></i> {{#if available}}@UI.Search_Available{{else}}@UI.Search_Request{{/if}}</button>
|
||||
{{else}}
|
||||
-->
|
||||
<div class="dropdown">
|
||||
<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
|
||||
<span class="caret"></span>
|
||||
|
@ -110,6 +93,9 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div *ngIf="node.data.fullyAvailable">
|
||||
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> Available</button>
|
||||
</div>
|
||||
<!--
|
||||
<br/>
|
||||
<a style="text-align: right" class="btn btn-sm btn-primary-outline" href="{{url}}" target="_blank"><i class="fa fa-eye"></i> @UI.Search_ViewInPlex</a>
|
||||
|
|
|
@ -32,7 +32,7 @@ export class UpdateComponent implements OnInit {
|
|||
this.updateAvailable = true;
|
||||
this.notificationService.success("Update", "There is a new update available");
|
||||
} else {
|
||||
this.notificationService.success("Update", "You are on the latest version!")
|
||||
this.notificationService.success("Update", "You are on the latest version!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue