Merge branch 'settings-changes' into feature/v4

pull/3595/head
Jamie 5 years ago committed by GitHub
commit b28e485f5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -62,6 +62,18 @@ stages:
$response = Invoke-WebRequest -Uri "https://ombireleasenote.azurewebsites.net/api/ReleaseNotesFunction?buildId=$(Build.BuildId)" $response = Invoke-WebRequest -Uri "https://ombireleasenote.azurewebsites.net/api/ReleaseNotesFunction?buildId=$(Build.BuildId)"
Write-Host "##vso[task.setvariable variable=ReleaseNotes;]$response" Write-Host "##vso[task.setvariable variable=ReleaseNotes;]$response"
- task: GitHubRelease@1
inputs:
gitHubConnection: 'github.com_tidusjar'
repositoryName: 'tidusjar/Ombi'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: '$(gitTag)'
isDraft: true
changeLogCompareToRelease: 'lastNonDraftRelease'
changeLogType: 'commitBased'
- task: GitHubRelease@1 - task: GitHubRelease@1
inputs: inputs:
gitHubConnection: 'github.com_tidusjar' gitHubConnection: 'github.com_tidusjar'
@ -78,4 +90,4 @@ stages:
isPreRelease: true isPreRelease: true
changeLogCompareToRelease: 'lastNonDraftRelease' changeLogCompareToRelease: 'lastNonDraftRelease'
changeLogType: 'commitBased' changeLogType: 'commitBased'
condition: and(succeeded(), eq(variables['PublishToGithub'], 'true')) condition: and(succeeded(), eq(variables['PublishToGithub'], 'true'))

@ -24,5 +24,7 @@ namespace Ombi.Core.Engine.Interfaces
Task<IEnumerable<SearchMovieViewModel>> UpcomingMovies(int currentlyLoaded, int toLoad); Task<IEnumerable<SearchMovieViewModel>> UpcomingMovies(int currentlyLoaded, int toLoad);
Task<ActorCredits> GetMoviesByActor(int actorId, string langCode); Task<ActorCredits> GetMoviesByActor(int actorId, string langCode);
int ResultLimit { get; set; } int ResultLimit { get; set; }
Task<MovieFullInfoViewModel> GetMovieInfoByImdbId(string imdbId, CancellationToken requestAborted);
} }
} }

@ -352,5 +352,18 @@ namespace Ombi.Core.Engine.V2
viewModel.Subscribed = sub != null; viewModel.Subscribed = sub != null;
} }
} }
public async Task<MovieFullInfoViewModel> GetMovieInfoByImdbId(string imdbId, CancellationToken cancellationToken)
{
var langCode = await DefaultLanguageCode(null);
var findResult = await Cache.GetOrAdd(nameof(GetMovieInfoByImdbId) + imdbId + langCode,
async () => await MovieApi.Find(imdbId, ExternalSource.imdb_id), DateTime.Now.AddHours(12), cancellationToken);
var movie = findResult.movie_results.FirstOrDefault();
var movieInfo = await Cache.GetOrAdd(nameof(GetMovieInfoByImdbId) + movie.id + langCode,
async () => await MovieApi.GetFullMovieInfo(movie.id, cancellationToken, langCode), DateTime.Now.AddHours(12), cancellationToken);
return await ProcessSingleMovie(movieInfo);
}
} }
} }

@ -147,6 +147,12 @@ namespace Ombi.Core.Engine.V2
item.SeasonRequests = oldModel.SeasonRequests; item.SeasonRequests = oldModel.SeasonRequests;
item.RequestId = oldModel.RequestId; item.RequestId = oldModel.RequestId;
if (!string.IsNullOrEmpty(item.Images?.Medium))
{
item.Images.Medium = item.Images.Medium.Replace("http", "https");
}
return await GetExtraInfo(showInfoTask, item); return await GetExtraInfo(showInfoTask, item);
} }

