Mercurial > vixm
changeset 23:2efd6bbb1694
Implemented location command ('=')
author | Josef "Jeff" Sipek <jeffpc@josefsipek.net> |
---|---|
date | Sun, 20 Aug 2006 18:21:49 -0400 |
parents | ad17f7d6728f |
children | fa1fc0c70205 |
files | vixm/control.py vixm/ui.py |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/vixm/control.py Sun Aug 20 12:30:31 2006 -0400 +++ b/vixm/control.py Sun Aug 20 18:21:49 2006 -0400 @@ -155,3 +155,12 @@ os.system(args[0]) print "!" +def cmd_location(ui, start, stop, args): + """= + - Display information about currently playing song""" + pos = xmms.control.get_playlist_pos() + current = ui.lists[playlist.LIST_DEFAULT][pos] + + print "%d. %s (%s)" % (pos+1, current["title"], + util.strtime(current["time"])) +