Skip to content

Commit

Permalink
channel loading fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mcrich23 authored and b5i committed Feb 12, 2024
1 parent 99d94c6 commit bb04363
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions Sources/YouTubeKit/BaseStructs/YTVideo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ public struct YTVideo: YTSearchResult, YouTubeVideo, Codable {
var channel = YTLittleChannelInfos(channelId: channelId, name: json["longBylineText"]["runs"][0]["text"].string)
YTThumbnail.appendThumbnails(json: json["channelThumbnailSupportedRenderers"]["channelThumbnailWithLinkRenderer"]["thumbnail"], thumbnailList: &channel.thumbnails)

video.channel = channel
} else if let channelId = json["shortBylineText"]["runs"][0]["navigationEndpoint"]["browseEndpoint"]["browseId"].string {
var channel = YTLittleChannelInfos(channelId: channelId, name: json["shortBylineText"]["runs"][0]["text"].string)
YTThumbnail.appendThumbnails(json: json["channelThumbnailSupportedRenderers"]["channelThumbnailWithLinkRenderer"]["thumbnail"], thumbnailList: &channel.thumbnails)

video.channel = channel
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,6 @@ public struct MoreVideoInfosResponse: YouTubeResponse {

return toReturn
}

public init() {}

public init(continuationToken: String?) {
self.continuationToken = continuationToken
}
}

/// Struct representing the data about the video that concerns the account that was used to make the requests (the cookies).
Expand Down

0 comments on commit bb04363

Please sign in to comment.