Mapping the invidious API field to the view (#2483)

Added a line to map the field "authorId" to "channelId"
on the featured channels that come from the Invidious API
because the Channel view expects related channels to have
the property "channelId". This is related to FreeTubeApp#2481.
This commit is contained in:
MarmadileManteater 2022-08-15 19:14:59 -04:00 committed by GitHub
parent 3fb378a2be
commit 33cf88ce31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -414,7 +414,7 @@ export default Vue.extend({
this.channelDescription = autolinker.link(response.description)
this.relatedChannels = response.relatedChannels.map((channel) => {
channel.authorThumbnails[channel.authorThumbnails.length - 1].url = channel.authorThumbnails[channel.authorThumbnails.length - 1].url.replace('https://yt3.ggpht.com', `${this.currentInvidiousInstance}/ggpht/`)
channel.channelId = channel.authorId
return channel
})
this.latestVideos = response.latestVideos