mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-27 11:05:13 +02:00
feat: add proto file for grpc api in shared/ with generated types
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
SourceProviderSettingsTemplate,
|
||||
UserContext,
|
||||
ValidationResponse,
|
||||
} from '@aleksilassila/reiverr-shared';
|
||||
} from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import { testConnection } from './lib/jackett.api';
|
||||
import { TorrentMediaSourceProvider } from './media-source-provider';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import axios, { AxiosError } from 'axios';
|
||||
import { XMLParser } from 'fast-xml-parser';
|
||||
import { StreamCandidate } from '@aleksilassila/reiverr-shared';
|
||||
import { StreamCandidate } from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import { TorrentSettings } from '../types';
|
||||
import { formatSize, formatBitrate, EPISODE_SEPARATOR } from '../utils';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
Subtitles,
|
||||
UserContext,
|
||||
ViewBase,
|
||||
} from '@aleksilassila/reiverr-shared';
|
||||
} from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
import {
|
||||
getEpisodeTorrents,
|
||||
getMovieTorrents,
|
||||
@@ -274,9 +274,9 @@ export class TorrentMediaSourceProvider extends MediaSourceProvider {
|
||||
throw new Error('Torrent not found');
|
||||
}
|
||||
|
||||
let src = `${this.proxyUrl}/magnet?link=${encodeURIComponent(link)}&reiverr_token=${
|
||||
this.token
|
||||
}`;
|
||||
let src = `${this.proxyUrl}/magnet?link=${encodeURIComponent(
|
||||
link,
|
||||
)}&reiverr_token=${this.token}`;
|
||||
|
||||
if (season && episode) {
|
||||
src += `&season=${season}&episode=${episode}`;
|
||||
@@ -288,11 +288,12 @@ export class TorrentMediaSourceProvider extends MediaSourceProvider {
|
||||
.filter((f) => subtitleExtensions.some((ext) => f.name.endsWith(ext)))
|
||||
.map((f) => ({
|
||||
kind: 'subtitles',
|
||||
src: `${this.proxyUrl}/magnet?link=${encodeURIComponent(link)}&reiverr_token=${
|
||||
this.token
|
||||
}&file=${f.name}`,
|
||||
src: `${this.proxyUrl}/magnet?link=${encodeURIComponent(
|
||||
link,
|
||||
)}&reiverr_token=${this.token}&file=${f.name}`,
|
||||
label: f.name,
|
||||
lang: 'unknown',
|
||||
default: false,
|
||||
}));
|
||||
|
||||
const stream = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SourceProviderSettings } from '@aleksilassila/reiverr-shared';
|
||||
import type { SourceProviderSettings } from '@aleksilassila/reiverr-shared/dist/src/old';
|
||||
|
||||
export interface TorrentSettings extends SourceProviderSettings {
|
||||
apiKey: string;
|
||||
|
||||
Reference in New Issue
Block a user