mrpond / BlockTheSpot

Video, audio & banner adblock/skip for Spotify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ads in New UI | Black Ad placeholder.

amd64fox opened this issue · comments

I still see an empty ad block, am I the only one?

Screenshots

Бsdsadsaез имени
Без им2321ени

UPD. Also fixed here SPOTX

yes it is true there is the bar where the ads of spotify should appear but although there is it is blocked thanks to blockthespot and the songs work I hope you can remove it completely but everything works and nothing has appeared

I have a workaround that works for now.

  1. Navigate to %APPDATA%/Spotify/Apps. Here you will find xpui.spa, make a copy of this file so that you have a backup.
  2. Rename xpui.spa to xpui.zip and open the zip. Within the zip, there will be xpui.css, extract this file.
  3. Open the extracted file with a text editor and search for .b2731cdeb97c1f6a4cf5caa44e943acb-scss. This is the css selector of the ad banner div.
  4. For this selector, change the display:flex to display:none, save the file, drop it back in the zip to replace the original xpui.css.
  5. Change the extension from xpui.zip to xpui.spa

The div selector did not change even after I reinstalled, so I'm guessing it should be the same for everybody.

I have a workaround that works for now.

it worked for me, thank you so much)

this fix will it be added to blockthespot?
thank you in advance

commented

@ronny941 if those files are not changed everytime after a new update, it will be added.

@ronny941 if those files are not changed everytime after a new update, it will be added.

the new update of spotify is now out
but I can't tell you if the fix works completely you wait the user who gave you this fix

the new update of spotify is now out
but I can't tell you if the fix works completely you wait the user who gave you this fix

files change, so this method is unlikely to be added to BTS

the new update of spotify is now out
but I can't tell you if the fix works completely you wait the user who gave you this fix

files change, so this method is unlikely to be added to BTS

ok I understand so you have to edit that file every time
because with every update of spotify the files change because it puts its originals back
just like when blockthespot has to be reapplied for the same reason

Maybe it will help yet, in the xpui.js file you need to find this e=>e.ads.leaderboard. and replace Enabled with Disabled, after which the empty block disappears. Also in this file, I was able to find a line to remove the "Upgrade" button, but as I understand it, the problem above persists and this method cannot be added to BTS.

Maybe it will help yet, in the xpui.js file you need to find this e=>e.ads.leaderboard. and replace Enabled with Disabled, after which the empty block disappears. Also in this file, I was able to find a line to remove the "Upgrade" button, but as I understand it, the problem above persists and this method cannot be added to BTS.

I can understand it because the files change with every spotify update and therefore it is impossible to always add these changes to blockthespot

commented

Hello everyone, maybe my script on Python will help someone. He removes the button and "Empty AD Block" (Alpha UI).
Not advertising

EXE - file start even if you don't have python :)
PY - file requires Python and need only for viewing code.

I would like the author to embed it or make his own workaround :)

commented

Use Block_BannerOnly = 0 if you use 1 you will see ad banner placeholder because patch is not being applied.

commented

@Kibakus good job on the python script.
But I don't think it will be added to BTS. Because, BTS already blocks the Black AD Block element. Its just only the New Alpha UI That has the bug. Which will be fixed eventually.


@Sruko Block_BannerOnly is only for Spotify Premium Users.

commented

@Kibakus good job on the python script.
But I don't think it will be added to BTS. Because, BTS already blocks the Black AD Block element. Its just only the New Alpha UI That has the bug. Which will be fixed eventually.

@Sruko Block_BannerOnly is only for Spotify Premium Users.

That doesn't matter at all, if you enable it the banner code is not run even if you are not premium. You need to disable it or you will continue to see ads.

See blockthespot_log.txt

GetModuleInformation OK!
main process#1 - patch failed! < old spotify, will always fail on new version
main process#2 - patch success! < new spotify
Mhook_SetHook - getaddrinfo success!
commented

@Sruko BTS normally removes the banner for free users without editing the config. I think in the new UI banner is not being blocked correctly.

commented

@Sruko BTS normally removes the banner for free users without editing the config. I think in the new UI banner is not being blocked correctly.

You can easily test it yourself, if the code as is isn't already clear. If the option is enabled the process will not get patched with the banner removal, and thus you will continue to see it + ads. The current version of BTS already works on new Spotify.

For example you can see that this person had it enabled and saw ads too.
#152 (comment)

