mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Fix invalid remote podcast feed
We don't have their local channel id
This commit is contained in:
parent
9754a08759
commit
73c6e9e094
1 changed files with 3 additions and 5 deletions
|
@ -2,7 +2,7 @@ import { getChannelPodcastFeed } from '@peertube/peertube-core-utils'
|
||||||
import { VideoIncludeType } from '@peertube/peertube-models'
|
import { VideoIncludeType } from '@peertube/peertube-models'
|
||||||
import { mdToPlainText, toSafeHtml } from '@server/helpers/markdown.js'
|
import { mdToPlainText, toSafeHtml } from '@server/helpers/markdown.js'
|
||||||
import { CONFIG } from '@server/initializers/config.js'
|
import { CONFIG } from '@server/initializers/config.js'
|
||||||
import { REMOTE_SCHEME, WEBSERVER } from '@server/initializers/constants.js'
|
import { WEBSERVER } from '@server/initializers/constants.js'
|
||||||
import { getServerActor } from '@server/models/application/application.js'
|
import { getServerActor } from '@server/models/application/application.js'
|
||||||
import { getCategoryLabel } from '@server/models/video/formatter/index.js'
|
import { getCategoryLabel } from '@server/models/video/formatter/index.js'
|
||||||
import { DisplayOnlyForFollowerOptions } from '@server/models/video/sql/video/index.js'
|
import { DisplayOnlyForFollowerOptions } from '@server/models/video/sql/video/index.js'
|
||||||
|
@ -67,14 +67,12 @@ export function getCommonVideoFeedAttributes (video: VideoModel) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPodcastFeedUrlCustomTag (videoChannel: MChannelHostOnly) {
|
export function getPodcastFeedUrlCustomTag (videoChannel: MChannelHostOnly) {
|
||||||
const rootHost = videoChannel.Actor.getHost()
|
|
||||||
const originUrl = `${REMOTE_SCHEME.HTTP}://${rootHost}`
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: 'podcast:txt',
|
name: 'podcast:txt',
|
||||||
attributes: {
|
attributes: {
|
||||||
purpose: 'p20url'
|
purpose: 'p20url'
|
||||||
},
|
},
|
||||||
value: getChannelPodcastFeed(originUrl, videoChannel)
|
// TODO: use remote channel podcast feed URL
|
||||||
|
value: getChannelPodcastFeed(WEBSERVER.URL, videoChannel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue