Tag Archives: spotify

Update to Spotify – An RSS Feed

After some time the solution I devised on http://www.guldmyr.com/blog/script-to-check-for-an-update-on-a-web-page/ just did not elegant enough (also it stopped working).

Instead of getting some kind of output in a terminal sometimes somewhere I decided to make an RSS feed that updates http://guldmyr.com/spotify/spot.xml instead :)

I suspect that the repository itself could be used to see if there’s an update to it. It has all these nice looking files in here: http://repository.spotify.com/dists/stable/ – but I also suspect this is a repository for debian/ubuntu which I cannot use on my RHEL-based workstation.

Thus:

A bash script was written. It uploads the spot.xml whenever there is an update. The script does not run on the web-server so it ftps the file to the web-server, it would be nice if it did because then the actual updating of the feed would be so much more simple (just move/copy a file).

But, I hope it works :) Guess we’ll see next time there’s an update to spotify!

The script itself is a bit long and I hope not too badly documented, so it’s available in the link below: http://guldmyr.com/spotify/update.spotify.rss.feed.sh

Or, more easily, you can just add http://guldmyr.com/spotify/spot.xml to your RSS reader (google’s reader, mozilla’s thunderbird, there are many of them).

Some things I learned:

  • Latest post in an RSS feed is just below the header, making it a bit awkward to update via a script as you cannot just remove the </channel> and </rss>, add a new <item></item> and then add the </channel> and </rss> at the end again.
  • lastBuildDate in the header also needs to be updated each time the feed is updated. In the end I decided to re-create the file/feed completely every time there was an update.
  • Some rss-readers appear to have a built-in interval that they use to check if there’s an update. So for example you could update the rss-feed and press ‘refresh’ but the client still won’t show the new feeds. Google Reader does this for example. With Mozilla’s Thunderbird you can ask it to update (Get Messages) and it will. You don’t need an e-mail account in Thunderbird to use it as an RSS reader by the way.
  • http://feedvalidator.org is a great tool, use it.

I claim no responsibility if you actually use the script, the feed however should be fairly safe to subscribe to.

 

[Valid RSS]

Update / Install Spotify 0.8.2.637 on RHEL6 x64

Previous post:

http://www.guldmyr.com/blog/how-to-update-spotify-on-rhel6-x64-native-client/

Installed spotify-client-0.8.2.637.g252b980.486-2.x86_64.rpm – this is converted from the .deb package that is downloaded from: http://repository.spotify.com/pool/non-free/s/spotify/

you convert with ‘alien’ and this command:

alien --to-rpm spotify-client_0.8.2.637.g252b980.486-1_amd64.deb

To install you need to uninstall first:

rpm -ev spotify-client
rpm -ivh Downloads/Spotify/spotify-client-0.8.2.637.g252b980.486-2.x86_64.rpm
error: Failed dependencies:
libcef.so()(64bit) is needed by spotify-client-0.8.2.637.g252b980.486-2.x86_64
libcrypto.so.0.9.8()(64bit) is needed by spotify-client-0.8.2.637.g252b980.486-2.x86_64
libcrypto.so.0.9.8(OPENSSL_0.9.8)(64bit) is needed by spotify-client-0.8.2.637.g252b980.486-2.x86_
libssl.so.0.9.8()(64bit) is needed by spotify-client-0.8.2.637.g252b980.486-2.x86_64
libssl.so.0.9.8(OPENSSL_0.9.8)(64bit) is needed by spotify-client-0.8.2.637.g252b980.486-2.x86_64

OK, that didn’t work so well.

Install:

# rpm -ivh --nodeps Downloads/Spotify/spotify-client-0.8.2.637.g252b980.486-2.x
Preparing...                ########################################### [100%]
   1:spotify-client         ########################################### [100%]

You’ll get errors while trying to start spotify:

spotify 
spotify: error while loading shared libraries: libnss3.so.1d: cannot open shared object file: No such file

What you need to do is create symlinks:

