* Remove upgrade button for spotify

* Change shortcut for spotify
This commit is contained in:
Mylloon 2022-07-14 01:45:36 +02:00
parent 38b933b08b
commit 21f34813d2
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

18
arch.sh
View file

@ -151,15 +151,17 @@ then
make install
cd ..
rm -rf spotify-adblock
# Remove banner
cd "$(dirname "$(realpath -L "$(which spotify)")")"/Apps/ || exit # absolute path to Spotify
bash -c "unzip -p xpui.spa xpui.js | sed 's/{adsEnabled:\!0}/{adsEnabled:false}/' > xpui.js"
# Remove banner and upgrade button
cd "$(dirname "$(realpath -L "$(which spotify)")")"/Apps || exit # absolute path to Spotify
unzip xpui.spa xpui.js -d .
sed -i 's/adsEnabled:!0/adsEnabled:!1/' xpui.js # disable empty ad block (banner)
sed -i 's/.\>\=1024/ 1!=1 /' xpui.js # disable Upgrade Buton
sed -i "s/((?:\"a\"))\S+noopener nofollow.+?,.)/\$1/" xpui.js # disable Premium NavLink button
zip --update xpui.spa xpui.js
rm xpui.js
# Change shortcut
if [ -f /usr/share/applications/spotify.desktop ] ; then
sed -i "7s#.*#Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U#" /usr/share/applications/spotify.desktop
fi
cd - > /dev/null || exit
# Add desktop shortcut
wget -q --show-progress https://git.kennel.ml/Anri/confOS/raw/branch/main/.local/share/applications/spotify.desktop -P "$HOME"/.local/share/applications/spotify.desktop
# === Syncthing ==
systemctl enable syncthing@"$USER".service
@ -309,7 +311,7 @@ then
usermod -aG docker "$USER"
# === Unused icons ==
apps=("fish" "cmake-gui" "com.github.hluk.copyq" "electron17" "org.gnome.Evince" "avahi-discover" "bssh" "bvnc" "org.flameshot.Flameshot" "org.fontforge.FontForge" "lstopo" "htop" "micro" "qv4l2" "qvidcap" "x11-emoji-picker" "xdvi" "yelp")
apps=("fish" "cmake-gui" "com.github.hluk.copyq" "electron17" "org.gnome.Evince" "avahi-discover" "bssh" "bvnc" "org.flameshot.Flameshot" "org.fontforge.FontForge" "lstopo" "htop" "micro" "qv4l2" "qvidcap" "x11-emoji-picker" "xdvi" "yelp" "spotify")
for app in "${apps[@]}"
do
if [ -f /usr/share/applications/"$app".desktop ]