Commit 37b1bd758d

37b1bd758d367022f1ebb4804c19fd322918f4bb

parent: f0da96f46b

Unsigned

Wraient <wraient.911@gmail.com> · 2026-04-07 17:28 UTC

add: manual searching for animes not found

Layout: unified · split

Build/curd-windows-build.iss +1 −1
@@ -1,6 +1,6 @@
11[Setup]
22AppName=Curd Installer
3AppVersion=1.2.1
3AppVersion=1.2.2
44DefaultDirName={userappdata}\Curd
55PrivilegesRequired=lowest
66AllowNoIcons=yes
VERSION.txt +1 −1
@@ -1 +1 @@
11.2.1
\ No newline at end of file
11.2.3
cmd/curd/main.go +1 −1
@@ -86,7 +86,7 @@ func main() {
8686 if *versionFlag {
8787 internal.RestoreScreen()
8888 if version == "" {
89 version = "1.2.1"
89 version = "1.2.3"
9090 }
9191 fmt.Printf("Curd version: %s\n", version)
9292 os.Exit(0)
internal/curd.go +32 −2
@@ -1021,8 +1021,38 @@ func SetupCurd(userCurdConfig *CurdConfig, anime *Anime, user *User, databaseAni
10211021 Log(fmt.Sprintf("Failed to select anime: %v", err))
10221022 ExitCurd(fmt.Errorf("Failed to select anime"))
10231023 }
1024 if len(animeList) == 0 {
1025 ExitCurd(fmt.Errorf("No results found."))
1024 // Prompt user for manual query when no results found
1025 for {
1026 var manualQuery string
1027 if userCurdConfig.RofiSelection {
1028 userInput, err := GetUserInputFromRofi(fmt.Sprintf("No results found for '%s'.\nPress Enter to search with AniList name, or enter a custom name to search on AllAnime.", userQuery))
1029 if err != nil {
1030 Log("Error getting user input: " + err.Error())
1031 ExitCurd(fmt.Errorf("Error getting user input: " + err.Error()))
1032 }
1033 manualQuery = userInput
1034 } else {
1035 CurdOut(fmt.Sprintf("No results found for '%s'.", userQuery))
1036 CurdOut("Press Enter to search with AniList name, or enter a custom name to search on AllAnime:")
1037 reader := bufio.NewReader(os.Stdin)
1038 input, _ := reader.ReadString('\n')
1039 manualQuery = strings.TrimSpace(input)
1040 }
1041
1042 // If empty, use original AniList name
1043 if manualQuery == "" {
1044 manualQuery = string(userQuery)
1045 }
1046
1047 animeList, err = SearchAnime(manualQuery, userCurdConfig.SubOrDub)
1048 if err != nil {
1049 Log(fmt.Sprintf("Failed to search anime with query '%s': %v", manualQuery, err))
1050 ExitCurd(fmt.Errorf("Failed to search anime"))
1051 }
1052
1053 if len(animeList) > 0 {
1054 break
1055 }
10261056 }
10271057
10281058 // Automatic mapping using Thumbnail clues
internal/localTracking.go +35 −1
@@ -1,11 +1,13 @@
11package internal
22
33import (
4 "bufio"
45 "encoding/csv"
56 "fmt"
67 "os"
78 "path/filepath"
89 "strconv"
10 "strings"
911 "time"
1012)
1113
@@ -277,7 +279,39 @@ func WatchUntracked(userCurdConfig *CurdConfig) {
277279 }
278280
279281 if len(animeList) == 0 {
280 ExitCurd(fmt.Errorf("No results found."))
282 // Prompt user for manual query
283 for {
284 var manualQuery string
285 if userCurdConfig.RofiSelection {
286 userInput, err := GetUserInputFromRofi(fmt.Sprintf("No results found for '%s'.\nPress Enter to search with the original name, or enter a custom name to search on AllAnime.", query))
287 if err != nil {
288 Log("Error getting user input: " + err.Error())
289 ExitCurd(fmt.Errorf("Error getting user input: " + err.Error()))
290 }
291 manualQuery = userInput
292 } else {
293 CurdOut(fmt.Sprintf("No results found for '%s'.", query))
294 CurdOut("Press Enter to search with the original name, or enter a custom name to search on AllAnime:")
295 reader := bufio.NewReader(os.Stdin)
296 input, _ := reader.ReadString('\n')
297 manualQuery = strings.TrimSpace(input)
298 }
299
300 // If empty, use original query name
301 if manualQuery == "" {
302 manualQuery = query
303 }
304
305 animeList, err = SearchAnime(manualQuery, userCurdConfig.SubOrDub)
306 if err != nil {
307 Log(fmt.Sprintf("Failed to search anime with query '%s': %v", manualQuery, err))
308 ExitCurd(fmt.Errorf("Failed to search anime"))
309 }
310
311 if len(animeList) > 0 {
312 break
313 }
314 }
281315 }
282316
283317 // Select anime from search results