From 79182ddf7c80c17d7883368fd40d1c6a7a243989 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Mon, 17 Nov 2025 22:21:57 +0800 Subject: [PATCH] [M] Move type --- src/shared/songs.ts | 10 +--------- src/shared/types.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) 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