Maybe it will help yet, in the xpui.js file you need to find this e=>e.ads.leaderboard. and replace Enabled with Disabled, after which the empty block disappears. Also in this file, I was able to find a line to remove the "Upgrade" button, but as I understand it, the problem above persists and this method cannot be added to BTS.

Can you telll which is the line in this file to remove the upgrade button?
Thanks in advance

@RichardLeblanc
need to find and delete this createElement(pu,{onClick:C,className:gu.Z.UpgradeButton}),i().

commented

Ok my bad, seems there was some inconsistency on my side in terms of Spotify rollout, now the banner actually shows but ads are blocked, the current workaround editing xpui to hide it and patching Spotify directly ("00 83 C4 08 84 C0 0F 84 E5" to "00 83 C4 08 84 E4 0F 84 E5") or via hook to block ads work.

commented

The leaderboard can also be removed with this as alternative in xpui.js
adsEnabled:!0 to adsEnabled:!1

commented

Please respect the issue title before posting a comment. Create issue if yours is new or post them on their respective open issues.
Please don't try to deviate from the title.

Upgrade button issues/patches goes to #83. The black ad placeholder for Alpha UI is a known bug and will be fixed in time.
For further discussions related to this thread other than possible fixes not mentioned here, use discord.

Ok my bad, seems there was some inconsistency on my side in terms of Spotify rollout, now the banner actually shows but ads are blocked, the current workaround editing xpui to hide it and patching Spotify directly ("00 83 C4 08 84 C0 0F 84 E5" to "00 83 C4 08 84 E4 0F 84 E5") or via hook to block ads work.

I had hard time finding this, wow. thank for this. I will test it and will patch it into source if this work !!!

good job!

@Sruko ("00 83 C4 08 84 C0 0F 84 E5" to "00 83 C4 08 84 E4 0F 84 E5")
I can't find it, where do I suppose to look at?

commented

This is just your existing patch for Alpha with a small change, it only blocks ads but will not remove the new empty banner at the bottom because it's now handled different.
What i changed is that instead of jumping, it changes to 'test AH, AH' instead of AL, AL, it's a simpler one byte patch.

To patch out the new banner from Spotifty.exe in Alpha is going to be a lot more involved tracing down.

that right more tracing down.
I don't want to patch 'libcef.dll' yet

Hi. I have some a problem. I use BlockTheSpot with Spicetify-CLI it's a custom theme version of Spotify, but the ads is popped up. Because version 2.1.0 in Spicetify-CLI has changed XPUI script on Spotify Apps folder from .spa to folder. I'd try to replace BlockTheSpot in the latest release, but it didn't work properly.

I managed to remove the black placeholder and also the "Upgrade" button from the new UI using Spicetify.
Go ahead and try it out: https://github.com/Daksh777/SpotifyNoPremium
image

commented

@Daksh777 nice. I was able to block the placeholder and upgrade button. but couldn't figure out how to remove the upgrade from the profile drop down menu.

commented

I managed to remove the black placeholder and also the "Upgrade" button from the new UI using Spicetify.
Go ahead and try it out: https://github.com/Daksh777/SpotifyNoPremium

@Daksh777 How can we do this with "SpicetifyDefault" Theme v2.1.0?

@Daksh777 How can we do this with "SpicetifyDefault" Theme v2.1.0?

It's pretty easy, you can copy everything in user.css in my repo after the "For new UI" line and paste it into Spicetify Default's user.css

commented

And before applying the theme right?

And before applying the theme right?

What do you mean?

commented

I copied the lines from your css and then i applied the customization using spicetify, but there is a color (light brown) added to the theme that does not match the original design of the theme, maybe i did something wrong?

I deleted everything from Spicetify Default's user.css before pasting in the lines from your css, is this the correct way?

I copied the lines from your css and then i applied the customization using spicetify, but there is a color (light brown) added to the theme that does not match the original design of the theme, maybe i did something wrong?

I deleted everything from Spicetify Default's user.css before pasting in the lines from your css, is this the correct way?

No, you had to just add all the lines after "For new UI" line in my user.css in Spicetify Default's user.css, you didn't have to delete it all.

commented

You are right, Daksh.

Now i did it the correct way and it works as expected.

Question: did you manage to make that code yourself? because i see that it is different than the solutions some users provided above

Try this one:
spicetify config inject_css 0 replace_colors 0

Question: did you manage to make that code yourself? because i see that it is different than the solutions some users provided above

Yes, it's quite simple. All you need is to enable developer tools in Spotify and know CSS.

commented

Try this one:
spicetify config inject_css 0 replace_colors 0

