diff --git a/src/providers/noodlemagazine.rs b/src/providers/noodlemagazine.rs index 138237e..f855e09 100644 --- a/src/providers/noodlemagazine.rs +++ b/src/providers/noodlemagazine.rs @@ -74,10 +74,6 @@ impl NoodlemagazineProvider { id: "month".into(), title: "This Month".into(), }, - FilterOption { - id: "all".into(), - title: "All Time".into(), - }, ], multiSelect: false, }, @@ -131,7 +127,9 @@ impl NoodlemagazineProvider { match options.category.as_deref() { Some("week") => "week", Some("month") => "month", - Some("all") => "all", + // The upstream site does not expose a valid /popular/all route. + // Keep "all" as a backward-compatible alias for stale clients. + Some("all") => "recent", _ => "recent", } } @@ -760,4 +758,14 @@ mod tests { assert_eq!(NoodlemagazineProvider::resolve_sort_by("views", &options), "date"); assert_eq!(NoodlemagazineProvider::resolve_sort_order(&options), "asc"); } + + #[test] + fn maps_legacy_all_time_period_to_recent_feed() { + let mut options = options(); + options.category = Some("all".to_string()); + options.sort = Some("views".to_string()); + options.filter = Some("desc".to_string()); + + assert_eq!(NoodlemagazineProvider::resolve_popular_period(&options), "recent"); + } }