aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/controllers/feeds.ts29
1 files changed, 28 insertions, 1 deletions
diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts
index 468f7a668..7207baa00 100644
--- a/server/controllers/feeds.ts
+++ b/server/controllers/feeds.ts
@@ -118,6 +118,17 @@ async function generateVideoFeed (req: express.Request, res: express.Response) {
118 url: videoFile.torrentUrl, 118 url: videoFile.torrentUrl,
119 size_in_bytes: videoFile.size 119 size_in_bytes: videoFile.size
120 })) 120 }))
121 const videos = formattedVideoFiles.map(videoFile => (Object.assign({
122 type: 'video/mp4',
123 medium: 'video',
124 height: videoFile.resolution.label.replace('p', ''),
125 fileSize: videoFile.size,
126 url: videoFile.fileUrl,
127 framerate: videoFile.fps,
128 duration: video.duration
129 }, video.language ? {
130 lang: video.language
131 } : {})))
121 132
122 feed.addItem({ 133 feed.addItem({
123 title: video.name, 134 title: video.name,
@@ -132,9 +143,25 @@ async function generateVideoFeed (req: express.Request, res: express.Response) {
132 } 143 }
133 ], 144 ],
134 date: video.publishedAt, 145 date: video.publishedAt,
135 language: video.language,
136 nsfw: video.nsfw, 146 nsfw: video.nsfw,
137 torrent: torrents, 147 torrent: torrents,
148 videos,
149 embed: {
150 url: video.getEmbedStaticPath(),
151 allowFullscreen: true
152 },
153 player: {
154 url: video.getWatchStaticPath()
155 },
156 categories: [video.category ? {
157 value: video.category,
158 label: VideoModel.getCategoryLabel(video.category)
159 } : null],
160 community: {
161 statistics: {
162 views: video.views
163 }
164 },
138 thumbnail: [ 165 thumbnail: [
139 { 166 {
140 url: WEBSERVER.URL + video.getMiniatureStaticPath(), 167 url: WEBSERVER.URL + video.getMiniatureStaticPath(),