1
0
Fork 0

(feed) adding thumbnail support for RSS feed

This commit is contained in:
Rigel Kent 2018-06-29 14:40:39 +02:00 committed by Chocobozzz
parent 52d9f792b3
commit b81eb8fdc6
3 changed files with 13 additions and 5 deletions

View File

@ -108,7 +108,7 @@
"parse-torrent": "^6.0.0",
"password-generator": "^2.0.2",
"pem": "^1.12.3",
"pfeed": "^1.1.5",
"pfeed": "^1.1.6",
"pg": "^7.4.1",
"pg-hstore": "^2.3.2",
"redis": "^2.8.0",

View File

@ -1,5 +1,6 @@
import * as express from 'express'
import { CONFIG, FEEDS, ROUTE_CACHE_LIFETIME } from '../initializers/constants'
import { THUMBNAILS_SIZE } from '../initializers'
import { asyncMiddleware, setDefaultSort, videoCommentsFeedsValidator, videoFeedsValidator, videosSortValidator } from '../middlewares'
import { VideoModel } from '../models/video/video'
import * as Feed from 'pfeed'
@ -125,7 +126,14 @@ async function generateVideoFeed (req: express.Request, res: express.Response, n
date: video.publishedAt,
language: video.language,
nsfw: video.nsfw,
torrent: torrents
torrent: torrents,
thumbnail: [
{
url: CONFIG.WEBSERVER.URL + video.getThumbnailPath(),
height: THUMBNAILS_SIZE.height,
width: THUMBNAILS_SIZE.width
}
]
})
})

View File

@ -5426,9 +5426,9 @@ performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
pfeed@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/pfeed/-/pfeed-1.1.5.tgz#6d0ab54209c60b45de03a15efaab7be867a3f71a"
pfeed@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/pfeed/-/pfeed-1.1.6.tgz#0de2a1c40b116fa236227237fa264c7956c185e8"
dependencies:
xml "^1.0.1"