diff options
author | Alecks Gates <agates@mail.agates.io> | 2023-05-22 09:00:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-22 16:00:05 +0200 |
commit | cb0eda5602a21d1626a7face32de6153ed07b5f9 (patch) | |
tree | d6a7a4e31c7267c130871ac8e3beb42994271c20 /server/types | |
parent | 3f0ceab06e5320f62f593c49daa30d963dbc36f9 (diff) | |
download | PeerTube-cb0eda5602a21d1626a7face32de6153ed07b5f9.tar.gz PeerTube-cb0eda5602a21d1626a7face32de6153ed07b5f9.tar.zst PeerTube-cb0eda5602a21d1626a7face32de6153ed07b5f9.zip |
Add Podcast RSS feeds (#5487)
* Initial test implementation of Podcast RSS
This is a pretty simple implementation to add support for The Podcast Namespace in RSS -- instead of affecting the existing RSS implementation, this adds a new UI option.
I attempted to retain compatibility with the rest of the RSS feed implementation as much as possible and have created a temporary fork of the "pfeed" library to support this effort.
* Update to pfeed-podcast 1.2.2
* Initial test implementation of Podcast RSS
This is a pretty simple implementation to add support for The Podcast Namespace in RSS -- instead of affecting the existing RSS implementation, this adds a new UI option.
I attempted to retain compatibility with the rest of the RSS feed implementation as much as possible and have created a temporary fork of the "pfeed" library to support this effort.
* Update to pfeed-podcast 1.2.2
* Initial test implementation of Podcast RSS
This is a pretty simple implementation to add support for The Podcast Namespace in RSS -- instead of affecting the existing RSS implementation, this adds a new UI option.
I attempted to retain compatibility with the rest of the RSS feed implementation as much as possible and have created a temporary fork of the "pfeed" library to support this effort.
* Update to pfeed-podcast 1.2.2
* Add correct feed image to RSS channel
* Prefer HLS videos for podcast RSS
Remove video/stream titles, add optional height attribute to podcast RSS
* Prefix podcast RSS images with root server URL
* Add optional video query support to include captions
* Add transcripts & person images to podcast RSS feed
* Prefer webseed/webtorrent files over HLS fragmented mp4s
* Experimentally adding podcast fields to basic config page
* Add validation for new basic config fields
* Don't include "content" in podcast feed, use full description for "description"
* Initial test implementation of Podcast RSS
This is a pretty simple implementation to add support for The Podcast Namespace in RSS -- instead of affecting the existing RSS implementation, this adds a new UI option.
I attempted to retain compatibility with the rest of the RSS feed implementation as much as possible and have created a temporary fork of the "pfeed" library to support this effort.
* Update to pfeed-podcast 1.2.2
* Add correct feed image to RSS channel
* Prefer HLS videos for podcast RSS
Remove video/stream titles, add optional height attribute to podcast RSS
* Prefix podcast RSS images with root server URL
* Add optional video query support to include captions
* Add transcripts & person images to podcast RSS feed
* Prefer webseed/webtorrent files over HLS fragmented mp4s
* Experimentally adding podcast fields to basic config page
* Add validation for new basic config fields
* Don't include "content" in podcast feed, use full description for "description"
* Add medium/socialInteract to podcast RSS feeds. Use HTML for description
* Change base production image to bullseye, install prosody in image
* Add liveItem and trackers to Podcast RSS feeds
Remove height from alternateEnclosure, replaced with title.
* Clear Podcast RSS feed cache when live streams start/end
* Upgrade to Node 16
* Refactor clearCacheRoute to use ApiCache
* Remove unnecessary type hint
* Update dockerfile to node 16, install python-is-python2
* Use new file paths for captions/playlists
* Fix legacy videos in RSS after migration to object storage
* Improve method of identifying non-fragmented mp4s in podcast RSS feeds
* Don't include fragmented MP4s in podcast RSS feeds
* Add experimental support for podcast:categories on the podcast RSS item
* Fix undefined category when no videos exist
Allows for empty feeds to exist (important for feeds that might only go live)
* Add support for podcast:locked -- user has to opt in to show their email
* Use comma for podcast:categories delimiter
* Make cache clearing async
* Fix merge, temporarily test with pfeed-podcast
* Syntax changes
* Add EXT_MIMETYPE constants for captions
* Update & fix tests, fix enclosure mimetypes, remove admin email
* Add test for podacst:socialInteract
* Add filters hooks for podcast customTags
* Remove showdown, updated to pfeed-podcast 6.1.2
* Add 'action:api.live-video.state.updated' hook
* Avoid assigning undefined category to podcast feeds
* Remove nvmrc
* Remove comment
* Remove unused podcast config
* Remove more unused podcast config
* Fix MChannelAccountDefault type hint missed in merge
* Remove extra line
* Re-add newline in config
* Fix lint errors for isEmailPublic
* Fix thumbnails in podcast feeds
* Requested changes based on review
* Provide podcast rss 2.0 only on video channels
* Misc cleanup for a less messy PR
* Lint fixes
* Remove pfeed-podcast
* Add peertube version to new hooks
* Don't use query include, remove TODO
* Remove film medium hack
* Clear podcast rss cache before video/channel update hooks
* Clear podcast rss cache before video uploaded/deleted hooks
* Refactor podcast feed cache clearing
* Set correct person name from video channel
* Styling
* Fix tests
---------
Co-authored-by: Chocobozzz <me@florianbigard.com>
Diffstat (limited to 'server/types')
-rw-r--r-- | server/types/express.d.ts | 2 | ||||
-rw-r--r-- | server/types/models/account/account.ts | 7 | ||||
-rw-r--r-- | server/types/models/actor/actor-follow.ts | 4 | ||||
-rw-r--r-- | server/types/models/actor/actor.ts | 10 | ||||
-rw-r--r-- | server/types/models/video/video-channels.ts | 7 | ||||
-rw-r--r-- | server/types/models/video/video.ts | 4 |
6 files changed, 22 insertions, 12 deletions
diff --git a/server/types/express.d.ts b/server/types/express.d.ts index a8aeabb3a..510b9f94e 100644 --- a/server/types/express.d.ts +++ b/server/types/express.d.ts | |||
@@ -110,6 +110,8 @@ declare module 'express' { | |||
110 | locals: { | 110 | locals: { |
111 | requestStart: number | 111 | requestStart: number |
112 | 112 | ||
113 | apicacheGroups: string[] | ||
114 | |||
113 | apicache: { | 115 | apicache: { |
114 | content: string | Buffer | 116 | content: string | Buffer |
115 | write: Writable['write'] | 117 | write: Writable['write'] |
diff --git a/server/types/models/account/account.ts b/server/types/models/account/account.ts index 282a2971b..d10b904ab 100644 --- a/server/types/models/account/account.ts +++ b/server/types/models/account/account.ts | |||
@@ -8,8 +8,8 @@ import { | |||
8 | MActorDefault, | 8 | MActorDefault, |
9 | MActorDefaultLight, | 9 | MActorDefaultLight, |
10 | MActorFormattable, | 10 | MActorFormattable, |
11 | MActorHost, | ||
11 | MActorId, | 12 | MActorId, |
12 | MActorServer, | ||
13 | MActorSummary, | 13 | MActorSummary, |
14 | MActorSummaryFormattable, | 14 | MActorSummaryFormattable, |
15 | MActorUrl | 15 | MActorUrl |
@@ -68,10 +68,9 @@ export type MAccountActor = | |||
68 | MAccount & | 68 | MAccount & |
69 | Use<'Actor', MActor> | 69 | Use<'Actor', MActor> |
70 | 70 | ||
71 | // Full actor with server | 71 | export type MAccountHost = |
72 | export type MAccountServer = | ||
73 | MAccount & | 72 | MAccount & |
74 | Use<'Actor', MActorServer> | 73 | Use<'Actor', MActorHost> |
75 | 74 | ||
76 | // ############################################################################ | 75 | // ############################################################################ |
77 | 76 | ||
diff --git a/server/types/models/actor/actor-follow.ts b/server/types/models/actor/actor-follow.ts index 338158561..84042e228 100644 --- a/server/types/models/actor/actor-follow.ts +++ b/server/types/models/actor/actor-follow.ts | |||
@@ -7,7 +7,7 @@ import { | |||
7 | MActorDefaultAccountChannel, | 7 | MActorDefaultAccountChannel, |
8 | MActorDefaultChannelId, | 8 | MActorDefaultChannelId, |
9 | MActorFormattable, | 9 | MActorFormattable, |
10 | MActorHost, | 10 | MActorHostOnly, |
11 | MActorUsername | 11 | MActorUsername |
12 | } from './actor' | 12 | } from './actor' |
13 | 13 | ||
@@ -21,7 +21,7 @@ export type MActorFollow = Omit<ActorFollowModel, 'ActorFollower' | 'ActorFollow | |||
21 | 21 | ||
22 | export type MActorFollowFollowingHost = | 22 | export type MActorFollowFollowingHost = |
23 | MActorFollow & | 23 | MActorFollow & |
24 | Use<'ActorFollowing', MActorUsername & MActorHost> | 24 | Use<'ActorFollowing', MActorUsername & MActorHostOnly> |
25 | 25 | ||
26 | // ############################################################################ | 26 | // ############################################################################ |
27 | 27 | ||
diff --git a/server/types/models/actor/actor.ts b/server/types/models/actor/actor.ts index 280256bab..47e7b7091 100644 --- a/server/types/models/actor/actor.ts +++ b/server/types/models/actor/actor.ts | |||
@@ -29,7 +29,11 @@ export type MActorLight = Omit<MActor, 'privateKey' | 'privateKey'> | |||
29 | 29 | ||
30 | // Some association attributes | 30 | // Some association attributes |
31 | 31 | ||
32 | export type MActorHost = Use<'Server', MServerHost> | 32 | export type MActorHostOnly = Use<'Server', MServerHost> |
33 | export type MActorHost = | ||
34 | MActorLight & | ||
35 | Use<'Server', MServerHost> | ||
36 | |||
33 | export type MActorRedundancyAllowedOpt = PickWithOpt<ActorModel, 'Server', MServerRedundancyAllowed> | 37 | export type MActorRedundancyAllowedOpt = PickWithOpt<ActorModel, 'Server', MServerRedundancyAllowed> |
34 | 38 | ||
35 | export type MActorDefaultLight = | 39 | export type MActorDefaultLight = |
@@ -68,8 +72,8 @@ export type MActorChannel = | |||
68 | 72 | ||
69 | export type MActorDefaultAccountChannel = MActorDefault & MActorAccount & MActorChannel | 73 | export type MActorDefaultAccountChannel = MActorDefault & MActorAccount & MActorChannel |
70 | 74 | ||
71 | export type MActorServer = | 75 | export type MActorServerLight = |
72 | MActor & | 76 | MActorLight & |
73 | Use<'Server', MServer> | 77 | Use<'Server', MServer> |
74 | 78 | ||
75 | // ############################################################################ | 79 | // ############################################################################ |
diff --git a/server/types/models/video/video-channels.ts b/server/types/models/video/video-channels.ts index af8c2ffe4..57e991494 100644 --- a/server/types/models/video/video-channels.ts +++ b/server/types/models/video/video-channels.ts | |||
@@ -21,6 +21,7 @@ import { | |||
21 | MActorDefaultLight, | 21 | MActorDefaultLight, |
22 | MActorFormattable, | 22 | MActorFormattable, |
23 | MActorHost, | 23 | MActorHost, |
24 | MActorHostOnly, | ||
24 | MActorLight, | 25 | MActorLight, |
25 | MActorSummary, | 26 | MActorSummary, |
26 | MActorSummaryFormattable, | 27 | MActorSummaryFormattable, |
@@ -77,9 +78,13 @@ export type MChannelAccountLight = | |||
77 | Use<'Account', MAccountLight> | 78 | Use<'Account', MAccountLight> |
78 | 79 | ||
79 | export type MChannelHost = | 80 | export type MChannelHost = |
80 | MChannelId & | 81 | MChannel & |
81 | Use<'Actor', MActorHost> | 82 | Use<'Actor', MActorHost> |
82 | 83 | ||
84 | export type MChannelHostOnly = | ||
85 | MChannelId & | ||
86 | Use<'Actor', MActorHostOnly> | ||
87 | |||
83 | // ############################################################################ | 88 | // ############################################################################ |
84 | 89 | ||
85 | // Account associations | 90 | // Account associations |
diff --git a/server/types/models/video/video.ts b/server/types/models/video/video.ts index d1af53b92..58ae7baad 100644 --- a/server/types/models/video/video.ts +++ b/server/types/models/video/video.ts | |||
@@ -13,7 +13,7 @@ import { | |||
13 | MChannelAccountSummaryFormattable, | 13 | MChannelAccountSummaryFormattable, |
14 | MChannelActor, | 14 | MChannelActor, |
15 | MChannelFormattable, | 15 | MChannelFormattable, |
16 | MChannelHost, | 16 | MChannelHostOnly, |
17 | MChannelUserId | 17 | MChannelUserId |
18 | } from './video-channels' | 18 | } from './video-channels' |
19 | import { MVideoFile, MVideoFileRedundanciesAll, MVideoFileRedundanciesOpt } from './video-file' | 19 | import { MVideoFile, MVideoFileRedundanciesAll, MVideoFileRedundanciesOpt } from './video-file' |
@@ -146,7 +146,7 @@ export type MVideoWithChannelActor = | |||
146 | 146 | ||
147 | export type MVideoWithHost = | 147 | export type MVideoWithHost = |
148 | MVideo & | 148 | MVideo & |
149 | Use<'VideoChannel', MChannelHost> | 149 | Use<'VideoChannel', MChannelHostOnly> |
150 | 150 | ||
151 | export type MVideoFullLight = | 151 | export type MVideoFullLight = |
152 | MVideo & | 152 | MVideo & |