feat(mpris): Add xesam:url field (#2095)

chore: do not use fuo scheme, only netease music id is preserved

fix: lint prettier error
This commit is contained in:
poly000 2023-08-07 23:31:38 +08:00 committed by GitHub
parent e14e6d73c6
commit f4d3d67132
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -35,6 +35,7 @@ export function createMpris(window) {
'xesam:title': metadata.title, 'xesam:title': metadata.title,
'xesam:album': metadata.album, 'xesam:album': metadata.album,
'xesam:artist': metadata.artist.split(','), 'xesam:artist': metadata.artist.split(','),
'xesam:url': metadata.url,
}; };
}); });

View file

@ -615,6 +615,7 @@ export default class {
], ],
length: this.currentTrackDuration, length: this.currentTrackDuration,
trackId: this.current, trackId: this.current,
url: '/trackid/' + track.id,
}; };
navigator.mediaSession.metadata = new window.MediaMetadata(metadata); navigator.mediaSession.metadata = new window.MediaMetadata(metadata);