Commits

Anonymous committed 65cd6ac

babplay_randomly: Check after each 100 bacth of files, if there are new files in the given dirs and add these.

  • Participants
  • Parent commits 482e56e

Comments (0)

Files changed (1)

babplay_randomly.py

     # now call mplayer for each batch of 100 (bash-)escaped filename. 
     for i in range(len(files)/100 +1 ):
 	call(MPLAYER + [j.encode("string-escape") for j in files[i:]])
+	# and check, if we have new files.
+	refiles = replace_dirs_with_their_contents(argv[1:])
+	# filter existing files
+	refiles = [f for f in refiles if f not in files]
+	files.extend(refiles)
 
     # That should have done it.