fixed gapless playback
This commit is contained in:
parent
0ac770d844
commit
a21c19228b
|
@ -3,7 +3,7 @@
|
|||
// @namespace io.github.uhwot.dzunlock
|
||||
// @description enables deezer hifi features lol
|
||||
// @author uh wot
|
||||
// @version 1.3.7
|
||||
// @version 1.3.8
|
||||
// @license GPL-3.0-only
|
||||
// @homepageURL https://git.freezerapp.xyz/uhwot/dzunlock
|
||||
// @downloadURL https://git.freezerapp.xyz/uhwot/dzunlock/raw/branch/master/dzunlock.user.js
|
||||
|
@ -98,8 +98,14 @@ window.addEventListener('DOMContentLoaded', (_) => {
|
|||
unsafeWindow.fetch = (function (fetch) {
|
||||
return async function (url, init) {
|
||||
if (url === 'https://media.deezer.com/v1/get_url') {
|
||||
let track
|
||||
if (unsafeWindow.dzPlayer.getPosition() === 0) {
|
||||
track = unsafeWindow.dzPlayer.getCurrentSong()
|
||||
} else {
|
||||
track = unsafeWindow.dzPlayer.getNextSong() // gapless playback
|
||||
}
|
||||
|
||||
const quality = unsafeWindow.dzPlayer.control.getAudioQuality()
|
||||
const track = unsafeWindow.dzPlayer.getCurrentSong()
|
||||
const id = parseInt(track.SNG_ID)
|
||||
|
||||
let is_subbed = !unsafeWindow.dzPlayer.user_status.can_subscribe
|
||||
|
|
Loading…
Reference in New Issue