mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 11:19:15 +02:00
Started work on library scanning
This commit is contained in:
parent
472cc7e26a
commit
520fb9d078
9 changed files with 157 additions and 4 deletions
|
@ -4,6 +4,7 @@ from django.core.exceptions import ValidationError
|
|||
from django.contrib.postgres.fields import JSONField
|
||||
from django.contrib.contenttypes.fields import GenericForeignKey
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core.serializers.json import DjangoJSONEncoder
|
||||
|
||||
from funkwhale_api.music.models import Track
|
||||
|
||||
|
@ -23,7 +24,7 @@ class Radio(models.Model):
|
|||
creation_date = models.DateTimeField(default=timezone.now)
|
||||
is_public = models.BooleanField(default=False)
|
||||
version = models.PositiveIntegerField(default=0)
|
||||
config = JSONField()
|
||||
config = JSONField(encoder=DjangoJSONEncoder)
|
||||
|
||||
def get_candidates(self):
|
||||
return filters.run(self.config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue