From 7f025a6246052f28cf0c3b6ed42f2e0c38de6269 Mon Sep 17 00:00:00 2001 From: Simon Ding Date: Sun, 28 Jul 2024 15:54:51 +0800 Subject: [PATCH] fix: bugs --- db/db.go | 2 +- ui/lib/settings.dart | 2 +- ui/lib/tv_details.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/db.go b/db/db.go index eabe43d..78ed934 100644 --- a/db/db.go +++ b/db/db.go @@ -56,7 +56,7 @@ func (c *Client) init() { downloadDir := c.GetSetting(SettingDownloadDir) if downloadDir == "" { log.Infof("set default download dir") - c.SetSetting(downloadDir, "/downloads") + c.SetSetting(SettingDownloadDir, "/downloads") } logLevel := c.GetSetting(SettingLogLevel) if logLevel == "" { diff --git a/ui/lib/settings.dart b/ui/lib/settings.dart index 3473f11..c31ed65 100644 --- a/ui/lib/settings.dart +++ b/ui/lib/settings.dart @@ -564,7 +564,7 @@ class _SystemSettingsPageState extends ConsumerState { "user": values["user"], "password": values["password"], "change_file_hash": - values["change_file_hash"] as bool ? "true" : "false" + (values["change_file_hash"]??false) as bool ? "true" : "false" }, )); } else { diff --git a/ui/lib/tv_details.dart b/ui/lib/tv_details.dart index 8b1635c..385f3dc 100644 --- a/ui/lib/tv_details.dart +++ b/ui/lib/tv_details.dart @@ -271,7 +271,7 @@ class _TvDetailsPageState extends ConsumerState { data: (v) { return SingleChildScrollView( child: DataTable( - dataTextStyle: TextStyle(fontSize: 12, height: 0), + dataTextStyle: const TextStyle(fontSize: 12, height: 0), columns: const [ DataColumn(label: Text("名称")), DataColumn(label: Text("大小")),