Active Topics

 


Reply
Thread Tools
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#1
There, I've now got a client that works good enough for me. There are some features that are missing and some spurious bugs that show up from time to time causing either stop in music or death of client. I'm guessing that the mix of threads in GTK+ and Despotify causes this somehow. I'll investigate more some rainy day...

What is it?
A Spotify client based on Despotify, aptly named footify. You need to have a Premium Spotify Account to use it.

What can it do?
+Load playlists and present them in a tree with full kinetic scrolling for browsing.
+Play songs from playlist with updating time and a progress bar.
+Pause and resume playing.
+Load and display cover art.
+Automatically handle start of the next song in the playlist.
+Move to the next song in the playlist.
+Search and display information about songs which is presented with full kinetic scrolling.
+Start songs from the search result.

What can it not do?
-Shuffle. I never use it...
-Repeat. I never use it...
-Offline storage/mode. If Despotify adds this, I might have a look.
-Save settings (like username and password). It's easy to have this compiled into the client.
-Go to previous track. There's a button for it but I never use it.

What special features are there?
+After logging in, the view is changed to the playlist one.
+After picking a song from a playlist or a search, the view is changed to the playing one.

It also turned out to be real easy to modify the source and compile it for my normal Linux machine without Hildon functionality. So, clients for two platforms for the price of one.

Other problems?
-The Despotify version that is in Extras-devel(?) is rev. 488 which is broken (unless the maintainer of that package has updated it). I've compiled my own library using rev. 508 which, potentially, makes my client binary incompatible with the available version.
-It's easy to find things I haven't tested very much and confuse the client.
-I can't say I have completely understood the mechanics of Despotify which might cause some trouble.
-There are some inconsistencies with the state of the Play/Pause button. This is the most boring part of UI programming.
Attached Images
    
 

The Following 21 Users Say Thank You to Joorin For This Useful Post:
Posts: 3 | Thanked: 0 times | Joined on May 2010
#2
Hi

Is the software available for testing?

--Muhvi
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#3
I'm thinking about ways to easily distribute this together with the proper libdespotify. Most likely I'll just create a .tar file. If I get the time, I'll see what I can do about creating a .deb file.

As a tertiary solution I'll look into getting it into Extras-devel but I'm not sure it's possible together with a binary like libdespotify.

Last edited by Joorin; 2010-05-18 at 21:03.
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#4
Just a few technical pointers together with the binary and instructions on how to install it.

I'm a bit surprised by how little code is needed to get this far:
Code:
$ wc *.c *.h
  230   484  5082 client.c
  689  1422 20986 footify.c
   51   122  1128 pulse.c
   10    17   169 audio.h
   14    48   449 client.h
Just some 1100 lines of C code.

Also, I had to learn GTK+-2.0 along the way. My last encounter was with GTK-1.2 so much has happened. My general impression is that some things are overly complicated (GtkTreeView, need I say more?) but viewed as a tool kit, it works really well. The Hildon extensions that are available work well and are easy to replace with ordinary GTK components to be able to build on other platforms.

Building the GUI by hand was interesting but I think I'll need to look at some tools soon.

libdespotify is a nice hack in itself. I've had to do some research into how it works to get to where I am now but I think it works well enough. One of the problems that are left is that I wait one second into the song to get the cover art just to avoid some complications. This might very well make the music stop for a little while but I favour this over not getting the cover art at all...

There is an option in despotify to use a local cache for cover art and some meta-data but it's not activated yet since I'm not totally sure how much space it might use. Activating this cache and do some testing is on my TODO list.

So, onwards: Installation instructions:
I've tried to stick to the optified way of doing things even though it's just a tar.gz file. With it you'll get the binary and revision 508 of the despotify library. This is what I use and it works for me.
Code:
cd /home/opt
tar zxf footify-0.0.1.tar.gz
chmod 755 footify/usr/bin/footify.sh
cd /usr/bin
ln -s /home/opt/footify/usr/bin/footify.sh footify
Now you'll be able to start footify from an XTerminal. I'll look into adding an application icon and making it show up in the application list as soon as I get around to building a .deb file.

footify has the following extra dependencies that you'll have to satisfy by installing what is needed unless you've already got it:
Code:
libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0x40038000)
libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x4007d000)
libogg.so.0 => /usr/lib/libogg.so.0 (0x400ad000)
It's easy to check with the ldd command:
Code:
ldd footify
If all dependencies are ok, you're good to go.

Have a look in the footify.sh script to get an idea about how I point at the despotify library if things just won't work. Perhaps I made a typo somewhere.

Enjoy the music!
Attached Files
File Type: gz footify-0.0.1.tar.gz (65.3 KB, 381 views)

Last edited by Joorin; 2010-05-18 at 21:02. Reason: Forgot the x bit
 

The Following 5 Users Say Thank You to Joorin For This Useful Post:
Posts: 87 | Thanked: 277 times | Joined on Feb 2010 @ Helsinki, Finland
#5
Wow. This is working pretty fine already. Nice work!

One bug: Login and password field always insert first letter uppercased. I figured it out when it didn't accept my password.
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#6
I know about the GtkEntry issue. I did some Google work to try to solve it and looked at the GTK documentation but didn't stumble on anything obvious. I have disabled completion for the password field but that wasn't enough.

Your username is case insensitive, though, so it's only an issue with the password.

And thank you for the feedback! I'm glad you like it.
 

The Following 2 Users Say Thank You to Joorin For This Useful Post:
Posts: 87 | Thanked: 277 times | Joined on Feb 2010 @ Helsinki, Finland
#7
Originally Posted by Joorin View Post
I know about the GtkEntry issue. I did some Google work to try to solve it and looked at the GTK documentation but didn't stumble on anything obvious. I have disabled completion for the password field but that wasn't enough.

Your username is case insensitive, though, so it's only an issue with the password.

And thank you for the feedback! I'm glad you like it.
I don't by the way have the hildon style in the app in my N900 (all grey). Is there some package I should install?

I'm sorry if I missed something in your earlier messages.
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#8
I don't think you've missed anything. I haven't done anything to change theme or looks, I just start it and it looks like that. And I haven't changed anything connected to themes on the phone either. It's almost vanilla.

Could you perhaps take a screen shot and show me what it looks like?
 
Posts: 49 | Thanked: 8 times | Joined on May 2010 @ Sweden
#9
Looks good, but the sound stutters right now when I look through my playlists or try to multitask with other apps.

Keep up the good work
 
Posts: 87 | Thanked: 277 times | Joined on Feb 2010 @ Helsinki, Finland
#10
Originally Posted by Joorin View Post
I don't think you've missed anything. I haven't done anything to change theme or looks, I just start it and it looks like that. And I haven't changed anything connected to themes on the phone either. It's almost vanilla.

Could you perhaps take a screen shot and show me what it looks like?
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 04:14.