Skip to content
Rémy F edited this page Mar 5, 2020 · 12 revisions

DZR Environment Variables

In order to play a track, dzr will:

  • Fetch track information using one of the following methods:

    • DZR_API: If defined, use the (semi-)official API to get track info
    • DZR_SID: If defined, use your private user Session ID (how to get it)
    • DZR_LUT: If defined, dzr will use an external resolver to get track information (example)

    At least one of them need to be defined, otherwise dzr won't start.

  • Use this track information to find the track URL

    • To do that DZR_AES is necessary and dzr won't boot if this key is not specified (how to get it)
  • Fetch the track URL and decrypt it

    • To do that, the DZR_CBC key is necessary and dzr won't boot if this key is not specified (how to get it)

Diagram Version

DZR_SID

To get your Session ID, look at the network request panel of your browser debugger and you shall see a Set-Cookie line with sid=yoursidnumber

⚠️ This key is temporary and will expire, so don't forget to update it periodically.

DZR_AES

Used for URL Generation

[...key].map(e=>String.fromCharCode(e)).join('')

DZR_CBC

Used for track deciphering

Same method as the DZR_AES, but the CBC keys are split in 2 arrays that need to be reassembled using the following script

a=[97, ... 103]
b=[49, ... 52]
[].concat(...a.map((c,i)=>[a[i],b[i]]).reverse()).map(e=>String.fromCharCode(e)).join('')
Clone this wiki locally