mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 04:59:55 +02:00
See #272: added preference and base logic for transcoding
This commit is contained in:
parent
baf5a350b3
commit
2fe1e7c950
6 changed files with 161 additions and 9 deletions
19
api/funkwhale_api/music/dynamic_preferences_registry.py
Normal file
19
api/funkwhale_api/music/dynamic_preferences_registry.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from dynamic_preferences import types
|
||||
from dynamic_preferences.registries import global_preferences_registry
|
||||
|
||||
music = types.Section("music")
|
||||
|
||||
|
||||
@global_preferences_registry.register
|
||||
class MaxTracks(types.BooleanPreference):
|
||||
show_in_api = True
|
||||
section = music
|
||||
name = "transcoding_enabled"
|
||||
verbose_name = "Transcoding enabled"
|
||||
help_text = (
|
||||
"Enable transcoding of audio files in formats requested by the client. "
|
||||
"This is especially useful for devices that do not support formats "
|
||||
"such as Flac or Ogg, but the transcoding process will increase the "
|
||||
"load on the server."
|
||||
)
|
||||
default = True
|
Loading…
Add table
Add a link
Reference in a new issue