Files
phat-beat/test.py
Jérémie Ducastel d1c586cd25 adding test
2021-01-01 17:11:07 +00:00

16 lines
386 B
Python

import vlc, phatbeat
music_dir = '/home/jducastel/music/'
class player():
__init__(self, folder):
# get list of files in music_dir
self.files = [ f for f in os.listdir(folder) if os.path.isfile(os.path.join(music_dir,f)) and f.endswith('.mp3') ]
def play_all(self):
for song in self.files:
p = vlc.MediaPlayer(file)
p.play()