diff --git a/dzunlock.user.js b/dzunlock.user.js index 74de154..7f159f9 100644 --- a/dzunlock.user.js +++ b/dzunlock.user.js @@ -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