mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-27 03:05:10 +02:00
feat: add proto file for grpc api in shared/ with generated types
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
import {
|
||||
PaginatedResponse,
|
||||
PaginationParams,
|
||||
} from '@aleksilassila/reiverr-shared';
|
||||
} from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
|
||||
export const PickAndPartial = <T, K extends keyof T>(
|
||||
clazz: Type<T>,
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
Subtitles,
|
||||
AudioTrack,
|
||||
VideoOptions,
|
||||
} from '@aleksilassila/reiverr-shared';
|
||||
} from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
/*
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
MediaPluginSettings,
|
||||
MediaPluginSettingsResponseDto,
|
||||
mediaPluginVersion,
|
||||
} from '@aleksilassila/reiverr-shared';
|
||||
} from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import { Inject, Injectable, Logger } from '@nestjs/common';
|
||||
import { ClientProxy } from '@nestjs/microservices';
|
||||
import { firstValueFrom, lastValueFrom } from 'rxjs';
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
ProfileCondition,
|
||||
SubtitleProfile,
|
||||
TranscodingProfile,
|
||||
} from '@aleksilassila/reiverr-shared';
|
||||
} from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
|
||||
export class DirectPlayProfileDto implements DirectPlayProfile {
|
||||
@ApiProperty({
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
StreamResponse,
|
||||
Subtitles,
|
||||
ValidationResponse,
|
||||
} from '@aleksilassila/reiverr-shared';
|
||||
} from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import {
|
||||
ApiProperty,
|
||||
ApiPropertyOptional,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ReiverrPlugin } from '@aleksilassila/reiverr-shared';
|
||||
import { ReiverrPlugin } from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
getReiverrPluginVersion,
|
||||
ReiverrPlugin,
|
||||
} from '@aleksilassila/reiverr-shared';
|
||||
} from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type ViewBase } from '@aleksilassila/reiverr-shared';
|
||||
import { type ViewBase } from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
enum ViewType {
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
SortableProperty,
|
||||
StreamActionElement,
|
||||
MediaSourceProvider,
|
||||
} from '@aleksilassila/reiverr-shared';
|
||||
} from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import { ViewBaseDto } from 'src/source-providers/ui.dto';
|
||||
|
||||
class CatalogueOrderDirectionOption implements DirectionOption {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { SourceProviderSettings } from '@aleksilassila/reiverr-shared';
|
||||
import { SourceProviderSettings } from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import { User } from 'src/users/user.entity';
|
||||
import {
|
||||
Column,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SourceProviderError } from '@aleksilassila/reiverr-shared';
|
||||
import { SourceProviderError } from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import {
|
||||
All,
|
||||
BadRequestException,
|
||||
@@ -59,9 +59,8 @@ export class ServiceOwnershipValidator implements CanActivate {
|
||||
|
||||
if (!sourceId) return true;
|
||||
|
||||
const mediaSource = await this.mediaSourcesService.findMediaSource(
|
||||
sourceId,
|
||||
);
|
||||
const mediaSource =
|
||||
await this.mediaSourcesService.findMediaSource(sourceId);
|
||||
|
||||
if (!mediaSource) throw new NotFoundException('Source not found');
|
||||
|
||||
@@ -110,9 +109,8 @@ export class MediaSourcesController {
|
||||
|
||||
const providers = await Promise.all(
|
||||
user.mediaSources.map(async (ms) => {
|
||||
const mediaSourceDto = await this.mediaSourcesService.getMediaSourceDto(
|
||||
ms,
|
||||
);
|
||||
const mediaSourceDto =
|
||||
await this.mediaSourcesService.getMediaSourceDto(ms);
|
||||
|
||||
const connection = await this.getConnection({
|
||||
sourceId: ms.id,
|
||||
@@ -425,9 +423,8 @@ export class MediaSourcesController {
|
||||
@GetAuthToken() token: string,
|
||||
) {
|
||||
const sourceId = params.sourceId;
|
||||
const mediaSource = await this.mediaSourcesService.findMediaSource(
|
||||
sourceId,
|
||||
);
|
||||
const mediaSource =
|
||||
await this.mediaSourcesService.findMediaSource(sourceId);
|
||||
|
||||
if (!mediaSource) throw new NotFoundException('Source not found');
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
CatalogueProvider,
|
||||
MediaSourceProvider,
|
||||
ValidationResponse,
|
||||
} from '@aleksilassila/reiverr-shared';
|
||||
} from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { SourceProvidersService } from 'src/source-providers/source-providers.service';
|
||||
import { User } from 'src/users/user.entity';
|
||||
|
||||
Reference in New Issue
Block a user