What does it do?

Try this one:
spicetify config inject_css 0 replace_colors 0

What does it do?

It means back to original theme of Spotify

commented

@SaberAkiyama it is an alternative to spicetify restore

Thank you!

@SaberAkiyama it is an alternative to spicetify restore

Thank you!

That was restore a backup to original files, it means Spotify Apps folders into .spa files

commented

Ah Ok, so spicetify config inject_css 0 replace_colors 0 restores only the original Spotify theme without restoring Spotify to original state?

Ah Ok, so spicetify config inject_css 0 replace_colors 0 restores only the original Spotify theme without restoring Spotify to original state?

Yes.

commented

@Daksh777 @fosam @SaberAkiyama please don't populate this thread from issues other than the Title.
Spicetify is a well documented repo, please read their docs and use their issue section to keep stuff clean and close to this thread. in case of further detailed discussion, you are open to use our discord.

Spicetify fixes like the repo by daksh is still allowed here. but issues/help related to it should be posted on that repo.

I have a workaround that works for now.

  1. Navigate to %APPDATA%/Spotify/Apps. Here you will find xpui.spa, make a copy of this file so that you have a backup.
  2. Rename xpui.spa to xpui.zip and open the zip. Within the zip, there will be xpui.css, extract this file.
  3. Open the extracted file with a text editor and search for .b2731cdeb97c1f6a4cf5caa44e943acb-scss. This is the css selector of the ad banner div.
  4. For this selector, change the display:flex to display:none, save the file, drop it back in the zip to replace the original xpui.css.
  5. Change the extension from xpui.zip to xpui.spa

The div selector did not change even after I reinstalled, so I'm guessing it should be the same for everybody.

They removed this command so blocking it with this is no longer an option, either that or even the search in notepad ++ is blind lol

I have a workaround that works for now.

  1. Navigate to %APPDATA%/Spotify/Apps. Here you will find xpui.spa, make a copy of this file so that you have a backup.
  2. Rename xpui.spa to xpui.zip and open the zip. Within the zip, there will be xpui.css, extract this file.
  3. Open the extracted file with a text editor and search for .b2731cdeb97c1f6a4cf5caa44e943acb-scss. This is the css selector of the ad banner div.
  4. For this selector, change the display:flex to display:none, save the file, drop it back in the zip to replace the original xpui.css.
  5. Change the extension from xpui.zip to xpui.spa

The div selector did not change even after I reinstalled, so I'm guessing it should be the same for everybody.

They removed this command so blocking it with this is no longer an option, either that or even the search in notepad ++ is blind lol

