Fix lint issues

This commit is contained in:
Arkadiusz Fal
2023-06-17 14:09:51 +02:00
parent b12933e61d
commit e827b97cd5
40 changed files with 130 additions and 101 deletions

View File

@@ -65,9 +65,11 @@ final class InvidiousAPI: Service, ObservableObject, VideosAPI {
if type == "channel" {
return ContentItem(channel: self.extractChannel(from: json))
} else if type == "playlist" {
}
if type == "playlist" {
return ContentItem(playlist: self.extractChannelPlaylist(from: json))
} else if type == "video" {
}
if type == "video" {
return ContentItem(video: self.extractVideo(from: json))
}
@@ -724,9 +726,11 @@ final class InvidiousAPI: Service, ObservableObject, VideosAPI {
if type == "channel" {
return ContentItem(channel: extractChannel(from: json))
} else if type == "playlist" {
}
if type == "playlist" {
return ContentItem(playlist: extractChannelPlaylist(from: json))
} else if type == "video" {
}
if type == "video" {
return ContentItem(video: extractVideo(from: json))
}

View File

@@ -392,7 +392,7 @@ final class PeerTubeAPI: Service, ObservableObject, VideosAPI {
}
func search(_ query: SearchQuery, page _: String?) -> Resource {
var resource = resource(baseURL: account.url, path: basePathAppending("search/videos"))
resource(baseURL: account.url, path: basePathAppending("search/videos"))
.withParam("search", query.query)
// .withParam("sort_by", query.sortBy.parameter)
// .withParam("type", "all")
@@ -409,7 +409,7 @@ final class PeerTubeAPI: Service, ObservableObject, VideosAPI {
// resource = resource.withParam("page", page)
// }
return resource
// return resource
}
func searchSuggestions(query: String) -> Resource {