Forked from
funkwhale / funkwhale
7240 commits behind the upstream repository.
-
Eliot Berriot authoredVerifiedc20e4d7c
dynamic_preferences_registry.py 674 B
from django.forms import widgets
from dynamic_preferences import types
from dynamic_preferences.registries import global_preferences_registry
federation = types.Section('federation')
@global_preferences_registry.register
class MusicCacheDuration(types.IntPreference):
show_in_api = True
section = federation
name = 'music_cache_duration'
default = 60 * 24 * 2
verbose_name = 'Music cache duration'
help_text = (
'How much minutes do you want to keep a copy of federated tracks'
'locally? Federated files that were not listened in this interval '
'will be erased and refetched from the remote on the next listening.'
)