Just search for height:106px or just 106 (it's the only element with that height).

@Daksh777 @Arrotanis
Why do you hide this banner through css, when lines have already been found in js that have not changed for a long time.
In my repository this is exactly what I did, https://github.com/amd64fox/SpotX

commented

I have a workaround that works for now.

  1. Navigate to %APPDATA%/Spotify/Apps. Here you will find xpui.spa, make a copy of this file so that you have a backup.
  2. Rename xpui.spa to xpui.zip and open the zip. Within the zip, there will be xpui.css, extract this file.
  3. Open the extracted file with a text editor and search for .b2731cdeb97c1f6a4cf5caa44e943acb-scss. This is the css selector of the ad banner div.
  4. For this selector, change the display:flex to display:none, save the file, drop it back in the zip to replace the original xpui.css.
  5. Change the extension from xpui.zip to xpui.spa

The div selector did not change even after I reinstalled, so I'm guessing it should be the same for everybody.

The new class is .snMc3rl8H2pM9cqkTpQ6. Just follow the same instructions but instead of .b2731cdeb97c1f6a4cf5caa44e943acb use the new class

The easiest way for me is editing xpui.js while keeping in mind that x can change between patches:
function(x){return x.ads.leaderboard.isEnabled} to function(x){return x.ads.leaderboard.isDisabled}

and for deleting the upgrade button:
DELETE createElement(Xx,{onClick:x,className:Xx.x.UpgradeButton}),x().

commented

The latest commit on the BlockTheSpot.bat will remove this placeholder.
Its an Experimental feature thanks to @compilerdeceiver397 .

Was there a way I could auto-confirm the (Y/N) prompt, so that it removes the ad placeholder without having to confirm each start-up? I've attempted to do so through the .bat myself, without success. 😅

commented

Was there a way I could auto-confirm the (Y/N) prompt, so that it removes the ad placeholder without having to confirm each start-up? I've attempted to do so through the .bat myself, without success. 😅

if you download the latest .bat this prompt was added.

Was there a way I could auto-confirm the (Y/N) prompt, so that it removes the ad placeholder without having to confirm each start-up? I've attempted to do so through the .bat myself, without success. 😅

if you download the latest .bat this prompt was added.

Yes, but I would like it to auto-start Spotify without having to type Y/N? Was this possible?

commented

@Deagan You only have to use the bat file once. Then you can normally start Spotify.

Im not using the script because im installing with scoop
I don't know if its only me but changing the xpui.js makes spotify slow/ not responsive (by directly editing xpui.js)
But changing the only the xpui.css does not give that problem

I don't know if its only me but changing the xpui.js makes spotify slow/ not responsive (by directly editing xpui.js)
But changing the only the xpui.css does not give that problem

Anyone else experiencing this?
Works fine for me

commented

@voltrare @Araxeus No. The change in xpui.js will not impact performance as it is just a simple toggle rather than having a long function to do complex stuff.

I understand, its just it happens like that for me even after reboot and changing back to default value returns the state (not laggy)
maybe its because Im using scoop

I have a workaround that works for now.

  1. Navigate to %APPDATA%/Spotify/Apps. Here you will find xpui.spa, make a copy of this file so that you have a backup.
  2. Rename xpui.spa to xpui.zip and open the zip. Within the zip, there will be xpui.css, extract this file.
  3. Open the extracted file with a text editor and search for .b2731cdeb97c1f6a4cf5caa44e943acb-scss. This is the css selector of the ad banner div.
  4. For this selector, change the display:flex to display:none, save the file, drop it back in the zip to replace the original xpui.css.
  5. Change the extension from xpui.zip to xpui.spa

The div selector did not change even after I reinstalled, so I'm guessing it should be the same for everybody.

This file is completely empty for me it's literally 22bytes

@ZeldrexK0DE try to reinstall

The latest .bat should close this issue, no? Though I'd also add a warning telling people to download it in case they want to remove the empty banner. (I always wanted to, but I had no idea the script also did that)

I have a workaround that works for now.

  1. Navigate to %APPDATA%/Spotify/Apps. Here you will find xpui.spa, make a copy of this file so that you have a backup.
  2. Rename xpui.spa to xpui.zip and open the zip. Within the zip, there will be xpui.css, extract this file.
  3. Open the extracted file with a text editor and search for .b2731cdeb97c1f6a4cf5caa44e943acb-scss. This is the css selector of the ad banner div.
  4. For this selector, change the display:flex to display:none, save the file, drop it back in the zip to replace the original xpui.css.
  5. Change the extension from xpui.zip to xpui.spa

The div selector did not change even after I reinstalled, so I'm guessing it should be the same for everybody.

The new class is .snMc3rl8H2pM9cqkTpQ6. Just follow the same instructions but instead of .b2731cdeb97c1f6a4cf5caa44e943acb use the new class

I'm editing the xpui file on Mac so it should be the same thing but I don't know what class the upgrade button is called. Do you know what it's called? I can locate the height:106px so that's no problem. Just trying to see how I can remove the upgrade button.

Just use windows "host" entries to block ads and this bug should not appear (i think)

latest version of Spotify is now showing adds, no update to this project from quite some time, this the project still alive?

latest version of Spotify is now showing adds, no update to this project from quite some time, this the project still alive?

It works perfectly for me 😮

commented

Closing this as its almost 9 months old and a workaround is available with auto installer.

hi, the file was work excellent, but now I have the following error message:

imagen

Invoke-WebRequest : 404: Not Found
En línea: 1 Carácter: 85

  • ... pe]::Tls12; Invoke-WebRequest -UseBasicParsing 'https://raw.githubuse ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
      eption
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Thanks for your help

There is any solution for remove "Upgrade" bottom?

@JuanBetto I tested on my Window 11 with Spotify ver 1.1.91.824.g07f1e963 and everything works perfectly (Upgrade button and Ads have been removed)

@JuanBetto I tested on my Window 11 with Spotify ver 1.1.91.824.g07f1e963 and everything works perfectly (Upgrade button and Ads have been removed)

Yeah, but my friend activity is hidden :/, that's normal?

@JuanBetto
I think you disabled this one

image

To show "Friend activity" you need to enable that option.

In case you don't know where is that option:

  • Click your profile in the top right of the screen then Choose "Settings"
  • Scroll down to "Display" and you will see that button then enable it to show "Friend activity"

image