Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ads in New UI | Black Ad placeholder. #150

Closed
amd64fox opened this issue Apr 21, 2021 · 72 comments
Closed

ads in New UI | Black Ad placeholder. #150

amd64fox opened this issue Apr 21, 2021 · 72 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@amd64fox
Copy link

amd64fox commented Apr 21, 2021

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

Screenshots

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

UPD. Also fixed here SPOTX

@Nuzair46 Nuzair46 added the bug Something isn't working label Apr 21, 2021
@mrpond mrpond added the help wanted Extra attention is needed label Apr 21, 2021
@ronny941
Copy link

ronny941 commented Apr 21, 2021

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

@ryzenblue
Copy link

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.

@amd64fox
Copy link
Author

I have a workaround that works for now.

it worked for me, thank you so much)

@ronny941
Copy link

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

@Nuzair46
Copy link
Collaborator

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

@ronny941
Copy link

@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

@amd64fox
Copy link
Author

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

@ronny941
Copy link

ronny941 commented Apr 30, 2021

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

@amd64fox
Copy link
Author

amd64fox commented May 1, 2021

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.

@ronny941
Copy link

ronny941 commented May 1, 2021

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

@Kibakus
Copy link

Kibakus commented May 1, 2021

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 :)

@Sruko
Copy link

Sruko commented May 1, 2021

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

@Nuzair46
Copy link
Collaborator

Nuzair46 commented May 1, 2021

@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.

@Sruko
Copy link

Sruko commented May 1, 2021

@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!

@Nuzair46
Copy link
Collaborator

Nuzair46 commented May 1, 2021

@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.

@Sruko
Copy link

Sruko commented May 1, 2021

@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)

@RichardLeblanc
Copy link

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

@amd64fox
Copy link
Author

amd64fox commented May 3, 2021

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

@Sruko
Copy link

Sruko commented May 3, 2021

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.

@Nuzair46 Nuzair46 changed the title ads in New UI ads in New UI | Black Ad placeholder. May 3, 2021
@Sruko
Copy link

Sruko commented May 3, 2021

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

@Nuzair46
Copy link
Collaborator

Nuzair46 commented May 3, 2021

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.

@mrpond
Copy link
Owner

mrpond commented May 4, 2021

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!

@mrpond
Copy link
Owner

mrpond commented May 4, 2021

@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?

@Sruko
Copy link

Sruko commented May 4, 2021

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.

@mrpond
Copy link
Owner

mrpond commented May 10, 2021

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

@SaberAkiyama
Copy link

SaberAkiyama commented May 18, 2021

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.

@noxan-dev
Copy link

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

@Haider-kun
Copy link

Thanks @noxan-dev

@Araxeus
Copy link

Araxeus commented Aug 22, 2021

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().

Nuzair46 added a commit that referenced this issue Aug 24, 2021
Patch to remove ad placeholder.
Temporary solution for #150
@Nuzair46
Copy link
Collaborator

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

Nuzair46 added a commit that referenced this issue Aug 24, 2021
@Deagan
Copy link

Deagan commented Sep 1, 2021

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. 😅

@noxan-dev
Copy link

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.

@Deagan
Copy link

Deagan commented Sep 1, 2021

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?

@Nuzair46
Copy link
Collaborator

Nuzair46 commented Sep 2, 2021

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

@voltrare
Copy link

voltrare commented Sep 13, 2021

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

@Araxeus
Copy link

Araxeus commented Sep 13, 2021

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

@Nuzair46
Copy link
Collaborator

@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.

@voltrare
Copy link

voltrare commented Sep 13, 2021

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

@LYNK-INCUU
Copy link

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

@voltrare
Copy link

@ZeldrexK0DE try to reinstall

@hyoretsu
Copy link

hyoretsu commented Oct 8, 2021

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)

@jimmysofat6864
Copy link

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.

@XdekHckr
Copy link

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

@amitkuliyal
Copy link

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

@Araxeus
Copy link

Araxeus commented Dec 15, 2021

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 😮

@Nuzair46
Copy link
Collaborator

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

@hemtopo
Copy link

hemtopo commented Jul 26, 2022

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

@JuanBetto
Copy link

There is any solution for remove "Upgrade" bottom?

@NguyenASang
Copy link

@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
Copy link

@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?

@NguyenASang
Copy link

NguyenASang commented Jul 31, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests