BlockTheSpot icon indicating copy to clipboard operation
BlockTheSpot copied to clipboard

Doesn't work properly if Spicetify is installed

Open NguyenASang opened this issue 1 year ago • 8 comments

  • [x] You are using the Spotify last tested version mentioned in the README.
  • [x] You are using the latest BlockTheSpot from github.
  • [x] You uninstalled Spotify and just ran the patch
  • [x] You read through the known issues section in the README.
  • [x] You read through the additional notes section in the README.
  • [x] You enabled logging by editing config.ini set log = 1.
  • [x] Make sure whether an issue related yours is already open or not.
  • [x] Make sure you have completed everything in the above checklist.

Screenshots:

Screenshot 2024-06-17 092935

Screenshot 2024-06-17 092854

Log:

Although the log shows the script working fine, I still upload here just in case: blockthespot.log

NguyenASang avatar Jun 17 '24 02:06 NguyenASang

You should install it after spicetify install

Nuzair46 avatar Jun 17 '24 03:06 Nuzair46

I did that, Spicetify first, then apply BlockTheSpot.

NguyenASang avatar Jun 17 '24 03:06 NguyenASang

can you:

  • install Spicetify
  • Install BlockTheSpot with manual step.

Nuzair46 avatar Jun 18 '24 05:06 Nuzair46

still same issue

NguyenASang avatar Jun 18 '24 07:06 NguyenASang

@Nuzair46 I found the reason why.

  • When we run Spicetify apply or Spicetify backup apply command, Spicetify will extract %APPDATA%\Spotify\Apps\*.spa files and remove the original .spa files.

  • Therefore, when we run our batch, and open Spotify, Spotify itself found those extracted folders, so it don't need to call cef_zip_reader_create to read zip anymore and our hook becomes useless.

How to fix ?

  • Pack login and xpui folders in %APPDATA%\Spotify\Apps to zip then rename packed folders' extension to .spa.
  • Reopen Spotify and everything works fine.

My thought

  • So I think there are 2 ways to solve:
  1. Pack the login and xpui folders to .spa type if packed version are not found.

  2. Ask Spicetify to pack into .spa after modifying. (probably the best way)

  3. Find a better function that doesn't depend on the zip reader to hook.

NguyenASang avatar Jun 19 '24 04:06 NguyenASang

Yes, I know that, but manual installation doesn't modify xpui file directly.

Manual steps

Browse to your Spotify installation folder %APPDATA%\Spotify Download chrome_elf.zip from releases Unzip dpapi.dll and config.ini to Spotify directory.

Nuzair46 avatar Jun 19 '24 08:06 Nuzair46

Ah, my bad, I should look at the source code before.

After looking at the source code, I can see that it hooks directly to cef_zip_reader_create in libcef.dll to change values. Again, Spotify works fine even with only extracted folder of xpui.spa and login.spa.

Therefore, when we run Spotify, with only extracted folder of xpui.spa and login.spa, the original cef_zip_reader_create function won't be called, so our hook becomes useless.

To solve this, we need to somehow keep those .spa files by ways I mentioned above.

NguyenASang avatar Jun 19 '24 15:06 NguyenASang

Spicetify has its own AdBlock extension. Why'd you use BlockTheSpot with Spicetify to begin with!

DerDemystifier avatar Jul 04 '24 09:07 DerDemystifier

@NguyenASang Sorry for the bother, but I wanted to ask you if it was still working, I tried various methods, automatic script for both, separate scripts, one before the other and viceversa, manual both, but I can't seem to be able to install BTS over Spicetify. Spicetify will always "prevail" making the Explore Premium appear, even if I patch Spotify with BTS after having finished with Spicetify.

I also tried your method but I honestly don't think I did it correctly as nothing "new" happened.

Currently I'm just using BTS as for now that's more than enough :) but would love to use the lyrics from Spicetify and perhaps some theming.

Constrat avatar Nov 07 '24 17:11 Constrat

manual install should fix this issue

Nuzair46 avatar Dec 17 '24 12:12 Nuzair46