~gawhelan/exaile/DBus-enqueue

« back to all changes in this revision

Viewing changes to xl/xldbus.py

  • Committer: Graham Whelan
  • Date: 2009-03-27 14:06:43 UTC
  • Revision ID: gawhelan@gmail.com-20090327140643-wmt2smlejapv8h1i
Changed command line to accept a newline-separated list of files rather than a null-separated list

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
            # Assume that args are files to be added to the current playlist.
43
43
            # This enables:    exaile PATH/*.mp3
44
44
            if args:
45
 
                # if '-' is the first argument then we look for a null 
 
45
                # if '-' is the first argument then we look for a newline 
46
46
                # separated list of filenames from stdin.
47
 
                # This enables:    find PATH -name *.mp3 -print0 | exaile -
 
47
                # This enables:    find PATH -name *.mp3 | exaile -
48
48
                if args[0] == '-':
49
 
                    args = sys.stdin.read().split('\0')
 
49
                    args = sys.stdin.read().split('\n')
50
50
                iface.enqueue(args)
51
51
                do_exit = True
52
52