ln -s /usr/lib64/libnss3.so /usr/lib64/libnss3.so.1d
ln -s /usr/lib64/libnssutil3.so /usr/lib64/libnssutil3.so.1d
ln -s /usr/lib64/libsmime3.so /usr/lib64/libsmime3.so.1d
yum -y install nspr nspr-devel
ln -s /usr/lib64/libplc4.so /usr/lib64/libplc4.so.0d
ln -s /usr/lib64/libnspr4.so /usr/lib64/libnspr4.so.0d

However, it still crashes when I try to right-click on an app – but now it has apps :)

Script To Check For an Update on a Web Page

Hey!

This is used for me on my Linux workstation to get a notification if there is a new spotify release whenever I open a new terminal.. It would be applicable for other (probably also simple) pages that aren’t updated frequently.

Reason: http://repository.spotify.com/pool/non-free/s/spotify/

I wanted to see if there was a new spotify release for Linux/QT.

Method: The URL is above – but what if I do not want to go there every day and get disappointed?

Way nicer to have a script do it for me.

This script saves the index.html from the URL above of each day.

Then each day when it downloads the .html it checks if it’s different from yesterday.

This has its limitations, if there is an update in the weekend I will never know.

The script should check the last x amount of days and if any of them are different from today it should tell me. The script checks if any of the files are different from today, if so, it will write something into another file. The script then checks if this file is non-empty, if it has data in it, it will write to this other file that. Tada. :p

If it is, then it will write to a file that is referenced in $HOME/.bashrc.

The layout of the blog doesn’t like really long lines in <pre>, but you can select below and only get the post (and not the stuff on the right side).

spot_check.sh:

#!/bin/sh

dat1=$(date +%Y.%m.%d)
daty=$(perl -MPOSIX=strftime -le 'print strftime "%Y.%m.%d",localtime (time - 86400)')
dat2=$(perl -MPOSIX=strftime -le 'print strftime "%Y.%m.%d",localtime (time - 172800)')
dat3=$(perl -MPOSIX=strftime -le 'print strftime "%Y.%m.%d",localtime (time - 259200)')
dat4=$(perl -MPOSIX=strftime -le 'print strftime "%Y.%m.%d",localtime (time - 345600)')
dat5=$(perl -MPOSIX=strftime -le 'print strftime "%Y.%m.%d",localtime (time - 432000)')

path="$HOME/Downloads/Spotify/saved"
out="$HOME/Downloads/Spotify/diff.log"
bout="$HOME/.spotcheck"
wget -q http://repository.spotify.com/pool/non-free/s/spotify/ -O $path/$dat1.html

diff -q $path/$dat1.html $path/$daty.html > $out
diff -q $path/$dat1.html $path/$dat2.html >> $out
diff -q $path/$dat1.html $path/$dat3.html >> $out
diff -q $path/$dat1.html $path/$dat4.html >> $out
diff -q $path/$dat1.html $path/$dat5.html >> $out

if [[ -s $out ]] ; then
echo $out "is not empty";
echo "#!/bin/sh" > $bout;
echo "echo new spotify release" >> $bout;
chmod +x $bout;
else
echo $out "is empty";
echo "No new spotify release.";
rm $bout;
fi;

Crontab (daily at 0915):

15 09 * * * /bin/bash /home/username/Downloads/Spotify/spot_check.sh 2>&1

.bashrc:

if [ -f ~/.spotcheck ]; then
cd $HOME
./.spotcheck
fi

How-To : Update Spotify on RHEL6 x64 native client

See the post for how to install spotify on a Linux Client (RHEL 6 x64 in my case).

This post is for how to upgrade.

2012-02-01: Updated, added –nodeps to the rpm upgrade.
2013-01-08: This has been confirmed to work with spotify-0.8.8, updated typo in symlink part.

Why? http://repository.spotify.com/pool/non-free/s/spotify/spotify-client-qt_0.6.1.309.gb871a7d-1_amd64.deb is out!

