diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2018-06-29 14:40:39 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-29 14:58:57 +0200 |
commit | b81eb8fdc6fabbe517d5731c26da773206ebba62 (patch) | |
tree | 29eb7f0eed0123599291d58126ffa7fe5413e073 /server/controllers | |
parent | 52d9f792b3fee5acce80f948295b59e3ad2073eb (diff) | |
download | PeerTube-b81eb8fdc6fabbe517d5731c26da773206ebba62.tar.gz PeerTube-b81eb8fdc6fabbe517d5731c26da773206ebba62.tar.zst PeerTube-b81eb8fdc6fabbe517d5731c26da773206ebba62.zip |
(feed) adding thumbnail support for RSS feed
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/feeds.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts index ce57e5c11..1773fc71e 100644 --- a/server/controllers/feeds.ts +++ b/server/controllers/feeds.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { CONFIG, FEEDS, ROUTE_CACHE_LIFETIME } from '../initializers/constants' | 2 | import { CONFIG, FEEDS, ROUTE_CACHE_LIFETIME } from '../initializers/constants' |
3 | import { THUMBNAILS_SIZE } from '../initializers' | ||
3 | import { asyncMiddleware, setDefaultSort, videoCommentsFeedsValidator, videoFeedsValidator, videosSortValidator } from '../middlewares' | 4 | import { asyncMiddleware, setDefaultSort, videoCommentsFeedsValidator, videoFeedsValidator, videosSortValidator } from '../middlewares' |
4 | import { VideoModel } from '../models/video/video' | 5 | import { VideoModel } from '../models/video/video' |
5 | import * as Feed from 'pfeed' | 6 | import * as Feed from 'pfeed' |
@@ -125,7 +126,14 @@ async function generateVideoFeed (req: express.Request, res: express.Response, n | |||
125 | date: video.publishedAt, | 126 | date: video.publishedAt, |
126 | language: video.language, | 127 | language: video.language, |
127 | nsfw: video.nsfw, | 128 | nsfw: video.nsfw, |
128 | torrent: torrents | 129 | torrent: torrents, |
130 | thumbnail: [ | ||
131 | { | ||
132 | url: CONFIG.WEBSERVER.URL + video.getThumbnailPath(), | ||
133 | height: THUMBNAILS_SIZE.height, | ||
134 | width: THUMBNAILS_SIZE.width | ||
135 | } | ||
136 | ] | ||
129 | }) | 137 | }) |
130 | }) | 138 | }) |
131 | 139 | ||