mirror of
https://github.com/xhongc/music-tag-web.git
synced 2026-04-25 19:20:41 +08:00
18 lines
395 B
Python
18 lines
395 B
Python
import os
|
|
import sys
|
|
|
|
from django.conf import settings
|
|
|
|
if sys.platform == 'darwin':
|
|
os.environ["FPCALC"] = os.path.join(settings.BASE_DIR, "component", "mz", "fpcalc")
|
|
else:
|
|
os.environ["FPCALC"] = os.path.join(settings.BASE_DIR, "component", "mz", "fpcalc_linux")
|
|
|
|
from component.mz import acoustid
|
|
|
|
apikey = "cSpUJKpD"
|
|
|
|
|
|
def get_acoustid(path):
|
|
return acoustid.match(apikey, path)
|