Skip to content

aquamarine5/BetterListenCount

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BetterListenCount

wakatime

作者其他的BetterNCM插件

功能

  • 在专辑/歌单内摁下Ctrl+U会自动查询歌曲的首次播放时间,播放次数,总播放时长

实现

  • blc_listenCount():
const xhr = new XMLHttpRequest();
xhr.open("GET", `https://interface3.music.163.com/api/content/activity/music/first/listen/info?songId=${songId}`);
xhr.onreadystatechange = function () {
    if (xhr.readyState === 4) {
        if (xhr.status === 200) {
            try {
                const response = JSON.parse(xhr.responseText);
                onfinish(response);
            } catch (e) {
                console.error("Failed to parse response:", e);
            }
        } else {
            console.error("Request failed with status:", xhr.status);
        }
    }
}
xhr.send();

About

BetterNCM网易云插件 批量查询歌单内歌曲播放次数

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors