SpotX-Official / SpotX-Bash

SpotX Mac and Linux adblocker for the Spotify desktop client, in Bash
MIT License
2.11k stars 75 forks source link

Can't specify spotify directory #25

Closed vuthanho closed 10 months ago

vuthanho commented 10 months ago

🧐 Have you fully read the README and viewed similar issues?

Сountry of your account

Belgium

What is your Spotify Plan?

Free

Do you have Spicetify installed?

No

ℹ Computer information

- Spotify version: Spotify version 1.2.25.1011.g0348b2ea
- OS: Pop!_OS 22.04 LTS x86_64
- Shell: zsh 5.8.1

📝 Description

  1. Specify a path with -P ...

🖥️ Terminal Input/Output

❯ bash <(curl -sSL https://spotx-official.github.io/run.sh)

Searching for Spotify directory...

Error: Spotify directory not found. Set directory path with '-P' flag.

❯ bash <(curl -sSL https://spotx-official.github.io/run.sh) -P /usr/share/spotify

Error: Spotify not found in path set by '-P'. Confirm directory and try again.

❯ ll /usr/share/spotify total 265M drwx------ 5 xxx xxx 4,0K déc. 1 14:54 Apps drwxr-xr-x 2 root root 4,0K déc. 1 14:31 apt-keys -rw-rw-r-- 1 root root 641K nov. 8 07:47 chrome_100_percent.pak -rw-rw-r-- 1 root root 993K nov. 8 07:47 chrome_200_percent.pak drwxr-xr-x 2 root root 4,0K déc. 1 14:31 icons -rw-rw-r-- 1 root root 11M nov. 8 06:28 icudtl.dat -rw-rw-r-- 1 root root 198M nov. 20 17:56 libcef.so -rw-rw-r-- 1 root root 253K nov. 20 17:56 libEGL.so -rw-rw-r-- 1 root root 6,2M nov. 20 17:56 libGLESv2.so -rw-rw-r-- 1 root root 3,9M nov. 20 17:56 libvk_swiftshader.so -rw-rw-r-- 1 root root 604K nov. 20 17:56 libvulkan.so.1 drwxr-xr-x 2 root root 4,0K déc. 1 14:31 locales -rw-rw-r-- 1 root root 7,8M nov. 8 09:29 resources.pak -rw-rw-r-- 1 root root 270K nov. 8 08:07 snapshot_blob.bin -rwxr-xr-x 1 root root 36M nov. 20 17:56 spotify -rw-r--r-- 1 root root 238 nov. 20 17:47 spotify.desktop -rw-rw-r-- 1 root root 623K nov. 8 09:36 v8_context_snapshot.bin -rw-rw-r-- 1 root root 107 nov. 8 07:45 vk_swiftshader_icd.json

📸 Screenshots

No response

jetfir3 commented 10 months ago

It's strange that both auto search and -P are failing.

Can you list what's in /usr/share/spotify/Apps/?

Your ll output suggests there are multiple sub-directories in your /usr/share/spotify/Apps/ directory, yet there shouldn't be any.

A fresh install of Spotify should have the directory looking like the following, but seems something was done to your Apps directory.. so I can only assume Apps directory was "tampered" with or there is some sort of permission issue.

ls -l /usr/share/spotify/
total 271056
drwxrwxrwx 1 root root        34 Dec  1 1:47 Apps
drwxrwxrwx 1 root root       234 Dec  1 1:47 apt-keys
-rw-rw-r-- 1 root root    656174 Nov  8 01:47 chrome_100_percent.pak
-rw-rw-r-- 1 root root   1016019 Nov  8 01:47 chrome_200_percent.pak
drwxrwxrwx 1 root root       398 Dec  1 1:47 icons
-rw-rw-r-- 1 root root  10717392 Nov  8 00:28 icudtl.dat
-rw-rw-r-- 1 root root 207010608 Nov 20 11:56 libcef.so
-rw-rw-r-- 1 root root    258264 Nov 20 11:56 libEGL.so
-rw-rw-r-- 1 root root   6499712 Nov 20 11:56 libGLESv2.so
-rw-rw-r-- 1 root root   4080176 Nov 20 11:56 libvk_swiftshader.so
-rw-rw-r-- 1 root root    617848 Nov 20 11:56 libvulkan.so.1
drwxrwxrwx 1 root root        18 Dec  1 1:47 locales
-rw-rw-r-- 1 root root   8097075 Nov  8 03:29 resources.pak
-rw-rw-r-- 1 root root    275914 Nov  8 02:07 snapshot_blob.bin
-rwxr-xr-x 1 root root  37660232 Nov 20 11:56 spotify
-rw-r--r-- 1 root root       238 Nov 20 11:47 spotify.desktop
-rw-rw-r-- 1 root root    637677 Nov  8 03:36 v8_context_snapshot.bin
-rw-rw-r-- 1 root root       107 Nov  8 01:45 vk_swiftshader_icd.json

----

ls -l /usr/share/spotify/Apps/
total 11096
-rw-r--r-- 1 root root 2736167 Nov 20 11:56 login.spa
-rw-r--r-- 1 root root 8619731 Nov 20 11:56 xpui.spa
vuthanho commented 10 months ago

Here you are

ls -l /usr/share/spotify/Apps/
total 11096
-rwx------ 1 xxx xxx 2736167 déc.   1 15:27 login.spa
-rwx------ 1 xxx xxx 8619731 déc.   1 15:27 xpui.spa
vuthanho commented 10 months ago

For some weird reason, it is now working... I haven't touched spotify since then though. And I don't see any recent commit related to that, so I guess it was from my side. Maybe rebooting did something.

jetfir3 commented 10 months ago

Your output of ls -l /usr/share/spotify/Apps/ doesn't seem to match what your original ll output of /usr/share/spotify/ suggested... which was multiple subdirectories and a timestamp that differed from all other timestamps in the spotify directory which would mean it was edited at some point after the initial install.

Not sure if you had Spicetify installed at some point.. or had touched the ./Apps dir yourself along the way but maybe a reboot and reinstall or something cleared things up, bringing Spotify dir back to proper untouched stock allowing the patch to work as expected.

SatyaDewangan05 commented 8 months ago

use this

bash <(curl -sSL https://spotx-official.github.io/run.sh) --installdeb

the -P is only needed if you've already installed the official Spotify.