@exezt-/webamp 1.5.0-0x702 → 1.5.0-0x703

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14807,6 +14807,7 @@ class webamp_telegram_handler_WinampTelegramCustomHandler {
14807
14807
  x.open('get', `https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${link}`, true);
14808
14808
  x.setRequestHeader('Accept', 'application/json');
14809
14809
  x.setRequestHeader('Content-Type', 'application/json');
14810
+ x.setRequestHeader('Authorization', 'OAuth 0dc7925ebcf047a1b001c07d6bd5ac49');
14810
14811
  x.send();
14811
14812
 
14812
14813
  x.onload = async () => {
@@ -14821,9 +14822,12 @@ class webamp_telegram_handler_WinampTelegramCustomHandler {
14821
14822
  if (item.size > 0x1400000) {
14822
14823
  console.info(`File ${item.name} can't be loaded due oversize`);
14823
14824
  } else {
14824
- await fetch(`${item.file}&public_key=${item.public_key}`).then(response => response).then(resp => fetch(resp.url)).then(async response => {
14825
+ await fetch(`${item.file}&public_key=${item.public_key}`, {
14826
+ method: "GET",
14827
+ headers: [["Authorization", "OAuth 0dc7925ebcf047a1b001c07d6bd5ac49"]]
14828
+ }).then(response => response).then(resp => fetch(resp.url)).then(async response => {
14825
14829
  if (response.status === 302) {
14826
- return await fetch(response.headers.get("Location"), {
14830
+ return await fetch(`${response.headers.get("Location")}&public_key=${item.public_key}`, {
14827
14831
  headers: [["Authorization", "OAuth 0dc7925ebcf047a1b001c07d6bd5ac49"]]
14828
14832
  });
14829
14833
  } else {