mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
chore(servers): remove quick/full scan buttons from server cards (#843)
Drops the Quick/Full scan actions and all supporting logic — they are no longer needed. Removes the ServerScanActions component (incl. the unused compact variant), the subsonicScan API, the scanStore, and the app-root useScanPolling hook (no more background scan polling). Cleans up the .server-scan-* CSS and the settings.scan i18n block across all 9 locales. 440 deletions, no new code; tsc + bundle clean.
This commit is contained in:
committed by
GitHub
parent
f9f96f024f
commit
1a7a2a0bfc
@@ -1,23 +0,0 @@
|
||||
import { apiForServer } from './subsonicClient';
|
||||
|
||||
export interface ScanStatus {
|
||||
scanning: boolean;
|
||||
count: number;
|
||||
folderCount?: number;
|
||||
lastScan?: string;
|
||||
}
|
||||
|
||||
export async function startScan(serverId: string, fullScan: boolean): Promise<void> {
|
||||
await apiForServer(serverId, 'startScan.view', fullScan ? { fullScan: 'true' } : {}, 10000);
|
||||
}
|
||||
|
||||
export async function getScanStatus(serverId: string): Promise<ScanStatus> {
|
||||
const data = await apiForServer<{ scanStatus?: ScanStatus }>(serverId, 'getScanStatus.view', {}, 8000);
|
||||
const s = data.scanStatus;
|
||||
return {
|
||||
scanning: !!s?.scanning,
|
||||
count: typeof s?.count === 'number' ? s.count : 0,
|
||||
folderCount: typeof s?.folderCount === 'number' ? s.folderCount : undefined,
|
||||
lastScan: typeof s?.lastScan === 'string' ? s.lastScan : undefined,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user