feat: watcher akislarini ve wscraper servis entegrasyonunu ekle

This commit is contained in:
2026-03-12 22:30:43 +03:00
parent 6507d13325
commit baad2b3e96
34 changed files with 2663 additions and 11 deletions

View File

@@ -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", {

View File

@@ -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;
}