@ -33,6 +33,8 @@ import { MatCardModule } from "@angular/material/card";
import { MatInputModule } from "@angular/material/input"; import { MatInputModule } from "@angular/material/input";
import { MatSlideToggleModule } from "@angular/material/slide-toggle"; import { MatSlideToggleModule } from "@angular/material/slide-toggle";
import { MatTabsModule } from "@angular/material/tabs"; import { MatTabsModule } from "@angular/material/tabs";
import { MatTooltipModule } from "@angular/material/tooltip";
import { MDBBootstrapModule, CardsFreeModule, NavbarModule } from "angular-bootstrap-md"; import { MDBBootstrapModule, CardsFreeModule, NavbarModule } from "angular-bootstrap-md";
@ -60,10 +62,8 @@ import { LayoutModule } from '@angular/cdk/layout';
import { SearchV2Service } from "./services/searchV2.service"; import { SearchV2Service } from "./services/searchV2.service";
import { NavSearchComponent } from "./my-nav/nav-search.component"; import { NavSearchComponent } from "./my-nav/nav-search.component";
import { OverlayModule } from "@angular/cdk/overlay"; import { OverlayModule } from "@angular/cdk/overlay";
import { getBaseLocation } from "./shared/functions/common-functions";
import { StorageService } from "./shared/storage/storage-service"; import { StorageService } from "./shared/storage/storage-service";
import { SignalRNotificationService } from "./services/signlarnotification.service"; import { SignalRNotificationService } from "./services/signlarnotification.service";
const routes: Routes = [ const routes: Routes = [
{ path: "*", component: PageNotFoundComponent }, { path: "*", component: PageNotFoundComponent },
{ path: "", redirectTo: "/discover", pathMatch: "full" }, { path: "", redirectTo: "/discover", pathMatch: "full" },
@ -125,6 +125,7 @@ export function JwtTokenGetter() {
MatButtonModule, MatButtonModule,
NavbarModule, NavbarModule,
MatCardModule, MatCardModule,
MatTooltipModule,
MatInputModule, MatInputModule,
MatTabsModule, MatTabsModule,
ReactiveFormsModule, ReactiveFormsModule,

@ -33,4 +33,8 @@ export interface INavBar {
link: string; link: string;
requiresAdmin: boolean; requiresAdmin: boolean;
enabled: boolean; enabled: boolean;
toolTip?: boolean;
toolTipMessage?: string;
style?: string;
donation?: boolean;
} }

@ -51,9 +51,9 @@
<ng-container matColumnDef="actions"> <ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef> </th> <th mat-header-cell *matHeaderCellDef> </th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
<button *ngIf="element.requestType === 1" mat-raised-button color="accent" [routerLink]="'/details/movie/request/' + element.requestId">{{ 'Issues.Details' | translate}}</button> <button *ngIf="element.requestType === 1" mat-raised-button color="accent" [routerLink]="'/details/movie/' + element.providerId">{{ 'Issues.Details' | translate}}</button>
<button *ngIf="element.requestType === 0" mat-raised-button color="accent" [routerLink]="'/details/show/request/' + element.requestId">{{ 'Issues.Details' | translate}}</button> <button *ngIf="element.requestType === 0" mat-raised-button color="accent" [routerLink]="'/details/tv/' + element.providerId">{{ 'Issues.Details' | translate}}</button>
<button *ngIf="element.requestType === 2" mat-raised-button color="accent" [routerLink]="'/details/artist/request/' + element.requestId">{{ 'Issues.Details' | translate}}</button> <button *ngIf="element.requestType === 2" mat-raised-button color="accent" [routerLink]="'/details/artist/request/' + element.providerId">{{ 'Issues.Details' | translate}}</button>
<!-- <button mat-raised-button color="warn" (click)="openOptions(element)" *ngIf="isAdmin"> {{ 'Requests.Options' | translate}}</button> --> <!-- <button mat-raised-button color="warn" (click)="openOptions(element)" *ngIf="isAdmin"> {{ 'Requests.Options' | translate}}</button> -->
</td> </td>
</ng-container> </ng-container>

@ -1,43 +1,44 @@
 <div *ngIf="background" @fadeInOut class="bg" [style.background-image]="background">
<div *ngIf="background" @fadeInOut class="bg" [style.background-image]="background"></div> </div>
<div class="small-middle-container"> <div class="small-middle-container">
<div *ngIf="form && customizationSettings && authenticationSettings"> <div *ngIf="form && customizationSettings && authenticationSettings">
<mat-card class="mat-elevation-z8 top-margin"> <mat-card class="mat-elevation-z8 top-margin">
<img mat-card-image src="{{baseUrl}}/images/logo.png"> <img mat-card-image *ngIf="!customizationSettings.logo" src="{{baseUrl}}/images/logo.png">
<mat-card-content *ngIf="!authenticationSettings.enableOAuth || loginWithOmbi"> <img mat-card-image *ngIf="customizationSettings.logo" [src]="customizationSettings.logo">
<form *ngIf="authenticationSettings" class="form-signin" novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)"> <mat-card-content *ngIf="!authenticationSettings.enableOAuth || loginWithOmbi">
<form *ngIf="authenticationSettings" class="form-signin" novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
<mat-form-field class="full-width"> <mat-form-field class="full-width">
<input type="text" matInput placeholder="{{'Login.UsernamePlaceholder' | translate}}" formControlName="username" /> <input type="text" matInput placeholder="{{'Login.UsernamePlaceholder' | translate}}" formControlName="username" />
<mat-error *ngIf="form.get('username').hasError('required')"> <mat-error *ngIf="form.get('username').hasError('required')">
{{'Login.UsernamePlaceholder' | translate}} is <strong>required</strong></mat-error> {{'Login.UsernamePlaceholder' | translate}} is <strong>required</strong></mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field class="full-width"> <mat-form-field class="full-width">
<input color="black" type="password" matInput placeholder="{{'Login.PasswordPlaceholder' | translate}}" formControlName="password" /> <input color="black" type="password" matInput placeholder="{{'Login.PasswordPlaceholder' | translate}}" formControlName="password" />
</mat-form-field> </mat-form-field>
<mat-checkbox formControlName="rememberMe">{{'Login.RememberMe' | translate}}</mat-checkbox> <mat-checkbox formControlName="rememberMe">{{'Login.RememberMe' | translate}}</mat-checkbox>
<button mat-raised-button color="accent" type="submit">{{'Login.SignInButton' | translate}}</button> <button mat-raised-button color="accent" type="submit">{{'Login.SignInButton' | translate}}</button>
<a [routerLink]="['/reset']" class="forgot-password col-md-12"> <a [routerLink]="['/reset']" class="forgot-password col-md-12">
<b [translate]="'Login.ForgottenPassword'"></b> <b [translate]="'Login.ForgottenPassword'"></b>
</a> </a>
</form> </form>
</mat-card-content> </mat-card-content>
<mat-card-content *ngIf="authenticationSettings.enableOAuth && !loginWithOmbi" class="login-buttons"> <mat-card-content *ngIf="authenticationSettings.enableOAuth && !loginWithOmbi" class="login-buttons">
<div > <div>
<button mat-raised-button color="primary" type="submit" (click)="loginWithOmbi = true">{{'Login.SignInWith' | translate:appNameTranslate}}</button> <button mat-raised-button color="primary" type="submit" (click)="loginWithOmbi = true">{{'Login.SignInWith' | translate:appNameTranslate}}</button>
<button mat-raised-button color="accent" type="button" (click)="oauth()">{{'Login.SignInWithPlex' | translate}}</button> <button mat-raised-button color="accent" type="button" (click)="oauth()">{{'Login.SignInWithPlex' | translate}}</button>
</div> </div>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</div> </div>
</div> </div>

@ -59,7 +59,7 @@
'MediaDetails.Denied' | translate }}</button> 'MediaDetails.Denied' | translate }}</button>
</span> </span>
<button *ngIf="(hasRequest && movieRequest) || movie.available" mat-raised-button class="btn-spacing" color="danger" (click)="issue()"> <button mat-raised-button class="btn-spacing" color="danger" (click)="issue()">
<i class="fa fa-exclamation"></i> {{ <i class="fa fa-exclamation"></i> {{
'Requests.ReportIssue' | translate }}</button> 'Requests.ReportIssue' | translate }}</button>
@ -109,8 +109,8 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="issuesPanel" *ngIf="movie.requestId"> <div class="issuesPanel">
<issues-panel [requestId]="movie.requestId" [isAdmin]="isAdmin"></issues-panel> <issues-panel [providerId]="movie.imdbId" [isAdmin]="isAdmin"></issues-panel>
</div> </div>
<mat-accordion class=" mat-elevation-z8 spacing-below "> <mat-accordion class=" mat-elevation-z8 spacing-below ">

