spicetify / cli

Command-line tool to customize Spotify client. Supports Windows, MacOS, and Linux.
https://spicetify.app
GNU Lesser General Public License v2.1
18.2k stars 715 forks source link

Keep users at latest functional Spotify version for their Spicetify version #1680

Closed CharlieS1103 closed 10 months ago

CharlieS1103 commented 2 years ago

šŸ“ Provide a description of the new feature

Currently, Spotify will automatically update unless the user took preventative action before hand, and for some operating systems such as mac and linux, this can be very annoying to reverse. I propose that we create some way to keep the users at the latest functioning Spotify version(that's compatible with Spicetify).

As well as create a table of Spotify versions and their corresponding Spicetify versions, and automatically download the correct Spicetify version for the users installed Spicetify one.

Unfortunately, this will be difficult with users who already have a Spotify version which is incompatible with Spicetify installed, so we would most likely need to figure out some way to make a Spotify uninstall script, as well as store Spotify install scripts for every version and for every OS (which very well might be impossible.)

Anyways, tell me what you think, but this is one of the only ideas I can come up with to help prevent the constant need for maintaining Spicetify post updates.

afonsojramos commented 2 years ago

It may be possible if we completely block update requests with some injected javascript or by removing the JavaScript that makes the update requests, but it will take some investigation and playing around with even more regex šŸ™ƒ

lhvy commented 2 years ago

Impossible doing it for all platforms.

Just out of interest, which OSs can't this be done for?

PerNorrman commented 2 years ago

I think I found an old script who still works. It prevent Spotify from update to latest... What you have to do:

  1. Uninstall latest version of Spotify
  2. Install an old version, the 1.1.84.716 or older will work https://spotify.en.uptodown.com/windows/versions
  3. Download this (I forgot original homepage, so I upload my own) https://anonfiles.com/vefdi6l1y2/spotify-old-ui-main_zip and run the install.bat file, select option 1
  4. Reinstall Spicetify as usual.

Maybe some skilled person could have a look on the script and invoke it to Spicetify?

rxri commented 2 years ago

Impossible doing it for all platforms.

Just out of interest, which OSs can't this be done for?

macOS can't be since update process is being done inside app bundle. Like @afonsojramos said, if we will go with javascript method, then yes it's possible, otherwise it can't be.

lhvy commented 2 years ago

I've done some testing on my MacBook and I think this script should work: https://github.com/lhvy/spicetify-tools/blob/master/macOS-block-updates.sh

Updates seem to go to ~/Library/Application Support/Spotify/PersistentCache/Update, so wiping and locking that folder after killing Spotify seems to be enough to block updates.

Hopefully this helps? Not sure if the other OSs are easier and if it would be worth implementing update blocking into Spicetify. Maybe an update blocking section in the wiki could be made with links to scripts/manual instructions to block updates?

rxri commented 2 years ago

I've done some testing on my MacBook and I think this script should work: https://github.com/lhvy/spicetify-tools/blob/master/macOS-block-updates.sh

Updates seem to go to ~/Library/Application Support/Spotify/PersistentCache/Update, so wiping and locking that folder after killing Spotify seems to be enough to block updates.

Hopefully this helps? Not sure if the other OSs are easier and if it would be worth implementing update blocking into Spicetify. Maybe an update blocking section in the wiki could be made with links to scripts/manual instructions to block updates?

Actually, thanks for researching it and proving me wrong. If that works (will test some day xd) we could implement it but we would need to do it for all platforms at once. We could implement block-updates cmd in spicetify so people can use it for blocking updates.

ohitstom commented 2 years ago

Late to the party here but i dont see how this would be impossible, even if you do something as dumb as add it to some of the install scripts as an input!

CharlieS1103 commented 2 years ago

I mean tbf effectively all we'd have to do is get an xpui.js from every ver. I did some testing and that's the only file which needs to be downgraded(although xpui.css won't hurt)

NeuroCPP commented 2 years ago

how about spotx(another github project by "amd64fox") ? for blocking updates(and blocks ads...i don't think spicetify blocks audio ads...well it might I haven't done it right) and has some things taken from spicetify-cli(in credits it is said) and works pretty good along with spicetify

ohitstom commented 2 years ago

That doesn't really solve the issue and you are better off just blocking updates manually

kernelb00t commented 1 year ago

A laucher for Spotify ?

This allows us full control over which binary of Spotify we are launching. An extension inhibits any Spotify internal upgrade, and the launcher also auto-installs latest Spicetify and Spicetify Marketplace. If this is well done, startup time won't be slower.

On Linux, this is pretty easy, just interface with Flatpak. On MacOS, @lhvy script could be useful, in parallel to keeping a mirror of the latest working version. On Windows, a portable version of Spotify could be used, like Scoop and Chocolatey are handling it.

ohitstom commented 1 year ago

A laucher for Spotify ?

This allows us full control over which binary of Spotify we are launching. An extension inhibits any Spotify internal upgrade, and the launcher also auto-installs latest Spicetify and Spicetify Marketplace. If this is well done, startup time won't be slower.

On Linux, this is pretty easy, just interface with Flatpak. On MacOS, @lhvy script could be useful, in parallel to keeping a mirror of the latest working version. On Windows, a portable version of Spotify could be used, like Scoop and Chocolatey are handling it.

it's not possible to prevent upgrades inapp, not without regexing the xpui which wouldn't technically be inapp.

Also this just doesn't sound like a good solution, this is a cli for patching Spotify not keeping an index and distributing Spotifys own executables.

lhvy commented 1 year ago

Can we not just control upgrades via editing permissions on the update directories? I have a script to do this for macOS, and I think the same can be done easily for Windows.

rxri commented 10 months ago

Since quite some time, we started moving hooks to wrapper which are more bullet-proof than regexes in preprocess and Spotify breaks less frequently than before. We're fast in discovering new breaking changes and releasing hot patches as fast as we can. We support ~24 versions now which is quite good for modification and I don't think keeping users at specific Spotify release is needed, so I decided to close this issue. If you really need to stick with specific version of spotify, try this script