Re:Spotify excessively writing to drive
by philipkglass on Wednesday November 09, 2016 @04:05PM
(#12914645)
Brute-force solution: save this as spotify-fixer.py, run it as cron job:
[ Parent
| on HN ]
Re:Spotify excessively writing to drive
by unhammer on Thursday November 10, 2016 @06:51AM
(#12919629)
On Ubuntu/Debian, it might make sense to run it after each apt-get:
$ cat /usr/local/bin/spotify-turn-off-vacuum
#!/usr/bin/env python2
target = "/usr/bin/spotify"
with open(target) as infile:
bytes = infile.read()
with open(target+".bak", "wb") as backup:
backup.write(bytes)
fixed = bytes.replace("VACUUM;", "xxxxxx;")
with open (target, "wb") as outfile:
outfile.write(fixed)
$ cat /etc/apt/apt.conf.d/99spotify-turn-off-vacuum
DPkg::Post-Invoke {"/usr/local/bin/spotify-turn-off-vacuum";};
Re:Spotify excessively writing to drive
by Someone on Thursday November 10, 2016 @03:23AM
(#12918655)
If you do that, go the extra mile and schedule a (weekly or so) job to vacuum that database.
Also, since you are on a Mac, I would use launchd jobs and make it less brute-force by scheduling the job changing the file on writes to the Applications/Spotify.app/Contents/MacOS/ directory.
It's beyond me, why doesn't Spotify do exactly the same thing instead of overusing the VACUUM command.
Re:Spotify excessively writing to drive
by toomuchtodo on Wednesday November 09, 2016 @04:31PM
(#12914866)
[retracted]
Thanks logicallee! I definitely need to be more judicious about time management, so I appreciated your comment!
Re:Spotify excessively writing to drive
by logicallee on Wednesday November 09, 2016 @04:35PM
(#12914902)
dude. stop. the reason your username is "toomuchtodo" is shit like this. Just do it RIGHT NOW, or don't do it. It's not that important. Delete that stupid bookmark.
Just because something could be fun to do if you didn't have anythign else to do and were bored out of your mind, doesn't mean it's worth doing, ever.
Re:Spotify excessively writing to drive
by mynameisvlad on Wednesday November 09, 2016 @07:59PM
(#12916659)
Is the vitrol really necessary? How does what a complete stranger decides to do in their spare time affect you in any way shape or form?
Re:Spotify excessively writing to drive
by smhost on Wednesday November 09, 2016 @08:55PM
(#12917005)
I think it's more tough love than it is vitriol.
Re:Spotify excessively writing to drive
by toomuchtodo on Wednesday November 09, 2016 @10:41PM
(#12917528)
> I think it's more tough love
That's how I took it.
Re:Spotify excessively writing to drive
by logicallee on Thursday November 10, 2016 @03:30AM
(#12918686)
yeah
Re:Spotify excessively writing to drive
by philipkglass on Wednesday November 09, 2016 @04:36PM
(#12914911)
If you're on a Mac you have python already. Just save it somewhere and curl pipe it to python.
Re:Spotify excessively writing to drive
by 45h34jh53k4j on Wednesday November 09, 2016 @06:22PM
(#12915901)
No No No, please do not encourage people to do this.
Curl pipe is a horrible anti security pattern and you are encouraging people to be irresponsible with patching binaries from the internet.
Re:Spotify excessively writing to drive
by dguaraglia on Wednesday November 09, 2016 @07:28PM
(#12916427)
The weird thing is talking about "curl pipe"ing into Python when you have a local copy? Wha?
Re:Spotify excessively writing to drive
by philipkglass on Wednesday November 09, 2016 @07:44PM
(#12916545)
The now-retracted comment talked about rewriting the Python into a shell script that you could toss on a web server and curl-pipe to run. I was pointing out that you can curl-pipe the original Python without rewriting it as shell.