Exaile 0.3

Published: Jun 7, 2008

Exaile is currently undergoing an almost complete rewrite. Why? Because the codebase could be better. Recently, thanks to Aren Olson, the 0.3 branch has been taking off. Already the code is a lot better, and will be a lot easier to add things to in the future.

As of this writing, you can create a collection, based on different libraries (directories). For each one of these directories, you can set a rescan interval, and/or have the library be watched by pyinotify for changes. You can create playlists, smart playlists, play these playlists in order or shuffle and/or on repeat. I am currently using it as my default player.

However: none of this can be done using a gui yet. This can all be done easily by using Exaile 0.3's pretty good looking internal API. Here is an example:

#!/usr/bin/env python

import exaile as ex
from xl.playlists import Playlist
from xl.collection import Library

ex.main()
exaile = ex.exaile

# scan my music directory
exaile.collection.add_library(Library("/home/synic/media/music"))
exaile.rescan_libraries()

# Create a playlist with the artist Thievery Corporation, but exclude anything
# from the Versions album

pl = Playlist()
tracks = exaile.collection.search('artist=="Thievery Corporation" NOT '
    'album="Versions"')

pl.add_tracks(tracks)
pl.toggle_random()  # I usually play my music on shuffle :)

exaile.queue.set_current_playlist(pl)
exaile.queue.next() # start playback of the playlist

# ok, let's quit.  This will save the collection to the database, settings,
# etc.
exaile.quit()

Developing this way will make it much easier to add a gui (or even more than one type of gui. Someone could create a wxPython gui while we're creating the familiar pygtk gui).

We're also adding a test suite which should make for stabler releases once the first 0.3 release is ready.

If you'd like to track the status of 0.3 developing, you can watch this file: PLANNING.

This is the planning document that we will be using until we're ready to start adding tickets to launchpad.

I'm excited, and if you're an Exaile fan, you should be too. Exaile 0.3 will be pretty awesome.

P.S. Thanks Aren :)

Restored from VimTips archive

This article was restored from the VimTips archive. There's probably missing images and broken links (and even some flash references), but it was still important to me to bring them back.


Filed Under: