Commit daed9b089b

daed9b089ba25c514b9d19bf7cb26244ff68692e

parent: b7af68d3c9

Unsigned

Wraient <wraient.911@gmail.com> · 2024-12-18 15:06 UTC

fix: new episode prompt is a menu instead of input feild

Layout: unified · split

cmd/curd/main.go +11 −11
@@ -469,20 +469,20 @@ func main() {
469 } 469 }
470 470
471 if userCurdConfig.NextEpisodePrompt { 471 if userCurdConfig.NextEpisodePrompt {
472 var answer string 472 options := map[string]string{
473 if userCurdConfig.RofiSelection { 473 "yes": "Yes",
474 answer, err = internal.GetUserInputFromRofi("Start next episode? (yes/no)") 474 "no": "No",
475 if err != nil {
476 internal.ExitCurd(err)
477 }
478 } else {
479 fmt.Println("Start next episode? (yes/no)")
480 fmt.Scanln(&answer)
481 } 475 }
482 if answer == "y" || answer == "Y" || answer == "yes" || answer == "Yes" || answer == "YES" || answer == "" { 476
483 } else { 477 selectedOption, err := internal.DynamicSelect(options, false)
478 if err != nil {
479 internal.ExitCurd(err)
480 }
481
482 if selectedOption.Key == "no" || selectedOption.Key == "-1" {
484 internal.ExitCurd(nil) 483 internal.ExitCurd(nil)
485 } 484 }
485 // If yes or any other case, continue with the next episode
486 } 486 }
487 487
488 internal.CurdOut(fmt.Sprint("Starting next episode: ", anime.Ep.Number)) 488 internal.CurdOut(fmt.Sprint("Starting next episode: ", anime.Ep.Number))