[M] Move type
This commit is contained in:
+1
-9
@@ -2,6 +2,7 @@ import * as ne from '@neteasecloudmusicapienhanced/api';
|
|||||||
import * as fs from 'fs/promises';
|
import * as fs from 'fs/promises';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { aiParseLyrics } from './lyricsParse';
|
import { aiParseLyrics } from './lyricsParse';
|
||||||
|
import type { NeteaseSongBrief } from './types';
|
||||||
|
|
||||||
// Filesystem structure:
|
// Filesystem structure:
|
||||||
// $data/playlists/{playlistId}/detail.json
|
// $data/playlists/{playlistId}/detail.json
|
||||||
@@ -63,15 +64,6 @@ export const getSongMeta = cached(
|
|||||||
return detail.body.songs[0]
|
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 => ({
|
export const parseBrief = (songData: any): NeteaseSongBrief => ({
|
||||||
id: songData.id,
|
id: songData.id,
|
||||||
name: songData.name,
|
name: songData.name,
|
||||||
|
|||||||
@@ -10,6 +10,15 @@ export interface Song {
|
|||||||
lyrics: LyricLine[]
|
lyrics: LyricLine[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface NeteaseSongBrief {
|
||||||
|
id: number
|
||||||
|
name: string
|
||||||
|
album: string
|
||||||
|
albumId: number
|
||||||
|
albumPic: string
|
||||||
|
artists: { id: number, name: string }[]
|
||||||
|
}
|
||||||
|
|
||||||
export interface ProcessedLyricLine {
|
export interface ProcessedLyricLine {
|
||||||
jp: LyricSegment[]
|
jp: LyricSegment[]
|
||||||
kanji: string
|
kanji: string
|
||||||
|
|||||||
Reference in New Issue
Block a user