mioku-plugin-music 3.0.3 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -0
- package/config.md +13 -1
- package/config.ts +1 -0
- package/dumps/factory.ts +78 -0
- package/dumps/file-source.ts +279 -0
- package/dumps/ncmdump.ts +22 -0
- package/dumps/types.ts +18 -0
- package/index.ts +56 -7
- package/package.json +6 -4
- package/runtime-core/audio-file.ts +67 -0
- package/runtime-core/auto-install.ts +54 -0
- package/runtime-core/dump-flow.ts +72 -0
- package/runtime-core/message.ts +83 -120
- package/runtime-core/optional-service.ts +14 -0
- package/runtime-core/service.ts +102 -8
- package/skills/music.ts +1 -1
- package/types.ts +5 -0
package/skills/music.ts
CHANGED
|
@@ -101,7 +101,7 @@ export function createMusicSkills(runtime: MusicPluginRuntime): AISkill[] {
|
|
|
101
101
|
|
|
102
102
|
try {
|
|
103
103
|
if (songId) {
|
|
104
|
-
await runtime.sendSongById(ctx, event, songId,
|
|
104
|
+
await runtime.sendSongById(ctx, event, songId, {
|
|
105
105
|
forceFile: asFile,
|
|
106
106
|
});
|
|
107
107
|
return asFile ? "已发送歌曲源文件" : "已发送歌曲";
|
package/types.ts
CHANGED
|
@@ -2,11 +2,16 @@ export type MusicProviderName = "applemusic" | "netease";
|
|
|
2
2
|
|
|
3
3
|
export const MUSIC_PROVIDER_NAMES: MusicProviderName[] = ["applemusic", "netease"];
|
|
4
4
|
|
|
5
|
+
export type DumpProviderName = "ncmdump";
|
|
6
|
+
|
|
7
|
+
export const DUMP_PROVIDER_NAMES: DumpProviderName[] = ["ncmdump"];
|
|
8
|
+
|
|
5
9
|
export type MusicProviderQuality = "standard" | "exhigh" | "lossless" | "hires";
|
|
6
10
|
|
|
7
11
|
export interface MusicBaseConfig {
|
|
8
12
|
searchLimit: number;
|
|
9
13
|
defaultProvider?: MusicProviderName | string;
|
|
14
|
+
dumpProvider?: DumpProviderName | string;
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
export interface MusicTrack {
|