@ -24,55 +24,55 @@ export class MovieDetailsComponent {
public showAdvanced: boolean; // Set on the UI public showAdvanced: boolean; // Set on the UI
private theMovidDbId: number; private theMovidDbId: number;
private imdbId: string;
constructor(private searchService: SearchV2Service, private route: ActivatedRoute, constructor(private searchService: SearchV2Service, private route: ActivatedRoute,
private sanitizer: DomSanitizer, private imageService: ImageService, private sanitizer: DomSanitizer, private imageService: ImageService,
public dialog: MatDialog, private requestService: RequestService, public dialog: MatDialog, private requestService: RequestService,
public messageService: MessageService, private auth: AuthService) { public messageService: MessageService, private auth: AuthService) {
this.route.params.subscribe((params: any) => { this.route.params.subscribe((params: any) => {
debugger;
if (typeof params.movieDbId === 'string' || params.movieDbId instanceof String) {
if (params.movieDbId.startsWith("tt")) {
this.imdbId = params.movieDbId;
}
}
this.theMovidDbId = params.movieDbId; this.theMovidDbId = params.movieDbId;
if (params.requestId) { this.load();
this.load(+params.requestId);
} else {
this.load(undefined);
}
}); });
} }
public async load(requestId: number|undefined) { public async load() {
this.isAdmin = this.auth.hasRole("admin") || this.auth.hasRole("poweruser"); this.isAdmin = this.auth.hasRole("admin") || this.auth.hasRole("poweruser");
if (requestId) { if (this.imdbId) {
var result = await this.searchService.getFullMovieDetailsByRequestId(requestId); this.searchService.getMovieByImdbId(this.imdbId).subscribe(async x => {
this.theMovidDbId = result.id this.movie = x;
if (this.movie.requestId > 0) {
this.movie = result; // Load up this request
if (this.movie.requestId > 0) { this.hasRequest = true;
// Load up this request this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
this.hasRequest = true; }
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId); this.imageService.getMovieBanner(this.theMovidDbId.toString()).subscribe(x => {
} this.movie.background = this.sanitizer.bypassSecurityTrustStyle
this.imageService.getMovieBanner(this.theMovidDbId.toString()).subscribe(x => { ("url(" + x + ")");
this.movie.background = this.sanitizer.bypassSecurityTrustStyle });
("url(" + x + ")");
}); });
} else { } else {
this.searchService.getFullMovieDetails(this.theMovidDbId).subscribe(async x => { this.searchService.getFullMovieDetails(this.theMovidDbId).subscribe(async x => {
this.movie = x; this.movie = x;
if (this.movie.requestId > 0) { if (this.movie.requestId > 0) {
// Load up this request // Load up this request
this.hasRequest = true; this.hasRequest = true;
this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId); this.movieRequest = await this.requestService.getMovieRequest(this.movie.requestId);
} }
this.imageService.getMovieBanner(this.theMovidDbId.toString()).subscribe(x => { this.imageService.getMovieBanner(this.theMovidDbId.toString()).subscribe(x => {
this.movie.background = this.sanitizer.bypassSecurityTrustStyle this.movie.background = this.sanitizer.bypassSecurityTrustStyle
("url(" + x + ")"); ("url(" + x + ")");
});
}); });
}); }
}
} }
public async request() { public async request() {
@ -109,7 +109,7 @@ export class MovieDetailsComponent {
public async issue() { public async issue() {
const dialogRef = this.dialog.open(NewIssueComponent, { const dialogRef = this.dialog.open(NewIssueComponent, {
width: '500px', width: '500px',
data: {requestId: this.movieRequest ? this.movieRequest.id : null, requestType: RequestType.movie, imdbid: this.movie.imdbId, title: this.movie.title} data: {requestId: this.movieRequest ? this.movieRequest.id : null, requestType: RequestType.movie, providerId: this.movie.imdbId ? this.movie.imdbId : this.movie.id, title: this.movie.title}
}); });
} }

@ -9,6 +9,6 @@ export interface IDenyDialogData {
export interface IIssueDialogData { export interface IIssueDialogData {
requestType: RequestType; requestType: RequestType;
requestId: number; requestId: number;
imdbId: string; providerId: string;
title: string; title: string;
} }

@ -10,7 +10,7 @@ import { TranslateService } from "@ngx-translate/core";
}) })
export class IssuesPanelComponent implements OnInit { export class IssuesPanelComponent implements OnInit {
@Input() public requestId: number; @Input() public providerId: string;
@Input() public isAdmin: boolean; @Input() public isAdmin: boolean;
public issuesCount: number; public issuesCount: number;
@ -26,7 +26,7 @@ export class IssuesPanelComponent implements OnInit {
} }
public async ngOnInit() { public async ngOnInit() {
this.issues = await this.issuesService.getIssuesByRequestId(this.requestId); this.issues = await this.issuesService.getIssuesByProviderId(this.providerId);
this.issuesCount = this.issues.length; this.issuesCount = this.issues.length;
this.calculateOutstanding(); this.calculateOutstanding();
this.settings = await this.settingsService.getIssueSettings().toPromise(); this.settings = await this.settingsService.getIssueSettings().toPromise();

@ -20,6 +20,7 @@ export class NewIssueComponent implements OnInit {
private issueService: IssuesService, private issueService: IssuesService,
public messageService: MessageService, public messageService: MessageService,
private translate: TranslateService) { private translate: TranslateService) {
debugger;
this.issue = { this.issue = {
subject: "", subject: "",
description: "", description: "",
@ -32,7 +33,7 @@ export class NewIssueComponent implements OnInit {
requestId: data.requestId, requestId: data.requestId,
requestType: data.requestType, requestType: data.requestType,
title: data.title, title: data.title,
providerId: data.imdbId, providerId: data.providerId,
userReported: undefined, userReported: undefined,
}; };
} }

@ -29,7 +29,7 @@
<button *ngIf="tv.partlyAvailable && !tv.fullyAvailable" mat-raised-button class="btn-spacing" color="accent" [disabled]> <button *ngIf="tv.partlyAvailable && !tv.fullyAvailable" mat-raised-button class="btn-spacing" color="accent" [disabled]>
<i class="fa fa-check"></i> {{'Common.PartiallyAvailable' | translate }}</button> <i class="fa fa-check"></i> {{'Common.PartiallyAvailable' | translate }}</button>
<button *ngIf="(tvRequest)" mat-raised-button class="btn-spacing" color="danger" (click)="issue()"> <button mat-raised-button class="btn-spacing" color="danger" (click)="issue()">
<i class="fa fa-exclamation"></i> {{ <i class="fa fa-exclamation"></i> {{
'Requests.ReportIssue' | translate }}</button> 'Requests.ReportIssue' | translate }}</button>
@ -77,7 +77,7 @@
<div class="col-12 col-md-10" *ngIf="tvRequest"> <div class="col-12 col-md-10" *ngIf="tvRequest">
<div class="issuesPanel"> <div class="issuesPanel">
<issues-panel [requestId]="tv.requestId" [isAdmin]="isAdmin"></issues-panel> <issues-panel [providerId]="tv.theTvDbId" [isAdmin]="isAdmin"></issues-panel>
</div> </div>
<mat-accordion> <mat-accordion>
<mat-expansion-panel> <mat-expansion-panel>

@ -23,7 +23,6 @@ export class TvDetailsComponent implements OnInit {
public isAdmin: boolean; public isAdmin: boolean;
private tvdbId: number; private tvdbId: number;
private requestIdFromQuery: number;
constructor(private searchService: SearchV2Service, private route: ActivatedRoute, constructor(private searchService: SearchV2Service, private route: ActivatedRoute,
private sanitizer: DomSanitizer, private imageService: ImageService, private sanitizer: DomSanitizer, private imageService: ImageService,
@ -32,7 +31,6 @@ export class TvDetailsComponent implements OnInit {
this.route.params.subscribe((params: any) => { this.route.params.subscribe((params: any) => {
this.tvdbId = params.tvdbId; this.tvdbId = params.tvdbId;
this.fromSearch = params.search; this.fromSearch = params.search;
this.requestIdFromQuery = +params.requestId; // Coming from the issues page
}); });
} }
@ -46,9 +44,6 @@ export class TvDetailsComponent implements OnInit {
if (this.fromSearch) { if (this.fromSearch) {
this.tv = await this.searchService.getTvInfoWithMovieDbId(this.tvdbId); this.tv = await this.searchService.getTvInfoWithMovieDbId(this.tvdbId);
this.tvdbId = this.tv.id; this.tvdbId = this.tv.id;
} else if (this.requestIdFromQuery) {
console.log("REQUESTID" + this.requestIdFromQuery)
this.tv = await this.searchService.getTvInfoWithRequestId(this.requestIdFromQuery);
} else { } else {
this.tv = await this.searchService.getTvInfo(this.tvdbId); this.tv = await this.searchService.getTvInfo(this.tvdbId);
} }
@ -68,7 +63,7 @@ export class TvDetailsComponent implements OnInit {
public async issue() { public async issue() {
const dialogRef = this.dialog.open(NewIssueComponent, { const dialogRef = this.dialog.open(NewIssueComponent, {
width: '500px', width: '500px',
data: {requestId: this.tvRequest ? this.tv.requestId : null, requestType: RequestType.tvShow, imdbid: this.tv.theTvDbId, title: this.tv.title} data: {requestId: this.tvRequest ? this.tv.requestId : null, requestType: RequestType.tvShow, providerId: this.tv.theTvDbId, title: this.tv.title}
}); });
} }

@ -12,16 +12,13 @@ import { PipeModule } from "../pipes/pipe.module";
import * as fromComponents from './components'; import * as fromComponents from './components';
import { AuthGuard } from "../auth/auth.guard"; import { AuthGuard } from "../auth/auth.guard";
import { RequestServiceV2 } from "../services/requestV2.service";
import { ArtistDetailsComponent } from "./components/artist/artist-details.component"; import { ArtistDetailsComponent } from "./components/artist/artist-details.component";
const routes: Routes = [ const routes: Routes = [
{ path: "movie/:movieDbId", component: MovieDetailsComponent, canActivate: [AuthGuard] }, { path: "movie/:movieDbId", component: MovieDetailsComponent, canActivate: [AuthGuard] },
{ path: "movie/request/:requestId", component: MovieDetailsComponent, canActivate: [AuthGuard] },
{ path: "tv/:tvdbId/:search", component: TvDetailsComponent, canActivate: [AuthGuard] }, { path: "tv/:tvdbId/:search", component: TvDetailsComponent, canActivate: [AuthGuard] },
{ path: "tv/:tvdbId", component: TvDetailsComponent, canActivate: [AuthGuard] }, { path: "tv/:tvdbId", component: TvDetailsComponent, canActivate: [AuthGuard] },
{ path: "show/request/:requestId", component: TvDetailsComponent, canActivate: [AuthGuard] },
{ path: "artist/:artistId", component: ArtistDetailsComponent, canActivate: [AuthGuard] }, { path: "artist/:artistId", component: ArtistDetailsComponent, canActivate: [AuthGuard] },
]; ];
@NgModule({ @NgModule({

@ -3,18 +3,29 @@
<mat-toolbar>{{applicationName}}</mat-toolbar> <mat-toolbar>{{applicationName}}</mat-toolbar>
<mat-nav-list> <mat-nav-list>
<span *ngFor="let nav of navItems"> <span *ngFor="let nav of navItems">
<a *ngIf="(nav.requiresAdmin && isAdmin || !nav.requiresAdmin) && nav.enabled" mat-list-item [routerLink]="nav.link"
[routerLinkActive]="getTheme()">
<mat-icon aria-label="Side nav toggle icon">{{nav.icon}}</mat-icon>
&nbsp;{{nav.name | translate}}
</a> </span>
<a id="bottom-nav-link" mat-list-item <div *ngIf="(nav.requiresAdmin && isAdmin || !nav.requiresAdmin) && nav.enabled">
[routerLinkActive]="getTheme()" aria-label="Toggle sidenav"
(click)="logOut();">
<mat-icon aria-label="Side nav toggle icon">exit_to_app</mat-icon>
{{ 'NavigationBar.Logout' | translate }} <a *ngIf="nav.donation" mat-list-item [href]="nav.link" target="_blank" matTooltip="{{nav.toolTipMessage | translate}}" matTooltipPosition="right" [routerLinkActive]="getTheme()">
</a>
<mat-icon aria-label="Side nav toggle icon" [style]="nav.style" >{{nav.icon}}</mat-icon>
&nbsp;{{nav.name | translate}}
</a>
<a *ngIf="!nav.donation" mat-list-item [routerLink]="nav.link" [style]="nav.color" [routerLinkActive]="getTheme()">
<mat-icon aria-label="Side nav toggle icon">{{nav.icon}}</mat-icon>
&nbsp;{{nav.name | translate}}
</a>
</div>
</span>
<a class="bottom-nav-link" mat-list-item [routerLinkActive]="getTheme()" aria-label="Toggle sidenav" (click)="logOut();">
<mat-icon aria-label="Side nav toggle icon">exit_to_app</mat-icon>
{{ 'NavigationBar.Logout' | translate }}
</a>
</mat-nav-list> </mat-nav-list>
@ -34,16 +45,16 @@
</span> </span>
</div> </div>
<div class="col-1"> <div class="col-1">
<div class="float-right"> <div class="float-right">
<a mat-list-item (click)="switchTheme()"> <a mat-list-item (click)="switchTheme()">
<mat-icon *ngIf="theme === 'dark'" aria-label="Side nav toggle icon">wb_incandescent</mat-icon> <mat-icon *ngIf="theme === 'dark'" aria-label="Side nav toggle icon">wb_incandescent</mat-icon>
<mat-icon *ngIf="theme === 'light'" aria-label="Side nav toggle icon">brightness_4</mat-icon> <mat-icon *ngIf="theme === 'light'" aria-label="Side nav toggle icon">brightness_4</mat-icon>
</a> </a>
</div> </div>
</div> </div>
</mat-toolbar> </mat-toolbar>
<!-- Page --> <!-- Page -->
<ng-container *ngTemplateOutlet="template"></ng-container> <ng-container *ngTemplateOutlet="template"></ng-container>

@ -47,6 +47,7 @@ export class MyNavComponent implements OnInit {
{ name: "NavigationBar.Issues", icon: "notification_important", link: "/issues", requiresAdmin: false, enabled: this.issuesEnabled }, { name: "NavigationBar.Issues", icon: "notification_important", link: "/issues", requiresAdmin: false, enabled: this.issuesEnabled },
{ name: "NavigationBar.UserManagement", icon: "account_circle", link: "/usermanagement", requiresAdmin: true, enabled: true }, { name: "NavigationBar.UserManagement", icon: "account_circle", link: "/usermanagement", requiresAdmin: true, enabled: true },
{ name: "NavigationBar.Calendar", icon: "calendar_today", link: "/calendar", requiresAdmin: false, enabled: true }, { name: "NavigationBar.Calendar", icon: "calendar_today", link: "/calendar", requiresAdmin: false, enabled: true },
{ name: "NavigationBar.Donate", icon: "attach_money", link: "https://www.paypal.me/PlexRequestsNet", donation: true, requiresAdmin: true, enabled: true, toolTip: true, style: "color:red;", toolTipMessage: 'NavigationBar.DonateTooltip' },
{ name: "NavigationBar.Settings", icon: "settings", link: "/Settings/About", requiresAdmin: true, enabled: true }, { name: "NavigationBar.Settings", icon: "settings", link: "/Settings/About", requiresAdmin: true, enabled: true },
{ name: "NavigationBar.UserPreferences", icon: "person", link: "/user-preferences", requiresAdmin: false, enabled: true }, { name: "NavigationBar.UserPreferences", icon: "person", link: "/user-preferences", requiresAdmin: false, enabled: true },
]; ];

@ -33,6 +33,10 @@ export class IssuesService extends ServiceHelpers {
return this.http.get<IIssues[]>(`${this.url}request/${requestId}`, {headers: this.headers}).toPromise(); return this.http.get<IIssues[]>(`${this.url}request/${requestId}`, {headers: this.headers}).toPromise();
} }
public getIssuesByProviderId(providerId: string): Promise<IIssues[]> {
return this.http.get<IIssues[]>(`${this.url}provider/${providerId}`, {headers: this.headers}).toPromise();
}
public getIssuesPage(take: number, skip: number, status: IssueStatus): Observable<IIssues[]> { public getIssuesPage(take: number, skip: number, status: IssueStatus): Observable<IIssues[]> {
return this.http.get<IIssues[]>(`${this.url}${take}/${skip}/${status}`, {headers: this.headers}); return this.http.get<IIssues[]>(`${this.url}${take}/${skip}/${status}`, {headers: this.headers});
} }

@ -23,6 +23,10 @@ export class SearchV2Service extends ServiceHelpers {
public getFullMovieDetails(theMovieDbId: number): Observable<ISearchMovieResultV2> { public getFullMovieDetails(theMovieDbId: number): Observable<ISearchMovieResultV2> {
return this.http.get<ISearchMovieResultV2>(`${this.url}/Movie/${theMovieDbId}`); return this.http.get<ISearchMovieResultV2>(`${this.url}/Movie/${theMovieDbId}`);
} }
public getMovieByImdbId(imdbId: string): Observable<ISearchMovieResultV2> {
return this.http.get<ISearchMovieResultV2>(`${this.url}/Movie/imdb/${imdbId}`);
}
public getFullMovieDetailsByRequestId(requestId: number): Promise<ISearchMovieResultV2> { public getFullMovieDetailsByRequestId(requestId: number): Promise<ISearchMovieResultV2> {
return this.http.get<ISearchMovieResultV2>(`${this.url}/Movie/request/${requestId}`).toPromise(); return this.http.get<ISearchMovieResultV2>(`${this.url}/Movie/request/${requestId}`).toPromise();

@ -178,6 +178,15 @@ namespace Ombi.Controllers.V1
.Include(x => x.UserReported).ToListAsync()); .Include(x => x.UserReported).ToListAsync());
} }
[HttpGet("provider/{id}")]
public async Task<IActionResult> GetIssueByProviderId([FromRoute] string id)
{
return new OkObjectResult(await _issues.GetAll().Where(x => x.ProviderId == id)
.Include(x => x.IssueCategory)
.Include(x => x.UserReported).ToListAsync());
}
/// <summary> /// <summary>
/// Get's all the issue comments by id /// Get's all the issue comments by id
/// </summary> /// </summary>

@ -1143,6 +1143,11 @@ namespace Ombi.Controllers.V1
// Make sure we do not display the newsletter // Make sure we do not display the newsletter
templates = templates.Where(x => x.NotificationType != NotificationType.Newsletter); templates = templates.Where(x => x.NotificationType != NotificationType.Newsletter);
} }
if (agent != NotificationAgent.Email)
{
templates = templates.Where(x => x.NotificationType != NotificationType.WelcomeEmail);
}
var tem = templates.ToList(); var tem = templates.ToList();
return tem.OrderBy(x => x.NotificationType.ToString()).ToList(); return tem.OrderBy(x => x.NotificationType.ToString()).ToList();
} }

@ -61,6 +61,12 @@ namespace Ombi.Controllers.V2
return await _movieEngineV2.GetFullMovieInformation(movieDbId, Request.HttpContext.RequestAborted); return await _movieEngineV2.GetFullMovieInformation(movieDbId, Request.HttpContext.RequestAborted);
} }
[HttpGet("movie/imdb/{imdbid}")]
public async Task<MovieFullInfoViewModel> GetMovieInfoByImdbId(string imdbId)
{
return await _movieEngineV2.GetMovieInfoByImdbId(imdbId, Request.HttpContext.RequestAborted);
}
/// <summary> /// <summary>
/// Returns details for a single movie /// Returns details for a single movie
/// </summary> /// </summary>
@ -354,7 +360,7 @@ namespace Ombi.Controllers.V2
return await _tvSearchEngine.Trending(currentPosition, amountToLoad); return await _tvSearchEngine.Trending(currentPosition, amountToLoad);
} }
/// <summary> /// <summary>
/// Returns all the movies that is by the actor id /// Returns all the movies that is by the actor id
/// </summary> /// </summary>
@ -365,7 +371,7 @@ namespace Ombi.Controllers.V2
[ProducesDefaultResponseType] [ProducesDefaultResponseType]
public async Task<ActorCredits> GetMoviesByActor(int actorId) public async Task<ActorCredits> GetMoviesByActor(int actorId)
{ {
return await _movieEngineV2.GetMoviesByActor(actorId, null); return await _movieEngineV2.GetMoviesByActor(actorId, null);
} }

Loading…
Cancel
Save