adding test

This commit is contained in:
Jérémie Ducastel
2021-01-01 17:11:07 +00:00
parent 4ce901dcb4
commit d1c586cd25

15
test.py Normal file
View File

@ -0,0 +1,15 @@
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()