Commit 2e6bc671f0

2e6bc671f0101ebda6e04da933f2cffb59dcecda

parent: 864a792746

Unsigned

Wraient <wraient.911@gmail.com> · 2026-01-01 22:40 UTC

Fix: MenuOrder shows everything explicitly listed only.

Layout: unified · split

README.md +1
@@ -358,6 +358,7 @@ config file is located at ```~/.config/curd/curd.conf```
358358| `Player` | String | `mpv` (redundant rn) | Specifies the media player used for streaming or playing anime. |
359359| `SaveMpvSpeed` | Boolean | `true`, `false` | Retains the playback speed set in MPV for next episode. |
360360| `SkipFiller` | Boolean | `true`, `false` | Skips filler episodes when supported. |
361| `MenuOrder` | String | Comma-separated list | Controls which menu items appear and their order. Available options: `CURRENT`, `ALL`, `UNTRACKED`, `UPDATE`, `CONTINUE_LAST`, `PLANNING`, `COMPLETED`, `PAUSED`, `DROPPED`, `REWATCHING`. Only listed items will be shown. Default: `CURRENT,ALL,UNTRACKED,UPDATE,CONTINUE_LAST` |
361362
362363## Todo (fix)
363364- Use Powershell for windows token input instead of notepad or cmd
internal/config.go +10 −13
@@ -574,14 +574,19 @@ func PopulateConfig(configMap map[string]string) CurdConfig {
574574}
575575
576576func getOrderedCategories(userCurdConfig *CurdConfig) []SelectionOption {
577 // Define the default categories and their labels
577 // Define the default categories and all available labels
578578 defaultOrder := []string{"CURRENT", "ALL", "UNTRACKED", "UPDATE", "CONTINUE_LAST"}
579 defaultLabels := map[string]string{
579 availableLabels := map[string]string{
580580 "CURRENT": "Currently Watching",
581581 "ALL": "Show All",
582582 "UNTRACKED": "Untracked Watching",
583583 "UPDATE": "Update (Episode, Status, Score)",
584584 "CONTINUE_LAST": "Continue Last Session",
585 "PLANNING": "Plan to Watch",
586 "COMPLETED": "Completed",
587 "PAUSED": "Paused",
588 "DROPPED": "Dropped",
589 "REWATCHING": "Rewatching",
585590 }
586591
587592 // Create ordered list to store final result
@@ -592,19 +597,11 @@ func getOrderedCategories(userCurdConfig *CurdConfig) []SelectionOption {
592597 if userCurdConfig.MenuOrder == "" {
593598 finalOrder = defaultOrder
594599 } else {
595 // First, process user-specified order
600 // Only show items explicitly specified by user
596601 menuItems := strings.Split(userCurdConfig.MenuOrder, ",")
597602 for _, key := range menuItems {
598603 key = strings.TrimSpace(key)
599 if _, exists := defaultLabels[key]; exists && !seen[key] {
600 finalOrder = append(finalOrder, key)
601 seen[key] = true
602 }
603 }
604
605 // Add remaining default items at the end
606 for _, key := range defaultOrder {
607 if !seen[key] {
604 if _, exists := availableLabels[key]; exists && !seen[key] {
608605 finalOrder = append(finalOrder, key)
609606 seen[key] = true
610607 }
@@ -616,7 +613,7 @@ func getOrderedCategories(userCurdConfig *CurdConfig) []SelectionOption {
616613 for _, key := range finalOrder {
617614 orderedCategories = append(orderedCategories, SelectionOption{
618615 Key: key,
619 Label: defaultLabels[key],
616 Label: availableLabels[key],
620617 })
621618 }
622619