mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
Merge branch 'develop' of https://github.com/ombi-app/Ombi into develop
This commit is contained in:
commit
e2ed651487
9 changed files with 122 additions and 30 deletions
|
@ -1,39 +1,122 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Mime;
|
||||
|
||||
namespace Ombi.Api.Radarr.Models
|
||||
{
|
||||
{
|
||||
public class MovieResponse
|
||||
{
|
||||
public string title { get; set; }
|
||||
public string originalTitle { get; set; }
|
||||
public Alternatetitle[] alternateTitles { get; set; }
|
||||
public int secondaryYearSourceId { get; set; }
|
||||
public string sortTitle { get; set; }
|
||||
public double sizeOnDisk { get; set; }
|
||||
public long sizeOnDisk { get; set; }
|
||||
public string status { get; set; }
|
||||
public string overview { get; set; }
|
||||
public string inCinemas { get; set; }
|
||||
public string physicalRelease { get; set; }
|
||||
public List<Image> images { get; set; }
|
||||
public DateTime inCinemas { get; set; }
|
||||
public DateTime physicalRelease { get; set; }
|
||||
public DateTime digitalRelease { get; set; }
|
||||
public Image[] images { get; set; }
|
||||
public string website { get; set; }
|
||||
public bool downloaded { get; set; }
|
||||
public int year { get; set; }
|
||||
public bool hasFile { get; set; }
|
||||
public string youTubeTrailerId { get; set; }
|
||||
public string studio { get; set; }
|
||||
public string path { get; set; }
|
||||
public int profileId { get; set; }
|
||||
public string minimumAvailability { get; set; }
|
||||
public int qualityProfileId { get; set; }
|
||||
public bool monitored { get; set; }
|
||||
public string minimumAvailability { get; set; }
|
||||
public bool isAvailable { get; set; }
|
||||
public string folderName { get; set; }
|
||||
public int runtime { get; set; }
|
||||
public string lastInfoSync { get; set; }
|
||||
public string cleanTitle { get; set; }
|
||||
public string imdbId { get; set; }
|
||||
public int tmdbId { get; set; }
|
||||
public string titleSlug { get; set; }
|
||||
public List<string> genres { get; set; }
|
||||
public List<object> tags { get; set; }
|
||||
public string added { get; set; }
|
||||
public string certification { get; set; }
|
||||
public string[] genres { get; set; }
|
||||
public object[] tags { get; set; }
|
||||
public DateTime added { get; set; }
|
||||
public Ratings ratings { get; set; }
|
||||
//public List<string> alternativeTitles { get; set; }
|
||||
public int qualityProfileId { get; set; }
|
||||
public Moviefile movieFile { get; set; }
|
||||
public Collection collection { get; set; }
|
||||
public int id { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class Moviefile
|
||||
{
|
||||
public int movieId { get; set; }
|
||||
public string relativePath { get; set; }
|
||||
public string path { get; set; }
|
||||
public long size { get; set; }
|
||||
public DateTime dateAdded { get; set; }
|
||||
public string sceneName { get; set; }
|
||||
public int indexerFlags { get; set; }
|
||||
public V3.Quality quality { get; set; }
|
||||
public Mediainfo mediaInfo { get; set; }
|
||||
public string originalFilePath { get; set; }
|
||||
public bool qualityCutoffNotMet { get; set; }
|
||||
public Language[] languages { get; set; }
|
||||
public string releaseGroup { get; set; }
|
||||
public string edition { get; set; }
|
||||
public int id { get; set; }
|
||||
}
|
||||
|
||||
public class Revision
|
||||
{
|
||||
public int version { get; set; }
|
||||
public int real { get; set; }
|
||||
public bool isRepack { get; set; }
|
||||
}
|
||||
|
||||
public class Mediainfo
|
||||
{
|
||||
public string audioAdditionalFeatures { get; set; }
|
||||
public int audioBitrate { get; set; }
|
||||
public float audioChannels { get; set; }
|
||||
public string audioCodec { get; set; }
|
||||
public string audioLanguages { get; set; }
|
||||
public int audioStreamCount { get; set; }
|
||||
public int videoBitDepth { get; set; }
|
||||
public int videoBitrate { get; set; }
|
||||
public string videoCodec { get; set; }
|
||||
public float videoFps { get; set; }
|
||||
public string resolution { get; set; }
|
||||
public string runTime { get; set; }
|
||||
public string scanType { get; set; }
|
||||
public string subtitles { get; set; }
|
||||
}
|
||||
|
||||
public class Language
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
}
|
||||
|
||||
public class Collection
|
||||
{
|
||||
public string name { get; set; }
|
||||
public int tmdbId { get; set; }
|
||||
public object[] images { get; set; }
|
||||
}
|
||||
|
||||
public class Alternatetitle
|
||||
{
|
||||
public string sourceType { get; set; }
|
||||
public int movieId { get; set; }
|
||||
public string title { get; set; }
|
||||
public int sourceId { get; set; }
|
||||
public int votes { get; set; }
|
||||
public int voteCount { get; set; }
|
||||
public Language1 language { get; set; }
|
||||
public int id { get; set; }
|
||||
}
|
||||
|
||||
public class Language1
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
}
|
||||
}
|
|
@ -28,5 +28,6 @@ namespace Ombi.Api.Radarr.Models
|
|||
public string titleSlug { get; set; }
|
||||
public int year { get; set; }
|
||||
public string minimumAvailability { get; set; }
|
||||
public long sizeOnDisk { get; set; }
|
||||
}
|
||||
}
|
|
@ -82,7 +82,8 @@ namespace Ombi.Api.Radarr
|
|||
titleSlug = title + year,
|
||||
monitored = true,
|
||||
year = year,
|
||||
minimumAvailability = minimumAvailability
|
||||
minimumAvailability = minimumAvailability,
|
||||
sizeOnDisk = 0
|
||||
};
|
||||
|
||||
if (searchNow)
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace Ombi.Api.Radarr
|
|||
|
||||
public async Task<MovieResponse> UpdateMovie(MovieResponse movie, string apiKey, string baseUrl)
|
||||
{
|
||||
var request = new Request($"/api/v3/movie/", baseUrl, HttpMethod.Put);
|
||||
var request = new Request($"/api/v3/movie/{movie.id}", baseUrl, HttpMethod.Put);
|
||||
AddHeaders(request, apiKey);
|
||||
request.AddJsonBody(movie);
|
||||
|
||||
|
@ -85,7 +85,8 @@ namespace Ombi.Api.Radarr
|
|||
titleSlug = title + year,
|
||||
monitored = true,
|
||||
year = year,
|
||||
minimumAvailability = minimumAvailability
|
||||
minimumAvailability = minimumAvailability,
|
||||
sizeOnDisk = 0
|
||||
};
|
||||
|
||||
if (searchNow)
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
<mat-toolbar class="application-name" id="nav-applicationName">{{applicationName}}</mat-toolbar>
|
||||
|
||||
<mat-nav-list>
|
||||
<span *ngFor="let nav of navItems">
|
||||
<span mat-list-item *ngFor="let nav of navItems">
|
||||
|
||||
<div class="menu-spacing" *ngIf="(nav.requiresAdmin && isAdmin || !nav.requiresAdmin) && nav.enabled">
|
||||
<div class="menu-spacing mat-ripple" mat-ripple *ngIf="(nav.requiresAdmin && isAdmin || !nav.requiresAdmin) && nav.enabled">
|
||||
|
||||
|
||||
<a id="{{nav.id}}" *ngIf="nav.externalLink" mat-list-item [href]="nav.link" target="_blank"
|
||||
<a [disableRipple]="true" mat-list-item id="{{nav.id}}" *ngIf="nav.externalLink" [href]="nav.link" target="_blank"
|
||||
matTooltip="{{nav.toolTipMessage | translate}}" matTooltipPosition="right"
|
||||
[routerLinkActive]="'active-list-item'">
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
style="padding-left: 5px; padding-right: 5px;" aria-hidden="true"></i>
|
||||
{{nav.name | translate}}
|
||||
</a>
|
||||
<a id="{{nav.id}}" *ngIf="!nav.externalLink" mat-list-item [routerLink]="nav.link" [style]="nav.color"
|
||||
<a [disableRipple]="true" mat-list-item id="{{nav.id}}" *ngIf="!nav.externalLink" [routerLink]="nav.link" [style]="nav.color"
|
||||
[routerLinkActive]="'active-list-item'">
|
||||
|
||||
<i class="fa-lg {{nav.icon}} icon-spacing"></i>
|
||||
|
@ -28,7 +28,7 @@
|
|||
</div>
|
||||
</span>
|
||||
|
||||
<a class="menu-spacing" id="nav-logout" mat-list-item [routerLinkActive]="'active-list-item'"
|
||||
<a mat-list-item [disableRipple]="true" class="menu-spacing" id="nav-logout" [routerLinkActive]="'active-list-item'"
|
||||
aria-label="Toggle sidenav" (click)="logOut();">
|
||||
<i class="fa-lg fas fa-sign-out-alt icon-spacing"></i>
|
||||
{{ 'NavigationBar.Logout' | translate }}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<form [formGroup]='searchForm'>
|
||||
<mat-form-field floatLabel="never" style="width: 100%;">
|
||||
<input id="nav-search" matInput placeholder="{{'NavigationBar.Search' | translate}}" formControlName='input'>
|
||||
<input id="nav-search" autofocus="autofocus" matInput placeholder="{{'NavigationBar.Search' | translate}}" formControlName='input'>
|
||||
</mat-form-field>
|
||||
</form>
|
||||
</form>
|
||||
|
|
|
@ -43,7 +43,7 @@ export class RadarrComponent implements OnInit {
|
|||
addOnly: [x.addOnly],
|
||||
minimumAvailability: [x.minimumAvailability, [Validators.required]],
|
||||
scanForAvailability: [x.scanForAvailability],
|
||||
v3: [x.v3]
|
||||
v3: [x.v3 ?? true]
|
||||
});
|
||||
|
||||
if (x.defaultQualityProfile) {
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<div class="col-12">
|
||||
<a href='https://apps.apple.com/us/app/ombi/id1335260043' target="_blank"><img
|
||||
style="margin-left:13px" width="170px" alt='Get it from the App Store'
|
||||
src='../../../images/appstore.svg' /></a>
|
||||
src='{{baseUrl}}/images/appstore.svg' /></a>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<button style="margin-left:13px; margin-top: 20px;" mat-raised-button color="accent" type="button" (click)="openMobileApp($event)">Open Mobile App</button>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Component, OnInit } from "@angular/core";
|
||||
import { Component, Inject, OnInit } from "@angular/core";
|
||||
import { AuthService } from "../../../auth/auth.service";
|
||||
import { TranslateService } from "@ngx-translate/core";
|
||||
import { AvailableLanguages, ILanguage } from "./user-preference.constants";
|
||||
|
@ -6,6 +6,7 @@ import { IdentityService, NotificationService, SettingsService, ValidationServic
|
|||
import { ICustomizationSettings, IUser, UserType } from "../../../interfaces";
|
||||
import { Md5 } from "ts-md5";
|
||||
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
|
||||
import { APP_BASE_HREF } from "@angular/common";
|
||||
|
||||
@Component({
|
||||
templateUrl: "./user-preference.component.html",
|
||||
|
@ -22,6 +23,7 @@ export class UserPreferenceComponent implements OnInit {
|
|||
public selectedCountry: string;
|
||||
public customizationSettings: ICustomizationSettings;
|
||||
public UserType = UserType;
|
||||
public baseUrl: string;
|
||||
|
||||
public passwordForm: FormGroup;
|
||||
|
||||
|
@ -33,9 +35,13 @@ export class UserPreferenceComponent implements OnInit {
|
|||
private readonly identityService: IdentityService,
|
||||
private readonly settingsService: SettingsService,
|
||||
private readonly fb: FormBuilder,
|
||||
private readonly validationService: ValidationService) { }
|
||||
private readonly validationService: ValidationService,
|
||||
@Inject(APP_BASE_HREF) public internalBaseUrl: string) { }
|
||||
|
||||
public async ngOnInit() {
|
||||
if (this.internalBaseUrl.length > 1) {
|
||||
this.baseUrl = this.internalBaseUrl;
|
||||
}
|
||||
const user = this.authService.claims();
|
||||
if (user.name) {
|
||||
this.username = user.name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue