This commit is contained in:
lyswhut
2023-02-01 12:50:52 +08:00
parent ba3b2f613a
commit 6075f413dc
50 changed files with 74 additions and 70 deletions
+2 -2
View File
@@ -3,8 +3,8 @@ import path from 'path'
import { EventEmitter } from 'events'
import { performance } from 'perf_hooks'
import { STATUS } from './util'
import http from 'http'
import { request, Options as RequestOptions } from './request'
import type http from 'http'
import { request, type Options as RequestOptions } from './request'
export interface Options {
forceResume: boolean
+2 -2
View File
@@ -1,7 +1,7 @@
import Downloader, { Options as DownloaderOptions } from './Downloader'
import Downloader, { type Options as DownloaderOptions } from './Downloader'
import { getRequestAgent } from './util'
import { sizeFormate } from '@common/utils'
import http from 'http'
import type http from 'http'
// these are the default options
// const options = {
+1 -1
View File
@@ -120,7 +120,7 @@ export const fixNewMusicInfoQuality = (musicInfo: LX.Music.MusicInfo) => {
}
export const filterMusicList = <T extends LX.Music.MusicInfo>(list: T[]): T[] => {
const ids: Set<string> = new Set()
const ids = new Set<string>()
return list.filter(s => {
if (!s.id || ids.has(s.id) || !s.name) return false
if (s.singer == null) s.singer = ''
+3 -3
View File
@@ -14,9 +14,9 @@ import {
shallowRef,
unref,
markRaw,
ComputedRef,
Ref,
ShallowRef,
type ComputedRef,
type Ref,
type ShallowRef,
defineProps,
defineEmits,
defineComponent,