mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 05:19:24 +02:00
Can now stream transcoded version of audio tracks \o/
This commit is contained in:
parent
ddea5f1825
commit
1cfdf31e00
2 changed files with 63 additions and 0 deletions
23
api/funkwhale_api/music/forms.py
Normal file
23
api/funkwhale_api/music/forms.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
from django import forms
|
||||
|
||||
from . import models
|
||||
|
||||
|
||||
class TranscodeForm(forms.Form):
|
||||
FORMAT_CHOICES = [
|
||||
('ogg', 'ogg'),
|
||||
('mp3', 'mp3'),
|
||||
]
|
||||
|
||||
to = forms.ChoiceField(choices=FORMAT_CHOICES)
|
||||
BITRATE_CHOICES = [
|
||||
(64, '64'),
|
||||
(128, '128'),
|
||||
(256, '256'),
|
||||
]
|
||||
bitrate = forms.ChoiceField(
|
||||
choices=BITRATE_CHOICES, required=False)
|
||||
|
||||
track_file = forms.ModelChoiceField(
|
||||
queryset=models.TrackFile.objects.all()
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue