mirror of
https://github.com/yattee/yattee.git
synced 2024-11-09 15:58:20 +00:00
Fix Invidious trending categories
This commit is contained in:
parent
b1637c5ef1
commit
80a644eb7a
@ -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)
|
||||
}
|
||||
|
||||
|
@ -41,4 +41,8 @@ enum TrendingCategory: String, CaseIterable, Identifiable, Defaults.Serializable
|
||||
var controlLabel: String {
|
||||
id == "default" ? "All".localized() : title
|
||||
}
|
||||
|
||||
var type: String {
|
||||
rawValue.capitalized
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user