Skip to content

Commit

Permalink
Update to Spotify 1.1.90
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiuth committed Jul 21, 2022
1 parent 038bd16 commit 7637de3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
} else {
$ver = $Env:GITHUB_SHA.Substring(0, 8) + "-pre";
}
git bundle create ./build/Release/Source.git_bundle HEAD
Rename-Item -Path ./build/Release -NewName Soggfy-$ver
7z a "-xr!*.lib" "-xr!*.exp" "-xr!*.pdb" build/Soggfy-$ver.zip ./build/Soggfy-$ver
Expand Down
15 changes: 0 additions & 15 deletions SpotifyOggDumper/Data/BlockSpotifyUpdates.bat

This file was deleted.

4 changes: 2 additions & 2 deletions SpotifyOggDumper/Data/Install.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$SpotifyInstallerUrl = "https://upgrade.scdn.co/upgrade/client/win32-x86/spotify_installer-1.1.87.612.gf8d110e2-19.exe"
$SpotifyVersion = "1.1.87.612"
$SpotifyInstallerUrl = "https://upgrade.scdn.co/upgrade/client/win32-x86/spotify_installer-1.1.90.855.ga73cc2ce-7.exe"
$SpotifyVersion = "1.1.90.855"
$BtsUrl = "https://github.com/mrpond/BlockTheSpot/releases/download/2021.10.29.44/chrome_elf.zip"

function InstallSpotify
Expand Down
4 changes: 2 additions & 2 deletions SpotifyOggDumper/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ DETOUR_FUNC(__fastcall, void, CloseTrack, (

void InstallHooks()
{
//Signatures for Spotify v1.1.84.716-??
//Signatures for Spotify v1.1.87+
CREATE_HOOK_PATTERN(DecodeAudioData, "Spotify.exe", "55 8B EC 8B 11 56 8B 75 10 57 8B 7D 0C FF 75 14 8B 47 04 89 45 0C 8B 46 04 89 45 10 8D 45 10 50 FF 36 8D 45 0C 50 FF 37 FF 75 08 FF 52 04 8B 55 0C 8B CA 29 57 04 8B 45 08 C1 E1 02 01 0F 8B 4D 10 01 0E 29 4E 04 5F 5E 5D C2 10 00");
CREATE_HOOK_PATTERN(CreateTrackPlayer, "Spotify.exe", "68 9C 00 00 00 B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 8D 60 FF FF FF 8B 45 18 33 DB 8B 7D 08 8B 75 0C F2 0F 10 45 10 89 85 6C FF FF FF 8B 45 1C 89 85 70 FF FF FF 8B 45 20 89 85 74 FF FF FF 8B 45 24 89 BD 68 FF FF FF 89 85 68 FF FF FF 8B 45 28 89 85 78 FF FF FF 8D 46 08 6A 10 50 8D 45 CC F2 0F 11 85 58 FF FF FF 50 89 9D 64 FF FF FF");
CREATE_HOOK_PATTERN(SeekTrack, "Spotify.exe", "55 8B EC 83 EC 38 A1 ?? ?? ?? ?? 33 C5 89 45 FC 56 8B F1 8B 8E 40 17 00 00 85 C9 75 04 32 C0 EB 5D 8B 01 8D 55 EC 52 8B 80 8C 00 00 00 FF D0 6A 10 50 8D 45 C8 50");
CREATE_HOOK_PATTERN(OpenTrack, "Spotify.exe", "68 ?? ?? ?? ?? B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B F1 89 B5 B0 FE FF FF 8B 45 08 33 FF 89 85 88 FE FF FF 8B 45 10 89 85 7C FE FF FF 8A 45 1C 88 85 9B FE FF FF 89 BD B8 FE FF FF 89 BD B4 FE FF FF 8B 4D 0C 8D 55 B8 21 7D FC FF 86 ?? ?? 00 00 52 8B 01 8B 80 8C 00 00 00 FF D0 6A 10 50 8D 45 8C 50");
CREATE_HOOK_PATTERN(CloseTrack, "Spotify.exe", "6A 50 B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B F9 83 AF EC 17 00 00 01 8A 45 18 8B 55 0C 8B 5D 08 8B 75 10 89 55 AC 88 45 BB 74 11 6A 01 8B CB E8 ?? ?? ?? ?? 6A 02 58 E9 19 03 00 00 8B 8F 40 17 00 00 8D 55 E0 52 8B 01 FF 90 8C 00 00 00 6A 10 50 8D 45 BC 50");
CREATE_HOOK_PATTERN(CloseTrack, "Spotify.exe", "6A ?? B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B F9 83 AF EC 17 00 00 01 8A 45 18 8B 55 0C 8B 5D 08 8B 75 10 89 55 AC 88 45 BB 74 11 6A 01 8B CB E8 ?? ?? ?? ?? 6A 02 58 E9 ?? 0? 00 00 8B 8F 40 17 00 00 8D 55 E0 52 8B 01 FF 90 8C 00 00 00 6A 10 50 8D 45 BC 50");

auto urlreqHook = CefUtils::InitUrlBlocker([&](auto url) { return _stateMgr && _stateMgr->IsUrlBlocked(url); });
Hooks::CreateApi(L"libcef.dll", "cef_urlrequest_create", urlreqHook.first, urlreqHook.second);
Expand Down
8 changes: 7 additions & 1 deletion Sprinkles/src/spotify-apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ async function getPlatform(): Promise<any>
let reactRoot = (document.querySelector("#main") as any)?._reactRootContainer?._internalRoot;
if (!reactRoot) return null;

let platform = reactRoot.current?.child?.child?.stateNode?.props?.children?.props?.children?.props?.children?.props?.platform;
//1.1.90+
let platform = reactRoot.containerInfo[Object.keys(reactRoot.containerInfo).find(k => k.startsWith("__reactContainer$"))]
?.child?.child?.stateNode?._reactInternals?.return?.return?.updateQueue?.baseState?.element?.props?.platform;

//1.1.7x+
platform ??= reactRoot.current?.child?.child?.stateNode?.props?.children?.props?.children?.props?.children?.props?.platform;

if (!platform) throw Error("Can't find Spotify platform object");

return platform;
Expand Down

0 comments on commit 7637de3

Please sign in to comment.