Make music directory configurable in development

This commit is contained in:
Eliot Berriot 2018-04-21 16:02:56 +02:00
parent 1672230f39
commit 3f3d6d88d6
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
3 changed files with 12 additions and 9 deletions

View file

@ -2,12 +2,14 @@ import acoustid
import os
import datetime
from django.core.files import File
from django.db import transaction
from funkwhale_api.taskapp import celery
from funkwhale_api.providers.acoustid import get_acoustid_client
from funkwhale_api.music import models, metadata
@transaction.atomic
def import_track_data_from_path(path):
data = metadata.Metadata(path)
artist = models.Artist.objects.get_or_create(
@ -45,6 +47,7 @@ def import_track_data_from_path(path):
def import_metadata_with_musicbrainz(path):
pass
@celery.app.task(name='audiofile.from_path')
def from_path(path):
acoustid_track_id = None