Changeset 29
- Timestamp:
- Feb 17, 2007, 4:34:06 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mpd-status/trunk/mpd-status.py
r28 r29 27 27 } 28 28 fields = ['artist', 'album', 'track', 'title'] 29 format = '♫ %(state)s: %(song)s'30 29 strip_paths = [ 31 30 'albums', … … 46 45 ' - '.join([song[f] for f in fields if song.has_key(f)]) \ 47 46 or strip_expr.sub('', splitext(song['file'])[0]).replace(sep, ' - ') 48 return format %songinfo47 return songinfo 49 48 50 49 if __name__ == '__main__': 51 50 from mpdclient2 import connect 52 print get_status(connect()) 51 format = '♫ %(state)s: %(song)s' 52 print format % get_status(connect())
Note: See TracChangeset
for help on using the changeset viewer.