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```
358| `Player` | String | `mpv` (redundant rn) | Specifies the media player used for streaming or playing anime. | 358| `Player` | String | `mpv` (redundant rn) | Specifies the media player used for streaming or playing anime. |
359| `SaveMpvSpeed` | Boolean | `true`, `false` | Retains the playback speed set in MPV for next episode. | 359| `SaveMpvSpeed` | Boolean | `true`, `false` | Retains the playback speed set in MPV for next episode. |
360| `SkipFiller` | Boolean | `true`, `false` | Skips filler episodes when supported. | 360| `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` |
361 362
362## Todo (fix) 363## Todo (fix)
363- Use Powershell for windows token input instead of notepad or cmd 364- 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 {
574} 574}
575 575
576func getOrderedCategories(userCurdConfig *CurdConfig) []SelectionOption { 576func getOrderedCategories(userCurdConfig *CurdConfig) []SelectionOption {
577 // Define the default categories and their labels 577 // Define the default categories and all available labels
578 defaultOrder := []string{"CURRENT", "ALL", "UNTRACKED", "UPDATE", "CONTINUE_LAST"} 578 defaultOrder := []string{"CURRENT", "ALL", "UNTRACKED", "UPDATE", "CONTINUE_LAST"}
579 defaultLabels := map[string]string{ 579 availableLabels := map[string]string{
580 "CURRENT": "Currently Watching", 580 "CURRENT": "Currently Watching",
581 "ALL": "Show All", 581 "ALL": "Show All",
582 "UNTRACKED": "Untracked Watching", 582 "UNTRACKED": "Untracked Watching",
583 "UPDATE": "Update (Episode, Status, Score)", 583 "UPDATE": "Update (Episode, Status, Score)",
584 "CONTINUE_LAST": "Continue Last Session", 584 "CONTINUE_LAST": "Continue Last Session",
585 "PLANNING": "Plan to Watch",
586 "COMPLETED": "Completed",
587 "PAUSED": "Paused",
588 "DROPPED": "Dropped",
589 "REWATCHING": "Rewatching",
585 } 590 }
586 591
587 // Create ordered list to store final result 592 // Create ordered list to store final result
@@ -592,19 +597,11 @@ func getOrderedCategories(userCurdConfig *CurdConfig) []SelectionOption {
592 if userCurdConfig.MenuOrder == "" { 597 if userCurdConfig.MenuOrder == "" {
593 finalOrder = defaultOrder 598 finalOrder = defaultOrder
594 } else { 599 } else {
595 // First, process user-specified order 600 // Only show items explicitly specified by user
596 menuItems := strings.Split(userCurdConfig.MenuOrder, ",") 601 menuItems := strings.Split(userCurdConfig.MenuOrder, ",")
597 for _, key := range menuItems { 602 for _, key := range menuItems {
598 key = strings.TrimSpace(key) 603 key = strings.TrimSpace(key)
599 if _, exists := defaultLabels[key]; exists && !seen[key] { 604 if _, exists := availableLabels[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] {
608 finalOrder = append(finalOrder, key) 605 finalOrder = append(finalOrder, key)
609 seen[key] = true 606 seen[key] = true
610 } 607 }
@@ -616,7 +613,7 @@ func getOrderedCategories(userCurdConfig *CurdConfig) []SelectionOption {
616 for _, key := range finalOrder { 613 for _, key := range finalOrder {
617 orderedCategories = append(orderedCategories, SelectionOption{ 614 orderedCategories = append(orderedCategories, SelectionOption{
618 Key: key, 615 Key: key,
619 Label: defaultLabels[key], 616 Label: availableLabels[key],
620 }) 617 })
621 } 618 }
622 619