parent
a5a254c4b8
commit
16d9224a1c
|
@ -138,7 +138,7 @@
|
||||||
"parse-torrent": "^7.0.0",
|
"parse-torrent": "^7.0.0",
|
||||||
"password-generator": "^2.0.2",
|
"password-generator": "^2.0.2",
|
||||||
"pem": "^1.12.3",
|
"pem": "^1.12.3",
|
||||||
"pfeed": "^1.1.6",
|
"pfeed": "1.1.10",
|
||||||
"pg": "^7.4.1",
|
"pg": "^7.4.1",
|
||||||
"prompt": "^1.0.0",
|
"prompt": "^1.0.0",
|
||||||
"redis": "^2.8.0",
|
"redis": "^2.8.0",
|
||||||
|
|
|
@ -118,6 +118,17 @@ async function generateVideoFeed (req: express.Request, res: express.Response) {
|
||||||
url: videoFile.torrentUrl,
|
url: videoFile.torrentUrl,
|
||||||
size_in_bytes: videoFile.size
|
size_in_bytes: videoFile.size
|
||||||
}))
|
}))
|
||||||
|
const videos = formattedVideoFiles.map(videoFile => (Object.assign({
|
||||||
|
type: 'video/mp4',
|
||||||
|
medium: 'video',
|
||||||
|
height: videoFile.resolution.label.replace('p', ''),
|
||||||
|
fileSize: videoFile.size,
|
||||||
|
url: videoFile.fileUrl,
|
||||||
|
framerate: videoFile.fps,
|
||||||
|
duration: video.duration
|
||||||
|
}, video.language ? {
|
||||||
|
lang: video.language
|
||||||
|
} : {})))
|
||||||
|
|
||||||
feed.addItem({
|
feed.addItem({
|
||||||
title: video.name,
|
title: video.name,
|
||||||
|
@ -132,9 +143,25 @@ async function generateVideoFeed (req: express.Request, res: express.Response) {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
date: video.publishedAt,
|
date: video.publishedAt,
|
||||||
language: video.language,
|
|
||||||
nsfw: video.nsfw,
|
nsfw: video.nsfw,
|
||||||
torrent: torrents,
|
torrent: torrents,
|
||||||
|
videos,
|
||||||
|
embed: {
|
||||||
|
url: video.getEmbedStaticPath(),
|
||||||
|
allowFullscreen: true
|
||||||
|
},
|
||||||
|
player: {
|
||||||
|
url: video.getWatchStaticPath()
|
||||||
|
},
|
||||||
|
categories: [video.category ? {
|
||||||
|
value: video.category,
|
||||||
|
label: VideoModel.getCategoryLabel(video.category)
|
||||||
|
} : null],
|
||||||
|
community: {
|
||||||
|
statistics: {
|
||||||
|
views: video.views
|
||||||
|
}
|
||||||
|
},
|
||||||
thumbnail: [
|
thumbnail: [
|
||||||
{
|
{
|
||||||
url: WEBSERVER.URL + video.getMiniatureStaticPath(),
|
url: WEBSERVER.URL + video.getMiniatureStaticPath(),
|
||||||
|
|
|
@ -4911,10 +4911,10 @@ performance-now@^2.1.0:
|
||||||
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
||||||
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
|
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
|
||||||
|
|
||||||
pfeed@^1.1.6:
|
pfeed@1.1.10:
|
||||||
version "1.1.9"
|
version "1.1.10"
|
||||||
resolved "https://registry.yarnpkg.com/pfeed/-/pfeed-1.1.9.tgz#62225ff674e154aa3d665afa9d85df71f088807e"
|
resolved "https://registry.yarnpkg.com/pfeed/-/pfeed-1.1.10.tgz#9550017c61925e73b18c6fe3d6c6329d4d41d75f"
|
||||||
integrity sha512-xAm85IdpLNcVp3Q7QyzAe1ncb9REZVdNcQNLYyF8+QiFuy0wDcxGYrqphI2ga6rs1m4sFfhiGZv6iwXdZDQJXA==
|
integrity sha512-Gv13vtX/6Bac+NxWOYauLCW4br7QaooKUcGHOhKn0SSaYZc5cx2vT5P5hs4533su9uf8VnlLi44VzXodWnQYNg==
|
||||||
dependencies:
|
dependencies:
|
||||||
lodash "^4.17.15"
|
lodash "^4.17.15"
|
||||||
xml "^1.0.1"
|
xml "^1.0.1"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user