mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
feat: Use actively maintained unblockNeteaseMusic (#1105)
* refactor: use @unblockneteasemusic/server we also use ipcMain.handle for unblock-music. * refactor(utils/nativeAlert): remove the deprecated "remote" * refactor(ipcMain): use our default sources * style(config/vue): prettier * feat(README): update for new UNM
This commit is contained in:
parent
0c6c89c7e0
commit
e9f45c5352
7 changed files with 335 additions and 380 deletions
|
|
@ -269,7 +269,7 @@ export default class {
|
|||
});
|
||||
}
|
||||
}
|
||||
_getAudioSourceFromUnblockMusic(track) {
|
||||
async _getAudioSourceFromUnblockMusic(track) {
|
||||
console.debug(`[debug][Player.js] _getAudioSourceFromUnblockMusic`);
|
||||
if (
|
||||
process.env.IS_ELECTRON !== true ||
|
||||
|
|
@ -277,7 +277,7 @@ export default class {
|
|||
) {
|
||||
return null;
|
||||
}
|
||||
const source = ipcRenderer.sendSync('unblock-music', track);
|
||||
const source = await ipcRenderer.invoke('unblock-music', track);
|
||||
if (store.state.settings.automaticallyCacheSongs && source?.url) {
|
||||
// TODO: 将unblockMusic字样换成真正的来源(比如酷我咪咕等)
|
||||
cacheTrackSource(track, source.url, 128000, 'unblockMusic');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue