Changeset 15 for mpd-status/trunk/mpd-status.py
- Timestamp:
- Nov 9, 2005, 2:14:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mpd-status/trunk/mpd-status.py
r14 r15 24 24 'status', 'pnum', 'time', 'percent' 25 25 ] 26 cmd = [ 'mpc','--format', 27 '"[%artist% - ]::[%album% - ]::[%track% - ]::[%title%]::[%time%]::[%file%]"'] 26 delim = '::' 27 format = delim.join([ 28 "[%artist% - ]", "[%album% - ]", "[%track% - ]", 29 "[%title%]", "[%time%]", "[%file%]" 30 ]) 31 cmd = ['mpc', '--format', format] 28 32 29 33 lines = Popen(cmd, stdout=PIPE).communicate()[0].split('\n') … … 34 38 map( 35 39 lambda s: s.strip('\"'), 36 lines[0].split( '::') + lines[1].split()40 lines[0].split(delim) + lines[1].split() 37 41 ) 38 42 ))
Note: See TracChangeset
for help on using the changeset viewer.