Beispiel #1
0
class RandomFileQueueGen:
    randomQuality = 0.5

    def __init__(self, dir):
        import os
        from RandomFileQueue import RandomFileQueue

        self.fileQueue = RandomFileQueue(rootdir=os.path.expanduser(dir),
                                         fileexts=appinfo.formats)

    def next(self):
        return self.fileQueue.getNextFile()
Beispiel #2
0
class RandomFileQueueGen:
	randomQuality = 0.5

	def __init__(self, dir):
		import os
		from RandomFileQueue import RandomFileQueue

		self.fileQueue = RandomFileQueue(
			rootdir=os.path.expanduser(dir),
			fileexts=appinfo.formats)

	def next(self):
		return self.fileQueue.getNextFile()
Beispiel #3
0
	def songs():
		if state.curSong:
			# We just started the player and we have a current song from persistant storage.
			# Yield it now so that we begin playing with this song.
			yield state.curSong
		import os
		from RandomFileQueue import RandomFileQueue
		fileQueue = RandomFileQueue(
			rootdir = os.path.expanduser("~/Music"),
			fileexts = ["mp3", "ogg", "flac", "wma"])
		while True:
			f = fileQueue.getNextFile()
			yield Song(f)
def getFileList(n):
    from RandomFileQueue import RandomFileQueue
    fileQueue = RandomFileQueue(rootdir=os.path.expanduser("~/Music"),
                                fileexts=["mp3", "ogg", "flac", "wma"])
    return [fileQueue.getNextFile() for i in xrange(n)]
def getFileList(n):
	from RandomFileQueue import RandomFileQueue
	fileQueue = RandomFileQueue(
		rootdir=os.path.expanduser("~/Music"),
		fileexts=["mp3", "ogg", "flac", "wma"])
	return [fileQueue.getNextFile() for i in xrange(n)]