See #272: added preference and base logic for transcoding

This commit is contained in:
Eliot Berriot 2018-10-24 19:14:51 +02:00
parent baf5a350b3
commit 2fe1e7c950
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
6 changed files with 161 additions and 9 deletions

View 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