ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix podcast feed URL
Chocobozzz1797f7e54849
diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.tsindex e73ce35f6e..f31267f4de 100644--- a/client/src/app/shared/shared-main/video/video.service.ts+++ b/client/src/app/shared/shared-main/video/video.service.ts@@ -6,6 +6,9 @@ import { arrayify, buildDownloadFilesUrl } from '@peertube/peertube-core-utils'import {BooleanBothQuery,FeedFormat,+ FeedFormatType,+ FeedType,+ FeedType_Type,NSFWPolicyType,ResultList,ServerErrorCode,@@ -224,18 +227,21 @@ export class VideoService {}buildBaseFeedUrls (params: HttpParams, base = VideoService.BASE_FEEDS_URL) {- const feeds = [+ const feeds: { type: FeedType_Type, format: FeedFormatType, label: string, url: string }[] = [{+ type: FeedType.VIDEOS,format: FeedFormat.RSS,label: 'media rss 2.0',url: base + FeedFormat.RSS.toLowerCase()},{+ type: FeedType.VIDEOS,format: FeedFormat.ATOM,label: 'atom 1.0',url: base + FeedFormat.ATOM.toLowerCase()},{+ type: FeedType.VIDEOS,format: FeedFormat.JSON,label: 'json 1.0',url: base + FeedFormat.JSON.toLowerCase()@@ -279,6 +285,7 @@ export class VideoService {const feedUrls = this.buildBaseFeedUrls(params)feedUrls.push({+ type: FeedType.PODCAST,format: FeedFormat.PODCAST,label: 'podcast rss 2.0',url: VideoService.PODCAST_FEEDS_URL + `?videoChannelId=${videoChannelId}`diff --git a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts b/client/src/app/shared/shared-user-subscription/subscribe-button.component.tsindex 6010b3325b..75a90d1d3d 100644--- a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts+++ b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts@@ -2,7 +2,7 @@ import { NgClass, NgIf, NgTemplateOutlet } from '@angular/common'import { Component, OnChanges, inject, input, viewChild } from '@angular/core'import { AuthService, Notifier, RedirectService } from '@app/core'import { NgbDropdown, NgbDropdownMenu, NgbDropdownToggle } from '@ng-bootstrap/ng-bootstrap'-import { FeedFormat } from '@peertube/peertube-models'+import { FeedFormat, FeedType } from '@peertube/peertube-models'import { concat, forkJoin, merge } from 'rxjs'import { Account } from '../shared-main/account/account.model'import { VideoChannel } from '../shared-main/channel/video-channel.model'@@ -84,7 +84,7 @@ export class SubscribeButtonComponent implements OnChanges {? undefined: this.videoService.getVideoChannelFeedUrls(this.videoChannels()[0].id)- .find(i => i.format === FeedFormat.PODCAST)+ .find(i => i.type === FeedType.PODCAST).url}diff --git a/packages/models/src/feeds/feed-format.enum.ts b/packages/models/src/feeds/feed-format.enum.tsindex 46042359e5..604fb67463 100644--- a/packages/models/src/feeds/feed-format.enum.ts+++ b/packages/models/src/feeds/feed-format.enum.ts@@ -6,3 +6,10 @@ export const FeedFormat = {} as constexport type FeedFormatType = typeof FeedFormat[keyof typeof FeedFormat]++export const FeedType = {+ VIDEOS: 'videos',+ PODCAST: 'podcast'+} as const++export type FeedType_Type = typeof FeedType[keyof typeof FeedType]