From ad5f4a3cd2d6acbb98bd242de71f066a80015a3c Mon Sep 17 00:00:00 2001 From: 5rahim Date: Mon, 18 Nov 2024 11:55:02 +0000 Subject: [PATCH] update --- README.md | 4 +++- internal/constants/constants.go | 5 ++--- internal/core/tui.go | 3 +-- internal/updater/download_test.go | 2 +- internal/updater/updater_test.go | 21 +++++++++++++++++++++ 5 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 internal/updater/updater_test.go diff --git a/README.md b/README.md index 959a753d..16b935cc 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Seanime is a **media server** with a web interface for watching anime, reading m - Offline mode with caching for metadata, images - Scan your local library in seconds, no renaming needed - Torrent search engine with support for Nyaa, Anime Tosho, SeaDex & extensions -- Support for qBittorrent, Transmission, Torbox, Real-Debrid for downloading +- Support for qBittorrent, Transmission, Torbox or Real-Debrid for downloading - Auto-downloading for new episodes with custom filters - MPV, VLC, MPC-HC, and mobile player app support for watching - Transcoding and direct play for streaming to any device web browser @@ -42,6 +42,8 @@ Seanime is a **media server** with a web interface for watching anime, reading m - Online streaming with support for multiple sources & extensions - Read and download manga chapters with support for multiple sources & extensions - Extension system for adding new sources +- Schedule for tracking upcoming or missed episodes +- Customizable UI - More... ## Get started diff --git a/internal/constants/constants.go b/internal/constants/constants.go index 8e1195f8..df3429a1 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -3,9 +3,8 @@ package constants import "time" const ( - Version = "2.3.0" - VersionName = "Sangatsu" - //VersionName = "Aoi" // 2.3.0 + Version = "2.3.0" + VersionName = "Ao" GcTime = time.Minute * 30 ConfigFileName = "config.toml" MalClientId = "51cb4294feb400f3ddc66a30f9b9a00f" diff --git a/internal/core/tui.go b/internal/core/tui.go index 9b224d95..2fe61c29 100644 --- a/internal/core/tui.go +++ b/internal/core/tui.go @@ -41,8 +41,7 @@ func PrintHeader() { var ( title strings.Builder titles = []string{"Seanime", constants.Version, constants.VersionName} - //colors = []string{"#5243cb", "#5243cb", "#2b6ec7", "#14F9D5"} - colors = []string{"#5243cb", "#5243cb", "#c76b44", "#14F9D5"} + colors = []string{"#5243cb", "#5243cb", "#2b6ec7", "#14F9D5"} ) for i, v := range titles { diff --git a/internal/updater/download_test.go b/internal/updater/download_test.go index 4ac0af9c..62024d43 100644 --- a/internal/updater/download_test.go +++ b/internal/updater/download_test.go @@ -10,7 +10,7 @@ import ( func TestUpdater_DownloadLatestRelease(t *testing.T) { - updater := New("0.2.0", util.NewLogger()) + updater := New("0.2.0", util.NewLogger(), nil) //tempDir := "E:\\SEANIME-REPO-TEST" tempDir := t.TempDir() diff --git a/internal/updater/updater_test.go b/internal/updater/updater_test.go new file mode 100644 index 00000000..fda3fec8 --- /dev/null +++ b/internal/updater/updater_test.go @@ -0,0 +1,21 @@ +package updater + +import ( + "github.com/stretchr/testify/require" + "seanime/internal/util" + "testing" +) + +func TestUpdater_GetLatestUpdate(t *testing.T) { + + docsUrl = "https://seanime.rahim.app/api/releases" // simulate dead endpoint + + u := New("2.0.2", util.NewLogger(), nil) + + update, err := u.GetLatestUpdate() + require.NoError(t, err) + + require.NotNil(t, update) + + util.Spew(update) +}