Is available. Maybe right-click works?? =)

  1. Get the .deb into a place where you can run the program ‘alien’. I have ubuntu in a virtual machine so fired that up, downloaded the .deb
  2. sudo alien –to-rpm spotify-client-qt_0.6.1.309.gb871a7d-1_amd64.deb
  3. e-mailed spotify-client-qt-0.6.1.309.gb871a7d-2.x86_64.rpm to myself
  4. save the .rpm, close spotify,  and hit:
  5. sudo rpm -Uvh spotify-client-qt-0.6.1.309.gb871a7d-2.x86_64.rpm
  6. this failed, it needed

error: Failed dependencies:
libcrypto.so.0.9.8()(64bit) is needed by spotify-client-qt-0.6.1.309.gb871a7d-2.x86_64
libcrypto.so.0.9.8(OPENSSL_0.9.8)(64bit) is needed by spotify-client-qt-0.6.1.309.gb871a7d-2.x86_64
libssl.so.0.9.8()(64bit) is needed by spotify-client-qt-0.6.1.309.gb871a7d-2.x86_64
libssl.so.0.9.8(OPENSSL_0.9.8)(64bit) is needed by spotify-client-qt-0.6.1.309.gb871a7d-2.x86_64

A forum post with some more details about this.

whereis spotify ldd /usr/bin/spotify gives me: libssl.so.10 0> /usr/lib64/libssl.so.10 libcrypto.so.10 0> /usr/lib64/libcrypto.so.10


hit:


cd /usr/lib64 
sudo ln -s libcrypto.so.10 libcrypto.so.0.9.8
sudo ln -s libssl.so.10 libssl.so.0.9.8

If still no go, some advise to rename/delete ~/.config/spotify and ~/.cache/spotify

If neither of the above still works, run

 

rpm -Uvh --nodeps spotify-client-qt-0.6.6.10.gbd39032.58-2.x86_64.rpm

It’s now possible to right-click on playlists! Also to click on ‘File’ works! Woop!

Right-click on artist worked a few times. Then after a while it stopped working. AGREGHA!!#45

(still crashes with Spotify 0.6.6.10)

I would guess that the problem lies with qt or webkit.

Sharing works though. It sucks a bit to not be able to add files to playlists. But clicking the star works so you can find the songs you don’t want to forget in there.
Scrobble/last.fm also works. Cannot select top list for another country.

How-To : Install Spotify on RHEL6 x64 native client

Hey!

You need premium for RHEL6 native client to work.

If you get it to work with WINE it would work for free (as a plus you get it with the very annoying ads).

My machine is a RHEL 6 64-bit.

The only requirement I had was that I did not have libQtWebKit.so.4 installed.

This was fixed with:

sudo yum install qtwebkit-2.0-3.el6.x86_64.rpm

I found this package online.
It’s needed because the spotify-install wants libQtWebKit.so.4 – this may be available in some other package available from within the red hat repositories but I couldn’t find it. If you know how/where that would be great to know :)

I have qt 4.6.2-19 but adding the WebKit in this way hasn’t caused any issues (yet).

You’ll probably need other qt-stuff installed too (I did an ldd /usr/bin/spotify after install and what it wants you can find in this file: spotify ). There’s a lot of them in there but libQtGui.so.4 , libQtCore.so.4 , libQtWebKit.so.4 , libQtDBus.so.4 , libQtNetwork.so.4 , libQtXml.so.4 are the libQt* ones.

To find which qt packages you have installed in a Red Hat based system hit:
sudo yum list ‘*qt*’

Download the spotify-client, I used spotify-client-qt_0.5.2.84.g6d797eb-1_amd64.deb. You can get the latest one via http://repository.spotify.com/pool/non-free/s/spotify/

As spotify doesn’t release an rpm anymore – you need to convert the debian .deb to rpm like this:

sudo alien –to-rpm spotify-client-qt_0.5.2.84.g6d797eb-1_amd64.deb

Then install spotify like this:
sudo yum install spotify-client-qt-0.5.rpm

Run spotify (just hit spotify in the terminal) and log in!

Worked without changing any sound settings or anything like that!
The volume control inside spotify controls the master volume, so be ware  and don’t let it blow your ears out!

Happy musicing!

p.s.

I also tried to install spotify on a shell with WINE and load spotify with X11-forwarding enabled on the shell. Spotify loads and lets me log in but right after login it crashes for some reason.