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