diff --git a/Model/Applications/InvidiousAPI.swift b/Model/Applications/InvidiousAPI.swift index fd444542..b5c28b9d 100644 --- a/Model/Applications/InvidiousAPI.swift +++ b/Model/Applications/InvidiousAPI.swift @@ -236,7 +236,7 @@ final class InvidiousAPI: Service, ObservableObject, VideosAPI { func trending(country: Country, category: TrendingCategory?) -> Resource { resource(baseURL: account.url, path: "\(Self.basePath)/trending") - .withParam("type", category?.name) + .withParam("type", category?.type) .withParam("region", country.rawValue) } diff --git a/Model/TrendingCategory.swift b/Model/TrendingCategory.swift index 4cf0bc15..6f18506e 100644 --- a/Model/TrendingCategory.swift +++ b/Model/TrendingCategory.swift @@ -41,4 +41,8 @@ enum TrendingCategory: String, CaseIterable, Identifiable, Defaults.Serializable var controlLabel: String { id == "default" ? "All".localized() : title } + + var type: String { + rawValue.capitalized + } }