Skip to content

Instantly share code, notes, and snippets.

@aleksandrs-ledovskis
Last active November 15, 2024 04:46
Show Gist options
  • Save aleksandrs-ledovskis/0b149b996c7a1ebc16126c60a79433ec to your computer and use it in GitHub Desktop.
Save aleksandrs-ledovskis/0b149b996c7a1ebc16126c60a79433ec to your computer and use it in GitHub Desktop.
Lock Spotify version (macOS)
  1. Create new Automator application with Run Shell script action (exact steps below).

    1. Open Automator.app (e.g. from Spotlight)
    2. Select File → New in menu
    3. Select "Application", click "Choose"
    4. With "Actions" toggle selected, type "Run Shell Script" in filter box, double click on filtered item
  2. Put contents from lock_spotify_version.sh into script's body (exact steps below).

    1. In opened right-hand item select /bin/sh as "Shell" type and copy contents of Gist's "lock_spotify_version.sh" below/in text area
    2. Select File → Save in menu; Save as application name of your choice (e.g. "Lock Spotify.app")
  3. Add resulting application to user's "Login Items"

  4. Restart computer

  5. Install Spotify version of choice


N.B. The Automator-built application should not be run manually. Its task is to run as early as possible and squat the folder name that Spotify uses for updates. If Spotify is unable to access said hardcoded path, it skips update

#!/bin/sh
mkdir -p $TMPDIR/sp_update && chmod 000 $TMPDIR/sp_update
@lordaslanthekingofnarnia

Is there a way to stop it from autoupdating after shut down?
I have the version that I want of Spotify but after doing what you transcribed with shutting down two times it reverts back to the earliest and fucked version.
Anything would help as this is for my work.
Thank you so much for sharing this btw, life saver....

@lordaslanthekingofnarnia

The first shutdown remains the same version but the second doesn't
Not sure if I have to do the steps every time to stop the autoupdating?

@aleksandrs-ledovskis
Copy link
Author

@lordaslanthekingofnarnia

  1. Have you restarted the computer after creating the aforementioned login item and before installing the targeted Spotify version?
  2. The "shutting down" you refer to, is it computer shutdown or Spotify application shutdown?
  3. What are the Spotify versions (targeted and "fucked") in question?

@lordaslanthekingofnarnia

Yes I believe so, I download the version I want from an outside source that reverts it back to that version want. I place the code and run it in the application format.

It is a computer shutdown that reverts it back.

Excuse me for the french used in that but it is the latest update they have implemented, the interface is very hard to use.

@aleksandrs-ledovskis
Copy link
Author

aleksandrs-ledovskis commented Jul 5, 2021

@lordaslanthekingofnarnia

I place the code and run it in the application format.

Have you enabled this resulting application format entry in "Login Items"?
image

The application should not be run manually. Its task is to run as early as possible and squat the folder name that Spotify uses for updates. If Spotify is unable to access said hardcoded path, it skips update.

So, the logic should always be:

  1. Create new Automator application with Run Shell script action
  2. Put contents from lock_spotify_version.sh into script's body
  3. Save & add resulting application to user's "Login Items"
  4. Restart computer
  5. Install Spotify version of choice

@lordaslanthekingofnarnia

I know this might be strange but would you be open to a zoom call or something?

I feel as though I have done the steps and tried troubleshooting it multiple times to no end....

Anything would be greatly appreciated!!

@tascott
Copy link

tascott commented Jul 23, 2021

I know this might be strange but would you be open to a zoom call or something?

I feel as though I have done the steps and tried troubleshooting it multiple times to no end....

Anything would be greatly appreciated!!

If you're still stuck, try this - https://www.reddit.com/r/spotify/comments/cpadkq/stop_upgrade_mac_app/

@Cetartiodactyla
Copy link

Someone got an update on this? Seems not to work anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment