diff --git a/src/shared/songs.ts b/src/shared/songs.ts index b527a79..88cde90 100644 --- a/src/shared/songs.ts +++ b/src/shared/songs.ts @@ -2,6 +2,7 @@ import * as ne from '@neteasecloudmusicapienhanced/api'; import * as fs from 'fs/promises'; import * as path from 'path'; import { aiParseLyrics } from './lyricsParse'; +import type { NeteaseSongBrief } from './types'; // Filesystem structure: // $data/playlists/{playlistId}/detail.json @@ -63,15 +64,6 @@ export const getSongMeta = cached( return detail.body.songs[0] }) -export interface NeteaseSongBrief { - id: number - name: string - album: string - albumId: number - albumPic: string - artists: { id: number, name: string }[] -} - export const parseBrief = (songData: any): NeteaseSongBrief => ({ id: songData.id, name: songData.name, diff --git a/src/shared/types.ts b/src/shared/types.ts index 9d52d2b..08dd9a8 100644 --- a/src/shared/types.ts +++ b/src/shared/types.ts @@ -10,6 +10,15 @@ export interface Song { lyrics: LyricLine[] } +export interface NeteaseSongBrief { + id: number + name: string + album: string + albumId: number + albumPic: string + artists: { id: number, name: string }[] +} + export interface ProcessedLyricLine { jp: LyricSegment[] kanji: string