fixed url gen on user-upped tracks
This commit is contained in:
parent
30153cfb8a
commit
ada8193533
File diff suppressed because one or more lines are too long
2
index.js
2
index.js
|
@ -207,7 +207,7 @@ function track_url(json, format, url_func) {
|
|||
|
||||
format = format_string_to_num[format]
|
||||
|
||||
return url_func(md5_origin, format, id, media_version)
|
||||
return url_func(md5_origin, format, id.toString(), media_version)
|
||||
}
|
||||
|
||||
async function m3u8(type, id, format, access_token, tagging) {
|
||||
|
|
|
@ -39,14 +39,14 @@ impl Cipher {
|
|||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn stream_url(md5_origin: &str, format: &str, id: i32, media_version: u8) -> String {
|
||||
pub fn stream_url(md5_origin: &str, format: &str, id: &str, media_version: u8) -> String {
|
||||
// md5 origin + format num + id + media version
|
||||
let metadata = [
|
||||
md5_origin.as_bytes(),
|
||||
&[b'\xa4'],
|
||||
format.as_bytes(),
|
||||
&[b'\xa4'],
|
||||
id.to_string().as_bytes(),
|
||||
id.as_bytes(),
|
||||
&[b'\xa4'],
|
||||
media_version.to_string().as_bytes(),
|
||||
].concat();
|
||||
|
|
Loading…
Reference in New Issue