Skip to content

Commit

Permalink
chore: remove mp3-duration
Browse files Browse the repository at this point in the history
  • Loading branch information
Linkontoask committed Dec 30, 2020
1 parent 9e3bfe2 commit 123c8a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@
"lint-staged": "^9.5.0",
"lodash": "^4.17.20",
"md5": "^2.3.0",
"mp3-duration": "^1.1.0",
"music-metadata": "^7.5.2",
"prettier": "^1.19.1",
"react-is": "^16.13.1",
Expand Down
9 changes: 0 additions & 9 deletions src/electron/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { shell } from 'electron'
import { statSync } from 'fs'
import { syncToAsync } from '@/utils/index'
import { SongsDetail } from '@/interface'
import mp3Duration from 'mp3-duration'
import { readdirSync } from 'fs'
import { ICommonTagsResult } from 'music-metadata/lib/type.d'
import { join } from 'path'
Expand Down Expand Up @@ -58,14 +57,6 @@ export const openExplorer = (path: string) => {
shell.openExternal(path)
}

export const getDuration = (path: string): Promise<number> => {
return syncToAsync<number>(resolve => {
mp3Duration(path, (error: unknown, duration: number) => {
resolve(duration)
})
})
}

export const getMp3Tags = async (
path: string,
file: string
Expand Down

0 comments on commit 123c8a7

Please sign in to comment.