Add Mega-Debrid account info check (web scraping)

Scrapes the Mega-Debrid profile page to display username, premium status,
remaining days, and loyalty points. New "Account prüfen" button in Settings > Accounts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe
2026-03-03 14:06:19 +01:00
co-authored by Claude Opus 4.6
parent ac479bb023
commit e6ec1ed755
10 changed files with 113 additions and 2 deletions
+2 -1
View File
@@ -36,5 +36,6 @@ export const IPC_CHANNELS = {
EXTRACT_NOW: "queue:extract-now",
GET_HISTORY: "history:get",
CLEAR_HISTORY: "history:clear",
REMOVE_HISTORY_ENTRY: "history:remove-entry"
REMOVE_HISTORY_ENTRY: "history:remove-entry",
CHECK_ACCOUNT: "app:check-account"
} as const;
+2
View File
@@ -3,6 +3,7 @@ import type {
AppSettings,
DuplicatePolicy,
HistoryEntry,
ProviderAccountInfo,
SessionStats,
StartConflictEntry,
StartConflictResolutionResult,
@@ -48,6 +49,7 @@ export interface ElectronApi {
getHistory: () => Promise<HistoryEntry[]>;
clearHistory: () => Promise<void>;
removeHistoryEntry: (entryId: string) => Promise<void>;
checkAccount: (provider: string) => Promise<ProviderAccountInfo>;
onStateUpdate: (callback: (snapshot: UiSnapshot) => void) => () => void;
onClipboardDetected: (callback: (links: string[]) => void) => () => void;
onUpdateInstallProgress: (callback: (progress: UpdateInstallProgress) => void) => () => void;
+9
View File
@@ -269,6 +269,15 @@ export interface HistoryEntry {
outputDir: string;
}
export interface ProviderAccountInfo {
provider: DebridProvider;
username: string;
accountType: string;
daysRemaining: number | null;
loyaltyPoints: number | null;
error?: string;
}
export interface HistoryState {
entries: HistoryEntry[];
maxEntries: number;