From 5b0b2ce5b04d34298355542eb14d87d987e621dd Mon Sep 17 00:00:00 2001 From: Simon Ding Date: Fri, 2 Aug 2024 14:39:01 +0800 Subject: [PATCH] fix: status --- server/watchlist.go | 6 +++--- ui/lib/welcome_page.dart | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/watchlist.go b/server/watchlist.go index 2ecd6e8..fb5598b 100644 --- a/server/watchlist.go +++ b/server/watchlist.go @@ -291,9 +291,9 @@ func (s *Server) GetTvWatchlist(c *gin.Context) (interface{}, error) { for _, ep := range details.Episodes { if ep.Monitored { ms.MonitoredNum++ - } - if ep.Status == episode.StatusDownloaded { - ms.DownloadedNum++ + if ep.Status == episode.StatusDownloaded { + ms.DownloadedNum++ + } } } res[i] = ms diff --git a/ui/lib/welcome_page.dart b/ui/lib/welcome_page.dart index 9e966de..2eb1e89 100644 --- a/ui/lib/welcome_page.dart +++ b/ui/lib/welcome_page.dart @@ -70,8 +70,8 @@ class WelcomePage extends ConsumerWidget { children: [ LinearProgressIndicator( value: 1, - color: item.downloadedNum == - item.monitoredNum + color: item.downloadedNum! >= + item.monitoredNum! ? Colors.green : Colors.blue, ),