feat: watcher akislarini ve wscraper servis entegrasyonunu ekle
This commit is contained in:
@@ -6,6 +6,7 @@ import fs from "node:fs";
|
||||
import { config } from "../config"
|
||||
import { logger } from "../utils/logger"
|
||||
import {
|
||||
QbitCategory,
|
||||
QbitPeerList,
|
||||
QbitTorrentInfo,
|
||||
QbitTorrentProperties,
|
||||
@@ -96,6 +97,13 @@ export class QbitClient {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
async getCategories(): Promise<Record<string, QbitCategory>> {
|
||||
const response = await this.request(() =>
|
||||
this.client.get<Record<string, QbitCategory>>("/api/v2/torrents/categories")
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
async getTorrentProperties(hash: string): Promise<QbitTorrentProperties> {
|
||||
const response = await this.request(() =>
|
||||
this.client.get<QbitTorrentProperties>("/api/v2/torrents/properties", {
|
||||
|
||||
@@ -11,6 +11,8 @@ export interface QbitTorrentInfo {
|
||||
tags?: string;
|
||||
category?: string;
|
||||
tracker?: string;
|
||||
num_seeds?: number;
|
||||
num_leechs?: number;
|
||||
added_on?: number;
|
||||
seeding_time?: number;
|
||||
uploaded?: number;
|
||||
@@ -51,3 +53,8 @@ export interface QbitCapabilities {
|
||||
hasPeersEndpoint: boolean;
|
||||
hasBanEndpoint: boolean;
|
||||
}
|
||||
|
||||
export interface QbitCategory {
|
||||
name?: string;
|
||||
savePath?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user