mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-10-08 11:39:01 +11:00
Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20668e69ef | ||
|
|
8d31a4e0ed | ||
|
|
ddd9257d73 | ||
|
|
893a1cca43 | ||
|
|
bee81013be | ||
|
|
15bf4355c2 | ||
|
|
84be4206fd | ||
|
|
1639ffb508 | ||
|
|
9fa954acd2 | ||
|
|
9d34465886 | ||
|
|
fd064f5492 | ||
|
|
1d19a68f58 | ||
|
|
f4cf592bf0 |
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 19 KiB |
@@ -15,7 +15,8 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Run Spotx
|
- name: Prepare checks
|
||||||
|
id: prepare
|
||||||
shell: powershell
|
shell: powershell
|
||||||
env:
|
env:
|
||||||
SPOTIFY_VERSION: ${{ inputs.version }}
|
SPOTIFY_VERSION: ${{ inputs.version }}
|
||||||
@@ -46,6 +47,7 @@ jobs:
|
|||||||
# Incoming parameters
|
# Incoming parameters
|
||||||
$parameters = @{
|
$parameters = @{
|
||||||
Verbose = $true
|
Verbose = $true
|
||||||
|
no_pause = $true
|
||||||
new_theme = $true
|
new_theme = $true
|
||||||
version = $spotifyVersion
|
version = $spotifyVersion
|
||||||
confirm_spoti_recomended_over = $true
|
confirm_spoti_recomended_over = $true
|
||||||
@@ -59,7 +61,66 @@ jobs:
|
|||||||
lyrics_block = $true
|
lyrics_block = $true
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run Spotx
|
|
||||||
$spotxUrl = "https://raw.githubusercontent.com/SpotX-Official/SpotX/refs/heads/main/run.ps1"
|
$spotxUrl = "https://raw.githubusercontent.com/SpotX-Official/SpotX/refs/heads/main/run.ps1"
|
||||||
$spotxScript = [scriptblock]::Create((Invoke-WebRequest -UseBasicParsing -Uri $spotxUrl).Content)
|
Invoke-WebRequest -UseBasicParsing -Uri $spotxUrl -OutFile "$env:RUNNER_TEMP\spotx.ps1"
|
||||||
|
$parameters | Export-Clixml -LiteralPath "$env:RUNNER_TEMP\spotx-parameters.xml"
|
||||||
|
|
||||||
|
- name: Run SpotX (x64)
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$parameters = Import-Clixml -LiteralPath "$env:RUNNER_TEMP\spotx-parameters.xml"
|
||||||
|
$spotxScript = [scriptblock]::Create((Get-Content -LiteralPath "$env:RUNNER_TEMP\spotx.ps1" -Raw -Encoding UTF8))
|
||||||
|
& $spotxScript @parameters
|
||||||
|
|
||||||
|
- name: Run SpotX (ARM64 files)
|
||||||
|
if: ${{ !cancelled() && steps.prepare.outcome == 'success' }}
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$parameters = Import-Clixml -LiteralPath "$env:RUNNER_TEMP\spotx-parameters.xml"
|
||||||
|
$checkVersion = $parameters.version
|
||||||
|
$installedSpotify = Join-Path $env:APPDATA 'Spotify\Spotify.exe'
|
||||||
|
if (Test-Path -LiteralPath $installedSpotify) {
|
||||||
|
$checkVersion = (Get-Item -LiteralPath $installedSpotify).VersionInfo.FileVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
$jsonUrl = 'https://raw.githubusercontent.com/LoaderSpot/table/refs/heads/main/table/versions.json'
|
||||||
|
$manifest = Invoke-RestMethod -Uri $jsonUrl
|
||||||
|
$entry = $manifest.PSObject.Properties | Where-Object {
|
||||||
|
$_.Name -eq $checkVersion -or $_.Value.fullversion -eq $checkVersion -or
|
||||||
|
($checkVersion -match '^\d+\.\d+\.\d+$' -and $_.Name.StartsWith("$checkVersion."))
|
||||||
|
} | Sort-Object { [version]$_.Name } -Descending | Select-Object -First 1
|
||||||
|
$installer = $entry.Value.win.arm64
|
||||||
|
if (-not $installer.url -or $installer.size -le 0) {
|
||||||
|
throw "No ARM64 installer found for Spotify $checkVersion"
|
||||||
|
}
|
||||||
|
if ($entry.Value.fullversion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]{8}$') {
|
||||||
|
throw "Invalid Spotify fullversion for $checkVersion"
|
||||||
|
}
|
||||||
|
|
||||||
|
$installerPath = Join-Path $env:RUNNER_TEMP 'SpotifySetup-arm64.exe'
|
||||||
|
Write-Host "ARM64 Spotify version: $($entry.Value.fullversion)"
|
||||||
|
Write-Host "Source: $($installer.url)"
|
||||||
|
for ($attempt = 1; $attempt -le 3; $attempt++) {
|
||||||
|
Write-Host "ARM64 installer download attempt $attempt/3"
|
||||||
|
curl.exe -q -L --fail-with-body --connect-timeout 15 --progress-bar -o $installerPath --url $installer.url
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
$downloadedSize = (Get-Item -LiteralPath $installerPath).Length
|
||||||
|
if ($downloadedSize -eq $installer.size) { break }
|
||||||
|
Write-Warning "ARM64 installer size mismatch: expected $($installer.size), got $downloadedSize"
|
||||||
|
}
|
||||||
|
if ($attempt -eq 3) { throw 'ARM64 installer download failed after 3 attempts' }
|
||||||
|
Start-Sleep -Seconds 5
|
||||||
|
}
|
||||||
|
|
||||||
|
$unpackerUrl = 'https://raw.githubusercontent.com/SpotX-Official/Spotify-EXE-Unpacker/refs/heads/main/spotify_exe_unpacker.py'
|
||||||
|
$unpackerPath = Join-Path $env:RUNNER_TEMP 'spotify_exe_unpacker.py'
|
||||||
|
Invoke-WebRequest -UseBasicParsing -Uri $unpackerUrl -OutFile $unpackerPath
|
||||||
|
|
||||||
|
$parameters.SpotifyPath = Join-Path $env:RUNNER_TEMP 'Spotify-arm64'
|
||||||
|
$parameters.version = $entry.Value.fullversion
|
||||||
|
$parameters.defender_exclusions_off = $true
|
||||||
|
python $unpackerPath $installerPath --output $parameters.SpotifyPath
|
||||||
|
if ($LASTEXITCODE -ne 0) { throw 'ARM64 installer extraction failed' }
|
||||||
|
|
||||||
|
$spotxScript = [scriptblock]::Create((Get-Content -LiteralPath "$env:RUNNER_TEMP\spotx.ps1" -Raw -Encoding UTF8))
|
||||||
& $spotxScript @parameters
|
& $spotxScript @parameters
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/SpotX-Official/SpotX/releases"><img src="https://spotx-official.github.io/images/logos/logo.png" /></a>
|
<a href="https://github.com/SpotX-Official/SpotX/releases"><img src=".github/Pic/logo.png" /></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
|||||||
@@ -4,7 +4,9 @@
|
|||||||
.Li269NgzkU2gI4KOP9sM,
|
.Li269NgzkU2gI4KOP9sM,
|
||||||
.I2WIloMMjsBeMaIS8H3v,
|
.I2WIloMMjsBeMaIS8H3v,
|
||||||
.McI3hD7aCfpq015LJa6X,
|
.McI3hD7aCfpq015LJa6X,
|
||||||
.gpDSOimnzH4zTJmE7UR5 {
|
.gpDSOimnzH4zTJmE7UR5,
|
||||||
|
.dh4zyndPBN0gul_w,
|
||||||
|
.zboE1ICtt8SJrJQEVHTf {
|
||||||
--lyrics-color-active: var(--current) !important;
|
--lyrics-color-active: var(--current) !important;
|
||||||
--lyrics-color-inactive: var(--next) !important;
|
--lyrics-color-inactive: var(--next) !important;
|
||||||
--lyrics-color-passed: var(--past) !important;
|
--lyrics-color-passed: var(--past) !important;
|
||||||
@@ -12,13 +14,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* title unsynced */
|
/* title unsynced */
|
||||||
p[class*="e-"][class*="-text"].encore-text-body-small {
|
[style*="--lyrics-color-active"] p[class*="e-"][class*="-text"].encore-text-body-small,
|
||||||
|
.ReC7DlF3I_k9g6Vv,
|
||||||
|
.WlotvRiQOV9Ps_vFbm14,
|
||||||
|
.main-view-container .FGdK_c0adS4IdZFuZd8Y,
|
||||||
|
.Zfb6QZfRV28Kz1RQ,
|
||||||
|
.b8IhQswrT49QTc5CuFif {
|
||||||
color: var(--musixmatch) !important;
|
color: var(--musixmatch) !important;
|
||||||
margin-bottom: 8px !important;
|
margin-bottom: 8px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fixed color of lyrics button */
|
/* fixed color of lyrics button */
|
||||||
[data-testid="lyrics-npv-section"]:not(._OhUGn8Plh3mRw4awIM5):not(.Sb2rC16jDkGc9eweOU8g):not(._YRfjT5prbRuSXcNK9WR):not(.RXRGSIFllAhUYWKYlANd) {
|
[data-testid="lyrics-npv-section"]:not(._OhUGn8Plh3mRw4awIM5):not(.Sb2rC16jDkGc9eweOU8g):not(._YRfjT5prbRuSXcNK9WR):not(.RXRGSIFllAhUYWKYlANd):not(.R28TH1mzH8k9Z3Ad):not(.oCWFPidreAoLBDsNRQuw) {
|
||||||
background-color:
|
background-color:
|
||||||
#1f1f1f !important;
|
#1f1f1f !important;
|
||||||
}
|
}
|
||||||
@@ -35,7 +42,10 @@ body .W_EplVEAbZrZURqfLiQC,
|
|||||||
body .kGR_hu4tdj9PnUlSPaRL,
|
body .kGR_hu4tdj9PnUlSPaRL,
|
||||||
.GML6YUVCeJvRhGznLnqm,
|
.GML6YUVCeJvRhGznLnqm,
|
||||||
body .iq4cgi0YEKr6DGaTtzUj,
|
body .iq4cgi0YEKr6DGaTtzUj,
|
||||||
body .KDhLFoEqoClhH12bsfrS {
|
body .KDhLFoEqoClhH12bsfrS,
|
||||||
|
.NUBq_wlyuwoDUsSg,
|
||||||
|
.upDNlpL8xEkxmKWWw9IF,
|
||||||
|
.main-view-container .LeoJGcLe14Es7fth7HG7 {
|
||||||
color: var(--musixmatch) !important;
|
color: var(--musixmatch) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +54,9 @@ body .KDhLFoEqoClhH12bsfrS {
|
|||||||
.T67LFP0PElpfkkLuegQt,
|
.T67LFP0PElpfkkLuegQt,
|
||||||
.e7eFLioNSG5PAi1qVFT4,
|
.e7eFLioNSG5PAi1qVFT4,
|
||||||
.l2060qoyWU4J9ihSxHLE,
|
.l2060qoyWU4J9ihSxHLE,
|
||||||
.hfTlyhd7WCIk9xmP {
|
.hfTlyhd7WCIk9xmP,
|
||||||
|
.bDlqrHmbHstExWu6T7Ms,
|
||||||
|
.main-view-container .lzSRPoTbAKaWG_T2CDlK {
|
||||||
color: var(--musixmatch) !important;
|
color: var(--musixmatch) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,16 +65,21 @@ body .KDhLFoEqoClhH12bsfrS {
|
|||||||
.tr8V5eHsUaIkOYVw7eSG,
|
.tr8V5eHsUaIkOYVw7eSG,
|
||||||
.hW9km7ku6_iggdWDR_Lg,
|
.hW9km7ku6_iggdWDR_Lg,
|
||||||
.lofIAg8Ixko3mfBrbfej,
|
.lofIAg8Ixko3mfBrbfej,
|
||||||
.bbJIIopLxggQmv5x {
|
.bbJIIopLxggQmv5x,
|
||||||
|
.bqldaBkacR41KxR2Z0jY,
|
||||||
|
.main-view-container .Pb9OM7BnosJTdj3KAIWE {
|
||||||
--lyrics-color-active: var(--current) !important;
|
--lyrics-color-active: var(--current) !important;
|
||||||
--lyrics-color-inactive: var(--next) !important;
|
--lyrics-color-inactive: var(--next) !important;
|
||||||
--lyrics-color-passed: var(--past) !important;
|
--lyrics-color-passed: var(--past) !important;
|
||||||
--lyrics-color-background: var(--background) !important;
|
--lyrics-color-background: var(--background) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fix previous lyrics for old versions */
|
/* previous lines */
|
||||||
.H2J92dVdr0ykdOX5azL1,
|
.H2J92dVdr0ykdOX5azL1,
|
||||||
.KnFq2ijXFdOtyl4Iebjv {
|
.KnFq2ijXFdOtyl4Iebjv,
|
||||||
|
.XiH9KR6bhDwEFykV,
|
||||||
|
.loNizikBbaCKyI9Gv8xg,
|
||||||
|
.main-view-container .zYNpVrsABjnrvr7ZSJTd {
|
||||||
color: var(--past) !important;
|
color: var(--past) !important;
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
}
|
}
|
||||||
@@ -76,7 +93,11 @@ body .KDhLFoEqoClhH12bsfrS {
|
|||||||
.PSyA4iign083ZV6vOqPj:hover,
|
.PSyA4iign083ZV6vOqPj:hover,
|
||||||
.Plu0zvuRv7kOQwsQ02cC:hover,
|
.Plu0zvuRv7kOQwsQ02cC:hover,
|
||||||
.Mnf9PkrVHsX90BNf:hover,
|
.Mnf9PkrVHsX90BNf:hover,
|
||||||
.XiH9KR6bhDwEFykV:hover {
|
.XiH9KR6bhDwEFykV:hover,
|
||||||
|
.MZZCOz_ImVH1skMtX3aI:hover,
|
||||||
|
.loNizikBbaCKyI9Gv8xg:hover,
|
||||||
|
.main-view-container .qrRT38O7gAArS1n8grcl:hover,
|
||||||
|
.main-view-container .zYNpVrsABjnrvr7ZSJTd:hover {
|
||||||
color: var(--hover) !important;
|
color: var(--hover) !important;
|
||||||
/* remove underline */
|
/* remove underline */
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
@@ -89,7 +110,10 @@ body .KDhLFoEqoClhH12bsfrS {
|
|||||||
.AEfhRyqGa3vzQrgfdwWE.Re403AJffPPuZmX7LRJj,
|
.AEfhRyqGa3vzQrgfdwWE.Re403AJffPPuZmX7LRJj,
|
||||||
.NHVfxGs2HwmI_fly2JC4.E64X_eoy6xsJmDdKKHja,
|
.NHVfxGs2HwmI_fly2JC4.E64X_eoy6xsJmDdKKHja,
|
||||||
.gaHIufRWhoWbiT8S6zuM.Qo3OkrSis5IWlP9Tchbr,
|
.gaHIufRWhoWbiT8S6zuM.Qo3OkrSis5IWlP9Tchbr,
|
||||||
.AEfhRyqGa3vzQrgfdwWE .Re403AJffPPuZmX7LRJj {
|
.AEfhRyqGa3vzQrgfdwWE .Re403AJffPPuZmX7LRJj,
|
||||||
|
.AQFBg9wNhDoKJHvS,
|
||||||
|
.aO2StTvteoZW3ixq2Fz4,
|
||||||
|
.main-view-container .jdk2I0q0Ac3yps7rqpMQ {
|
||||||
color: var(--next) !important;
|
color: var(--next) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,8 +156,14 @@ body .KDhLFoEqoClhH12bsfrS {
|
|||||||
/* read along podcasts */
|
/* read along podcasts */
|
||||||
.l6lFMYQteTVnTcHnLywc,
|
.l6lFMYQteTVnTcHnLywc,
|
||||||
._nDkCIVgkWayq3tqiIuW,
|
._nDkCIVgkWayq3tqiIuW,
|
||||||
.B_wut2Bw4HwLr3w8rNfM {
|
.B_wut2Bw4HwLr3w8rNfM,
|
||||||
|
.fhgdX2gD6kkUSiiX,
|
||||||
|
.ss3nDnn4UPsMVtFr,
|
||||||
|
.pvWgiS0R_7grz0VjKsSZ,
|
||||||
|
.qb9cvoyw3y6W2evemPij,
|
||||||
|
.MRV6jUuQgCXqrlnFuDBA,
|
||||||
|
.XzkBD72pfm2R6YsB2_6W {
|
||||||
--transcript-color-background: var(--background) !important;
|
--transcript-color-background: var(--background) !important;
|
||||||
--transcript-color-text: var(--next) !important;
|
--transcript-color-text: var(--next) !important;
|
||||||
--transcript-color-highlightText: var(--current) !important;
|
--transcript-color-highlightText: var(--current) !important;
|
||||||
}
|
}
|
||||||
|
|||||||
+98
-92
@@ -3,7 +3,7 @@
|
|||||||
window.oneTime = true;
|
window.oneTime = true;
|
||||||
|
|
||||||
const WORKER_BASE_URL = "https://spotify-ingest-admin.amd64fox1.workers.dev";
|
const WORKER_BASE_URL = "https://spotify-ingest-admin.amd64fox1.workers.dev";
|
||||||
const SCRIPT_VERSION = "1.2.1";
|
const SCRIPT_VERSION = "1.2.2";
|
||||||
|
|
||||||
const SOURCE_LABELS = {
|
const SOURCE_LABELS = {
|
||||||
REMOTE: "latest.json",
|
REMOTE: "latest.json",
|
||||||
@@ -113,14 +113,18 @@
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const parts = shortVersion.split(".");
|
if (typeof shortVersion !== "string" || !/^\d+\.\d+\.\d+\.\d+$/.test(shortVersion)) {
|
||||||
if (parts.length !== 4) {
|
|
||||||
console.warn(`Invalid Spotify version format (${sourceLabel}):`, shortVersion);
|
console.warn(`Invalid Spotify version format (${sourceLabel}):`, shortVersion);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const [major, minor, patch, build] = parts;
|
const [major, minor, patch, build] = shortVersion.split(".").map(Number);
|
||||||
return major + minor + patch + "0".repeat(Math.max(0, 7 - patch.length - build.length)) + build;
|
const appVersion = major * 100000000 + minor * 10000000 + patch * 100000 + build;
|
||||||
|
if (!Number.isSafeInteger(appVersion) || minor > 9 || patch > 99 || build > 99999) {
|
||||||
|
console.warn(`Unsupported Spotify version (${sourceLabel}):`, shortVersion);
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return String(appVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchJsonWithTimeout(url, timeoutMs) {
|
async function fetchJsonWithTimeout(url, timeoutMs) {
|
||||||
@@ -138,7 +142,7 @@
|
|||||||
throw new Error(`HTTP error: ${response.status}`);
|
throw new Error(`HTTP error: ${response.status}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.json();
|
return await response.json();
|
||||||
} finally {
|
} finally {
|
||||||
clearTimeout(timeoutId);
|
clearTimeout(timeoutId);
|
||||||
}
|
}
|
||||||
@@ -555,96 +559,98 @@
|
|||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
const timeoutId = setTimeout(() => controller.abort(), CONFIG.desktopUpdateTimeoutMs);
|
const timeoutId = setTimeout(() => controller.abort(), CONFIG.desktopUpdateTimeoutMs);
|
||||||
|
|
||||||
let response;
|
|
||||||
try {
|
try {
|
||||||
response = await originalFetch(CONFIG.updateUrl, {
|
let response;
|
||||||
method: "GET",
|
try {
|
||||||
headers: {
|
response = await originalFetch(CONFIG.updateUrl, {
|
||||||
Authorization: `Bearer ${token}`,
|
method: "GET",
|
||||||
"Spotify-App-Version": spotifyAppVersion,
|
headers: {
|
||||||
"App-Platform": platform.code
|
Authorization: `Bearer ${token}`,
|
||||||
},
|
"Spotify-App-Version": spotifyAppVersion,
|
||||||
signal: controller.signal
|
"App-Platform": platform.code
|
||||||
});
|
},
|
||||||
} catch (error) {
|
signal: controller.signal
|
||||||
return buildRequestErrorResult({
|
});
|
||||||
finalUrl: CONFIG.updateUrl,
|
} catch (error) {
|
||||||
status: null,
|
return buildRequestErrorResult({
|
||||||
headers: {},
|
finalUrl: CONFIG.updateUrl,
|
||||||
contentType: null,
|
status: null,
|
||||||
contentLength: null
|
headers: {},
|
||||||
}, formatDesktopUpdateError(platform, error));
|
contentType: null,
|
||||||
|
contentLength: null
|
||||||
|
}, formatDesktopUpdateError(platform, error));
|
||||||
|
}
|
||||||
|
|
||||||
|
const finalUrl = response.url || CONFIG.updateUrl;
|
||||||
|
const headers = readResponseHeaders(response.headers);
|
||||||
|
const contentType = response.headers?.get?.("content-type") || null;
|
||||||
|
const contentLength = response.headers?.get?.("content-length") || null;
|
||||||
|
|
||||||
|
if (!response.ok) {
|
||||||
|
return buildRequestErrorResult({
|
||||||
|
finalUrl,
|
||||||
|
status: response.status,
|
||||||
|
headers,
|
||||||
|
contentType,
|
||||||
|
contentLength
|
||||||
|
}, `${platform.code} HTTP error: ${response.status}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
let buffer;
|
||||||
|
try {
|
||||||
|
buffer = await response.arrayBuffer();
|
||||||
|
} catch (error) {
|
||||||
|
return buildRequestErrorResult({
|
||||||
|
finalUrl,
|
||||||
|
status: response.status,
|
||||||
|
headers,
|
||||||
|
contentType,
|
||||||
|
contentLength
|
||||||
|
}, formatDesktopUpdateError(platform, error));
|
||||||
|
}
|
||||||
|
|
||||||
|
const bodyLatin1 = decodeLatin1Buffer(buffer);
|
||||||
|
const extractedUpgradeLink = extractUpgradeLink(bodyLatin1);
|
||||||
|
const baseResult = {
|
||||||
|
finalUrl,
|
||||||
|
status: response.status,
|
||||||
|
headers,
|
||||||
|
contentType,
|
||||||
|
contentLength,
|
||||||
|
byteLength: buffer.byteLength,
|
||||||
|
bodyLatin1,
|
||||||
|
extractedUpgradeLink
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!extractedUpgradeLink) {
|
||||||
|
return {
|
||||||
|
outcome: "empty_response",
|
||||||
|
...baseResult,
|
||||||
|
parseErrorMessage: null,
|
||||||
|
errorMessage: null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const asset = parseUpgradeAsset(platform, extractedUpgradeLink);
|
||||||
|
return {
|
||||||
|
outcome: "success",
|
||||||
|
...baseResult,
|
||||||
|
parseErrorMessage: null,
|
||||||
|
errorMessage: null,
|
||||||
|
asset
|
||||||
|
};
|
||||||
|
} catch (error) {
|
||||||
|
return {
|
||||||
|
outcome: "parse_error",
|
||||||
|
...baseResult,
|
||||||
|
parseErrorMessage: error?.message || String(error),
|
||||||
|
errorMessage: null
|
||||||
|
};
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
clearTimeout(timeoutId);
|
clearTimeout(timeoutId);
|
||||||
}
|
}
|
||||||
|
|
||||||
const finalUrl = response.url || CONFIG.updateUrl;
|
|
||||||
const headers = readResponseHeaders(response.headers);
|
|
||||||
const contentType = response.headers?.get?.("content-type") || null;
|
|
||||||
const contentLength = response.headers?.get?.("content-length") || null;
|
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
return buildRequestErrorResult({
|
|
||||||
finalUrl,
|
|
||||||
status: response.status,
|
|
||||||
headers,
|
|
||||||
contentType,
|
|
||||||
contentLength
|
|
||||||
}, `${platform.code} HTTP error: ${response.status}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
let buffer;
|
|
||||||
try {
|
|
||||||
buffer = await response.arrayBuffer();
|
|
||||||
} catch (error) {
|
|
||||||
return buildRequestErrorResult({
|
|
||||||
finalUrl,
|
|
||||||
status: response.status,
|
|
||||||
headers,
|
|
||||||
contentType,
|
|
||||||
contentLength
|
|
||||||
}, formatDesktopUpdateError(platform, error));
|
|
||||||
}
|
|
||||||
|
|
||||||
const bodyLatin1 = decodeLatin1Buffer(buffer);
|
|
||||||
const extractedUpgradeLink = extractUpgradeLink(bodyLatin1);
|
|
||||||
const baseResult = {
|
|
||||||
finalUrl,
|
|
||||||
status: response.status,
|
|
||||||
headers,
|
|
||||||
contentType,
|
|
||||||
contentLength,
|
|
||||||
byteLength: buffer.byteLength,
|
|
||||||
bodyLatin1,
|
|
||||||
extractedUpgradeLink
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!extractedUpgradeLink) {
|
|
||||||
return {
|
|
||||||
outcome: "empty_response",
|
|
||||||
...baseResult,
|
|
||||||
parseErrorMessage: null,
|
|
||||||
errorMessage: null
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const asset = parseUpgradeAsset(platform, extractedUpgradeLink);
|
|
||||||
return {
|
|
||||||
outcome: "success",
|
|
||||||
...baseResult,
|
|
||||||
parseErrorMessage: null,
|
|
||||||
errorMessage: null,
|
|
||||||
asset
|
|
||||||
};
|
|
||||||
} catch (error) {
|
|
||||||
return {
|
|
||||||
outcome: "parse_error",
|
|
||||||
...baseResult,
|
|
||||||
parseErrorMessage: error?.message || String(error),
|
|
||||||
errorMessage: null
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildAttemptMetadata(attemptNumber, result) {
|
function buildAttemptMetadata(attemptNumber, result) {
|
||||||
|
|||||||
+50
-17
@@ -21,8 +21,8 @@
|
|||||||
"fr": "1.1.59",
|
"fr": "1.1.59",
|
||||||
"to": ""
|
"to": ""
|
||||||
},
|
},
|
||||||
"match": "adsEnabled:!0",
|
"match": "\\b(adsEnabled[:=])!0",
|
||||||
"replace": "adsEnabled:!1"
|
"replace": "$1!1"
|
||||||
},
|
},
|
||||||
"playlistsponsor": {
|
"playlistsponsor": {
|
||||||
"version": {
|
"version": {
|
||||||
@@ -874,7 +874,7 @@
|
|||||||
"description": "Use ads-owned NPV and cinema surface state for ad orchestration",
|
"description": "Use ads-owned NPV and cinema surface state for ad orchestration",
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.2.96",
|
"fr": "1.2.96",
|
||||||
"to": ""
|
"to": "1.3.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"HptoHarmonyVideoPlayer": {
|
"HptoHarmonyVideoPlayer": {
|
||||||
@@ -892,6 +892,39 @@
|
|||||||
"fr": "1.2.96",
|
"fr": "1.2.96",
|
||||||
"to": ""
|
"to": ""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"VideoAdTerminatedEvent": {
|
||||||
|
"name": "enableVideoAdTerminatedEvent",
|
||||||
|
"description": "Fire terminated events for non-complete video ad endings on desktop",
|
||||||
|
"version": {
|
||||||
|
"fr": "1.2.98",
|
||||||
|
"to": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"SponsoredPlaylistCacheAlignedRefresh": {
|
||||||
|
"name": "enableSponsoredPlaylistCacheAlignedRefresh",
|
||||||
|
"description": "Uses a 15-minute sponsored playlist refresh interval aligned with the service TTL",
|
||||||
|
"version": {
|
||||||
|
"fr": "1.2.98",
|
||||||
|
"to": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AdBreakTimeRemaining": {
|
||||||
|
"name": "showAdBreakTimeRemaining",
|
||||||
|
"description": "Show remaining ad-break time countdown in NPV and cinema-mode ad headers",
|
||||||
|
"version": {
|
||||||
|
"fr": "1.2.99",
|
||||||
|
"to": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"FocusStateAwareHptoFetch": {
|
||||||
|
"name": "enableFocusStateAwareHptoFetch",
|
||||||
|
"description": "Disable background HPTO fetch diagnostics",
|
||||||
|
"native_description": "Enable focus state guard when fetching HPTO ad",
|
||||||
|
"version": {
|
||||||
|
"fr": "1.3.3",
|
||||||
|
"to": ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"EnableExp": {
|
"EnableExp": {
|
||||||
@@ -1162,7 +1195,7 @@
|
|||||||
"native_description": "Enable Smart Shuffle",
|
"native_description": "Enable Smart Shuffle",
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.2.22",
|
"fr": "1.2.22",
|
||||||
"to": ""
|
"to": "1.2.96"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConcertsTicketPrice": {
|
"ConcertsTicketPrice": {
|
||||||
@@ -1216,7 +1249,7 @@
|
|||||||
"native_description": "Enable About Podcast section in NPV",
|
"native_description": "Enable About Podcast section in NPV",
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.2.20",
|
"fr": "1.2.20",
|
||||||
"to": ""
|
"to": "1.2.96"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"QueueOnRightPanel": {
|
"QueueOnRightPanel": {
|
||||||
@@ -1270,7 +1303,7 @@
|
|||||||
"native_description": "Enable list / compact mode in entity pages",
|
"native_description": "Enable list / compact mode in entity pages",
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.2.24",
|
"fr": "1.2.24",
|
||||||
"to": ""
|
"to": "1.2.99"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"UserTopContent": {
|
"UserTopContent": {
|
||||||
@@ -1585,7 +1618,7 @@
|
|||||||
"native_description": "Enable the support for Nearby Jams feature in the Device Picker",
|
"native_description": "Enable the support for Nearby Jams feature in the Device Picker",
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.2.52",
|
"fr": "1.2.52",
|
||||||
"to": ""
|
"to": "1.2.97"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"TrackBans": {
|
"TrackBans": {
|
||||||
@@ -1648,7 +1681,7 @@
|
|||||||
"native_description": "Enable the Peek NPV feature",
|
"native_description": "Enable the Peek NPV feature",
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.2.53",
|
"fr": "1.2.53",
|
||||||
"to": ""
|
"to": "1.2.96"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AlignedPanelHeaders": {
|
"AlignedPanelHeaders": {
|
||||||
@@ -1711,7 +1744,7 @@
|
|||||||
"native_description": "Enable canvas support inside improved cinema mode",
|
"native_description": "Enable canvas support inside improved cinema mode",
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.2.56",
|
"fr": "1.2.56",
|
||||||
"to": ""
|
"to": "1.2.96"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"YlxReverseSorting": {
|
"YlxReverseSorting": {
|
||||||
@@ -1810,7 +1843,7 @@
|
|||||||
"native_description": "Enable column reordering functionality in tracklists",
|
"native_description": "Enable column reordering functionality in tracklists",
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.2.69",
|
"fr": "1.2.69",
|
||||||
"to": ""
|
"to": "1.2.96"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ContextMenuShortcuts": {
|
"ContextMenuShortcuts": {
|
||||||
@@ -2046,7 +2079,7 @@
|
|||||||
"native_description": "Config for clearing the current leaderboard ad and hiding the leaderboard container when the ad slot returns an empty response",
|
"native_description": "Config for clearing the current leaderboard ad and hiding the leaderboard container when the ad slot returns an empty response",
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.2.94",
|
"fr": "1.2.94",
|
||||||
"to": ""
|
"to": "1.2.97"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"EntityHeaderNew": {
|
"EntityHeaderNew": {
|
||||||
@@ -2070,7 +2103,7 @@
|
|||||||
"native_description": "Enables the Canvas context menu toggle",
|
"native_description": "Enables the Canvas context menu toggle",
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.2.96",
|
"fr": "1.2.96",
|
||||||
"to": ""
|
"to": "1.3.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"MusicVideos": {
|
"MusicVideos": {
|
||||||
@@ -2690,28 +2723,28 @@
|
|||||||
"fr": "1.2.36",
|
"fr": "1.2.36",
|
||||||
"to": ""
|
"to": ""
|
||||||
},
|
},
|
||||||
"add": " .LVMjmN2CaPruPAo62RAY, .Wn4fEKCJ6jYPfG2Y0ABn, .Y3Kd8WKnE3ZW9lzgA8nN, .C_T1Uoz7Fws_AFDl { display: none !important }"
|
"add": " .LVMjmN2CaPruPAo62RAY, .Wn4fEKCJ6jYPfG2Y0ABn, .Y3Kd8WKnE3ZW9lzgA8nN, .C_T1Uoz7Fws_AFDl, .ap_ioWdVFWJkrRicJB8C { display: none !important }"
|
||||||
},
|
},
|
||||||
"downloadquality": {
|
"downloadquality": {
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.2.30",
|
"fr": "1.2.30",
|
||||||
"to": ""
|
"to": ""
|
||||||
},
|
},
|
||||||
"add": " :is(.weV_qxFz4gF5sPotO10y, .BMtRRwqaJD_95vJFMFD0, .eguwzH_QWTBXry7hiNj3, .qV_CxbowaNkMarye, .qV_CxbowaNkMarye):has([for=\"desktop.settings.downloadQuality\"]) {display: none}"
|
"add": " :is(.weV_qxFz4gF5sPotO10y, .BMtRRwqaJD_95vJFMFD0, .eguwzH_QWTBXry7hiNj3, .qV_CxbowaNkMarye, .Z6yfNoSJ6OjiEBGI5Osr, .H_Y7u72_U2ERiU8oYJeL):has([for=\"desktop.settings.downloadQuality\"]) {display: none}"
|
||||||
},
|
},
|
||||||
"downloadicon": {
|
"downloadicon": {
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.1.74",
|
"fr": "1.1.74",
|
||||||
"to": ""
|
"to": ""
|
||||||
},
|
},
|
||||||
"add": " .BKsbV2Xl786X9a09XROH, .GWCBhKJqeZal3n5tCQwl, .pX3IkLhEry0wVfiU {display:none}"
|
"add": " .BKsbV2Xl786X9a09XROH, .GWCBhKJqeZal3n5tCQwl, .pX3IkLhEry0wVfiU, .IOXdOZpz_OhQUj2M3A0e, .F9vJGD2_t3IUyzuoDzOb {display:none}"
|
||||||
},
|
},
|
||||||
"submenudownload": {
|
"submenudownload": {
|
||||||
"version": {
|
"version": {
|
||||||
"fr": "1.1.74",
|
"fr": "1.1.74",
|
||||||
"to": ""
|
"to": ""
|
||||||
},
|
},
|
||||||
"add": " .pzkhLqffqF_4hucrVVQA, .egE6UQjF_UUoCzvMxREj, .Y98_oiegQgSpY_o7hoKG, .tT_JypfxNakuY1jHgyBN, .zVA1h9TUy8QQBogj {display:none}"
|
"add": " :is(.pzkhLqffqF_4hucrVVQA, .egE6UQjF_UUoCzvMxREj, .Y98_oiegQgSpY_o7hoKG, .tT_JypfxNakuY1jHgyBN, .zVA1h9TUy8QQBogj, .l7XabbfpobRNm8SpemYx, .OS2FSGrMk4JcABLlGUmc, .OAz6EUvqC2CpvN61OoeA)[role=menuitemcheckbox] {display:none}"
|
||||||
},
|
},
|
||||||
"veryhighstream": {
|
"veryhighstream": {
|
||||||
"version": {
|
"version": {
|
||||||
@@ -2784,7 +2817,7 @@
|
|||||||
"fr": "1.1.70",
|
"fr": "1.1.70",
|
||||||
"to": ""
|
"to": ""
|
||||||
},
|
},
|
||||||
"match": "(ADS_PREMIUM,isPremium:).(.{20,60}?isHptoHidden:).",
|
"match": "(ADS_PREMIUM,isPremium:|\\.isPremium=)[\\w$]+(?:\\.payload)?(.{20,300}?isHptoHidden[:=])[\\w$]+(?:\\.payload)?",
|
||||||
"replace": "$1true$2true"
|
"replace": "$1true$2true"
|
||||||
},
|
},
|
||||||
"sentry": {
|
"sentry": {
|
||||||
|
|||||||
Reference in New Issue
Block a user