把网易云音乐本地缓存的文件解码为原始的 mp3 文件。支持网页端直接使用。
欢迎 STAR,欢迎 PR >.<
npm i netease-music-cache-decoder
decode(buffer)
Inplace decode the input buffer.
{Buffer}
: The buffer to be decoded.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".
{String}
: Cache file name.Will return the meaningful name. Or the original filename if there's an error occurred.
decodeFile(target, opts)
Decode the target file.
{String}
: The target file path.{String}
: The output path. Default is undefined
which means no output file.{Boolean}
: Whether to use the song info to form the output file name. Default is false
.Will return the decoded buffer.