Fix for loading subscriptions

This commit is contained in:
Arkadiusz Fal
2021-09-19 19:31:21 +02:00
parent bede29dd51
commit 433725c5e8
5 changed files with 21 additions and 4 deletions

View File

@@ -30,11 +30,12 @@ final class InvidiousAPI: Service {
$0.pipeline[.parsing].add(SwiftyJSONTransformer, contentTypes: ["*/json"])
}
configure("/auth/**") {
configure(requestMethods: [.get]) {
$0.headers["Cookie"] = self.authHeader
}
configure("**", requestMethods: [.post]) {
$0.headers["Cookie"] = self.authHeader
$0.pipeline[.parsing].removeTransformers()
}
@@ -108,6 +109,10 @@ final class InvidiousAPI: Service {
.withParam("region", country.rawValue)
}
var home: Resource {
resource(baseURL: InvidiousAPI.instance, path: "/feed/subscriptions")
}
var feed: Resource {
resource("/auth/feed")
}

View File

@@ -6,7 +6,6 @@ struct Profile {
var skippedSegmentsCategories = [String]() // SponsorBlockSegmentsProvider.categories
// var sid = "B3_WzklziGu8JKefihLrCsTNavdj73KMiPUBfN5HW2M="
var sid = "RpoS7YPPK2-QS81jJF9z4KSQAjmzsOnMpn84c73-GQ8="
var cellsColumns = 3