backend: store file_size_unit in user config, #886

This commit is contained in:
Simon 2025-03-15 13:59:49 +01:00
parent 677f85b993
commit 9f351b5907
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
2 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,7 @@ class UserMeConfigSerializer(serializers.Serializer):
view_style_playlist = serializers.ChoiceField(choices=["grid", "list"])
grid_items = serializers.IntegerField(max_value=7, min_value=3)
hide_watched = serializers.BooleanField()
file_size_unit = serializers.ChoiceField(choices=["binary", "metric"])
show_ignored_only = serializers.BooleanField()
show_subed_only = serializers.BooleanField()
show_help_text = serializers.BooleanField()

View File

@ -22,6 +22,7 @@ class UserConfigType(TypedDict, total=False):
view_style_playlist: str
grid_items: int
hide_watched: bool
file_size_unit: str
show_ignored_only: bool
show_subed_only: bool
show_help_text: bool
@ -44,6 +45,7 @@ class UserConfig:
view_style_playlist="grid",
grid_items=3,
hide_watched=False,
file_size_unit="binary",
show_ignored_only=False,
show_subed_only=False,
show_help_text=True,