From 50c0860b9beffa64b3d616d34c8cc94827a9aff4 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Wed, 25 May 2022 10:09:00 +0300 Subject: [PATCH] add DLNA server name and debug log options to web --- server/dlna/dlna.go | 5 +++++ server/settings/btsets.go | 3 ++- .../Settings/SecondarySettingsComponent.jsx | 18 ++++++++++++++++++ web/src/components/Settings/SettingsDialog.jsx | 2 +- web/src/components/Settings/defaultSettings.js | 1 + web/src/locales/en/translation.json | 3 +++ web/src/locales/ru/translation.json | 3 +++ web/src/locales/ua/translation.json | 3 +++ 8 files changed, 36 insertions(+), 2 deletions(-) diff --git a/server/dlna/dlna.go b/server/dlna/dlna.go index 6c45aea..59a033e 100644 --- a/server/dlna/dlna.go +++ b/server/dlna/dlna.go @@ -140,6 +140,11 @@ func onBrowseMeta(path string, rootObjectPath string, host, userAgent string) (r func getDefaultFriendlyName() string { logger := log.Default.WithNames("dlna") + + if settings.BTsets.FriendlyName != "" { + return settings.BTsets.FriendlyName + } + ret := "TorrServer" userName := "" user, err := user.Current() diff --git a/server/settings/btsets.go b/server/settings/btsets.go index 68a6008..bad2116 100644 --- a/server/settings/btsets.go +++ b/server/settings/btsets.go @@ -28,7 +28,8 @@ type BTSets struct { EnableDebug bool // print logs // DLNA - EnableDLNA bool + EnableDLNA bool + FriendlyName string // BT Config EnableIPv6 bool diff --git a/web/src/components/Settings/SecondarySettingsComponent.jsx b/web/src/components/Settings/SecondarySettingsComponent.jsx index 8f977a7..56d2638 100644 --- a/web/src/components/Settings/SecondarySettingsComponent.jsx +++ b/web/src/components/Settings/SecondarySettingsComponent.jsx @@ -10,8 +10,10 @@ export default function SecondarySettingsComponent({ settings, inputForm }) { const { RetrackersMode, TorrentDisconnectTimeout, + EnableDebug, EnableDLNA, EnableIPv6, + FriendlyName, ForceEncrypt, DisableTCP, DisableUTP, @@ -139,6 +141,22 @@ export default function SecondarySettingsComponent({ settings, inputForm }) { label={t('SettingsDialog.DLNA')} labelPlacement='start' /> + + } + label={t('SettingsDialog.EnableDebug')} + labelPlacement='start' + />
{t('SettingsDialog.RetrackersMode')}