change CDNs to edgecast

This commit is contained in:
uh wot 2024-04-08 16:07:18 +02:00
parent 9952b33e08
commit 8f35b6db60
Signed by: uhwot
GPG Key ID: CB2454984587B781
2 changed files with 3 additions and 3 deletions

View File

@ -324,7 +324,7 @@ async function track(env, id, format, tagging, range_header, user_agent) {
} }
if (json.ALB_PICTURE !== '') { if (json.ALB_PICTURE !== '') {
const url = `https://cdns-images.dzcdn.net/images/cover/${json.ALB_PICTURE}/1000x1000-000000-80-0-0.jpg` const url = `https://e-cdns-images.dzcdn.net/images/cover/${json.ALB_PICTURE}/1000x1000-000000-80-0-0.jpg`
const cover = await fetch(url) const cover = await fetch(url)
const coverBuffer = await cover.arrayBuffer() const coverBuffer = await cover.arrayBuffer()
@ -536,4 +536,4 @@ export default {
.handle(req, env, ctx) .handle(req, env, ctx)
.then(jsonResp) .then(jsonResp)
.catch(error), // catch errors .catch(error), // catch errors
} }

View File

@ -62,5 +62,5 @@ pub fn legacy_stream_url(md5_origin: &str, format: &str, id: &str, media_version
let cipher = Aes128Enc::new_from_slice(&TRACK_CDN_KEY).unwrap(); let cipher = Aes128Enc::new_from_slice(&TRACK_CDN_KEY).unwrap();
let ciphertext = cipher.encrypt_padded_vec::<ZeroPadding>(&metadata_hash); let ciphertext = cipher.encrypt_padded_vec::<ZeroPadding>(&metadata_hash);
format!("https://cdns-proxy-{}.dzcdn.net/mobile/1/{}", md5_origin.chars().next().unwrap(), hex::encode(ciphertext)) format!("https://e-cdns-proxy-{}.dzcdn.net/mobile/1/{}", md5_origin.chars().next().unwrap(), hex::encode(ciphertext))
} }