UNPKG

andrade-soulseek-downloader

Version:

Simple, safe Soulseek download library with built-in rate limiting to prevent bans

31 lines 1.24 kB
import { Track } from '../entities'; /** * Repository interface for track operations. * Port in hexagonal architecture - defines contract for infrastructure adapters. */ export interface ITrackRepository { /** * Searches for tracks matching criteria. * @param artist - Artist name to search * @param title - Track title to search * @param minBitrate - Minimum bitrate in kbps * @param maxBitrate - Maximum bitrate in kbps (optional) * @param timeout - Search timeout in milliseconds (optional) * @returns Array of matching tracks */ search(artist: string, title: string, minBitrate: number, maxBitrate?: number, timeout?: number): Promise<Track[]>; /** * Downloads a track to local filesystem. * @param track - Track to download * @param destinationPath - Where to save the file * @returns File path if successful, null if failed */ download(track: Track, destinationPath: string): Promise<string | null>; /** * Checks if file exists at given path. * @param destinationPath - Path to check * @returns True if file exists */ exists(destinationPath: string): Promise<boolean>; } //# sourceMappingURL=i-track-repository.d.ts.map