mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
Patching Multi Search to add TV Shows. Patching Discover card to fix the title stuff
This commit is contained in:
parent
b9bbdb05b6
commit
05603e98dd
10 changed files with 31 additions and 12 deletions
|
@ -85,8 +85,10 @@ namespace Ombi.Core.Engine
|
|||
Title = album.title,
|
||||
Disk = album.images?.FirstOrDefault(x => x.coverType.Equals("disc"))?.url,
|
||||
Cover = album.images?.FirstOrDefault(x => x.coverType.Equals("cover"))?.url,
|
||||
ForeignArtistId = album?.artist?.foreignArtistId ?? string.Empty, // This needs to be populated to send to Lidarr for new requests
|
||||
RequestedByAlias = model.RequestedByAlias
|
||||
ForeignArtistId = album.artist?.foreignArtistId,
|
||||
RequestedByAlias = model.RequestedByAlias,
|
||||
Monitor = model.Monitor,
|
||||
SearchForMissingAlbums = model.SearchForMissingAlbums
|
||||
};
|
||||
if (requestModel.Cover.IsNullOrEmpty())
|
||||
{
|
||||
|
|
|
@ -76,7 +76,7 @@ namespace Ombi.Core.Engine.V2
|
|||
}
|
||||
}
|
||||
|
||||
if (filter.Movies)
|
||||
if (filter.Movies || filter.TvShows)
|
||||
{
|
||||
var movieDbData = (await _movieDbApi.MultiSearch(searchTerm, lang, cancellationToken)).results;
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
{
|
||||
public string ForeignAlbumId { get; set; }
|
||||
public string RequestedByAlias { get; set; }
|
||||
public string Monitor { get; set; }
|
||||
public bool SearchForMissingAlbums { get; set; }
|
||||
}
|
||||
|
||||
public class MusicArtistRequestViewModel
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace Ombi.Core.Models.Search.V2.Music
|
|||
public string Id { get; set; }
|
||||
public string StartYear { get; set; }
|
||||
public string EndYear { get; set; }
|
||||
public bool IsEnded => EndYear != null;
|
||||
public bool IsEnded => string.IsNullOrEmpty(EndYear);
|
||||
public bool Monitored { get; set; }
|
||||
public string Type { get; set; }
|
||||
public string Country { get; set; }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div id="result{{result.id}}" *ngIf="fullyLoaded" class="ombi-card dark-card c" [style.display]="hide ? 'none' : 'block'">
|
||||
<div class="card-top-info">
|
||||
<div class="top-left" id="type{{result.id}}">
|
||||
{{ result.title }}
|
||||
{{ 'Common.' + RequestType[result.type] | translate }}
|
||||
</div>
|
||||
<div class="{{getStatusClass()}} top-right" id="status{{result.id}}">
|
||||
<span class="indicator"></span><span class="indicator-text" id="availabilityStatus{{result.id}}">{{getAvailbilityStatus()}}</span>
|
||||
|
@ -11,7 +11,7 @@
|
|||
</div>
|
||||
<img [routerLink]="generateDetailsLink()" id="cardImage" src="{{result.posterPath}}" class="image"
|
||||
alt="{{result.title}}">
|
||||
<div [ngClass]="result.posterPath.includes('images/') ? 'middle-show' : 'middle'">
|
||||
<div [ngClass]="result.posterPath != null ? 'middle-show' : 'middle'">
|
||||
<a class="poster-overlay" [routerLink]="generateDetailsLink()">
|
||||
<div class="summary">
|
||||
<div class="title" id="title{{result.id}}">{{result.title}}</div>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div [ngClass]="result.posterPath.includes('images/') ? 'button-request-container-show' : 'button-request-container'" class="row" *ngIf="!result.available && !result.approved && !result.requested">
|
||||
<div [ngClass]="result.posterPath != null ? 'button-request-container-show' : 'button-request-container'" class="row" *ngIf="!result.available && !result.approved && !result.requested">
|
||||
<div class="button-request poster-overlay">
|
||||
<button id="requestButton{{result.id}}{{result.type}}{{discoverType}}" *ngIf="requestable" mat-raised-button class="btn-ombi full-width poster-request-btn" (click)="request($event)">
|
||||
<i *ngIf="!loading" class="fa-lg fas fa-cloud-download-alt"></i>
|
||||
|
@ -27,7 +27,7 @@
|
|||
{{'Common.Request' | translate }}
|
||||
</button>
|
||||
<button id="requestButton{{result.id}}{{result.type}}{{discoverType}}" *ngIf="monitored" mat-raised-button
|
||||
class="btn-spacing full-width" color="accent" [disabled]>
|
||||
class="btn-spacing full-width poster-request-btn" color="accent" [disabled]>
|
||||
<i class="fa-lg fas fa-check"></i> {{'Common.Monitored' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -82,6 +82,9 @@ export class DiscoverCardComponent implements OnInit {
|
|||
this.requestable = true;
|
||||
this.monitored = false;
|
||||
}
|
||||
console.log(this.result.title);
|
||||
console.log(this.requestable);
|
||||
console.log(this.monitored);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,9 @@ export interface IAlbumRequest extends IBaseRequest {
|
|||
|
||||
export interface IAlbumRequestModel {
|
||||
foreignAlbumId: string;
|
||||
monitored: boolean;
|
||||
monitor: string;
|
||||
searchForMissingAlbums: boolean;
|
||||
}
|
||||
|
||||
export interface IArtistRequestModel {
|
||||
|
|
|
@ -51,7 +51,10 @@ export class AlbumDetailsComponent {
|
|||
return;
|
||||
}
|
||||
this.requestService.requestAlbum({
|
||||
foreignAlbumId: this.album.id
|
||||
foreignAlbumId: this.album.id,
|
||||
monitored: true,
|
||||
monitor: "existing",
|
||||
searchForMissingAlbums: true
|
||||
}).toPromise()
|
||||
.then(r => {
|
||||
if (r.result) {
|
||||
|
|
|
@ -87,7 +87,10 @@ export class ArtistDetailsComponent {
|
|||
return;
|
||||
}
|
||||
this.requestService.requestAlbum({
|
||||
foreignAlbumId : a.id
|
||||
foreignAlbumId : a.id,
|
||||
monitored: true,
|
||||
monitor: "all",
|
||||
searchForMissingAlbums: true
|
||||
}).toPromise()
|
||||
.then(r => {
|
||||
if (r.result) {
|
||||
|
@ -110,7 +113,10 @@ export class ArtistDetailsComponent {
|
|||
return;
|
||||
}
|
||||
this.requestService.requestAlbum({
|
||||
foreignAlbumId : a.id
|
||||
foreignAlbumId : a.id,
|
||||
monitored: true,
|
||||
monitor: "all",
|
||||
searchForMissingAlbums: true
|
||||
}).toPromise()
|
||||
.then(r => {
|
||||
if (r.result) {
|
||||
|
|
|
@ -154,7 +154,7 @@ export class RequestService extends ServiceHelpers {
|
|||
|
||||
// Music
|
||||
public requestAlbum(Album: IAlbumRequestModel): Observable<IRequestEngineResult> {
|
||||
return this.http.post<IRequestEngineResult>(`${this.url}music/`, JSON.stringify(Album), {headers: this.headers});
|
||||
return this.http.post<IRequestEngineResult>(`${this.url}album/`, JSON.stringify(Album), {headers: this.headers});
|
||||
}
|
||||
public requestArtist(Artist: IArtistRequestModel): Observable<IRequestEngineResult> {
|
||||
return this.http.post<IRequestEngineResult>(`${this.url}artist/`, JSON.stringify(Artist), { headers: this.headers });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue