MCPcopy
hub / github.com/SPlayer-Dev/SPlayer / DownloadStrategy

Interface DownloadStrategy

src/core/resource/DownloadManager.ts:33–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33interface DownloadStrategy {
34 readonly id: number;
35 readonly name: string;
36 readonly song: SongType;
37 readonly downloadUrl: string;
38
39 // 准备阶段:获取链接,获取歌词,处理元数据
40 prepare(): Promise<void>;
41
42 // 执行阶段:返回给 Electron 下载器需要的配置对象
43 getDownloadConfig(): DownloadConfig;
44
45 // 收尾阶段:处理 ASS 生成,歌词文件写入
46 postProcess(downloadedFilePath: string): Promise<void>;
47}
48
49/**
50 * 歌曲下载策略

Callers 10

getMethod · 0.65
putMethod · 0.65
removeMethod · 0.65
clearMethod · 0.65
listMethod · 0.65
getSizeMethod · 0.65
getTotalSizeMethod · 0.65
getAnalysisMethod · 0.65
startTaskMethod · 0.65
startTaskMethod · 0.65

Implementers 1

SongDownloadStrategysrc/core/resource/DownloadManager.ts

Calls

no outgoing calls

Tested by

no test coverage detected