netease-music-cache-decoder
netease-music-cache-decoder copied to clipboard
The decoder for netease music to convert cache file to origin mp3.
netease-music-cache-decoder
把网易云音乐本地缓存的文件解码为原始的 mp3 文件。支持网页端直接使用。
欢迎 STAR,欢迎 PR >.<
Install
npm i netease-music-cache-decoder
Methods
decode(buffer)
Inplace decode the input buffer.
Arguments
- buffer
{Buffer}: The buffer to be decoded.
Return
Will only return undefined since it's inplace decode.
decodeInfo(filename)
Get the meaningful name from cache file name. It will be something like "songName-artistName".
Arguments
- filename
{String}: Cache file name.
Return
Will return the meaningful name. Or the original filename if there's an error occurred.
decodeFile(target, opts)
Decode the target file.
Arguments
- target
{String}: The target file path. - opts:
- output
{String}: The output path. Default isundefinedwhich means no output file. - decodeInfo
{Boolean}: Whether to use the song info to form the output file name. Default isfalse.
- output
Return
Will return the decoded buffer.
TODO
- Add test case.