mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
24 lines
835 B
Python
24 lines
835 B
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""
|
|
FreedomBox configuration form for MiniDLNA server.
|
|
"""
|
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from freedombox.modules.storage.forms import (DirectorySelectForm,
|
|
DirectoryValidator)
|
|
|
|
from . import SYSTEM_USER
|
|
|
|
|
|
class MiniDLNAServerForm(DirectorySelectForm):
|
|
"""MiniDLNA server configuration form."""
|
|
|
|
def __init__(self, *args, **kw):
|
|
validator = DirectoryValidator(username=SYSTEM_USER)
|
|
super().__init__(
|
|
title=_('Media Files Directory'), help_text=_(
|
|
'Directory that MiniDLNA Server will read for content. All '
|
|
'sub-directories of this will be also scanned for media files.'
|
|
), default='/var/lib/minidlna', validator=validator, *args, **kw)
|