Merge pull request #3 from navanchauhan/navanchauhan-patch-1

Fix for #2
This commit is contained in:
Navan Chauhan 2020-03-31 17:04:31 +05:30 committed by GitHub
commit c08879c25a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,8 @@ import subprocess
import re import re
from random import randint from random import randint
from sys import platform
import logzero import logzero
from logzero import logger from logzero import logger
from logzero import setup_logger from logzero import setup_logger
@ -49,7 +51,7 @@ class VaporSong:
# TODO: Move away from executable and use aubio's Python module # TODO: Move away from executable and use aubio's Python module
def fetchbeats(src): def fetchbeats(src):
beat_matrix = [] beat_matrix = []
if os.name == 'posix': if platform == 'darwin':
beats = subprocess.check_output(["noah", "get-beats",src]).rstrip() beats = subprocess.check_output(["noah", "get-beats",src]).rstrip()
else: else:
beats = subprocess.check_output(["get-beats",src]).rstrip() beats = subprocess.check_output(["get-beats",src]).rstrip()