]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
(feed) adding thumbnail support for RSS feed
authorRigel Kent <sendmemail@rigelk.eu>
Fri, 29 Jun 2018 12:40:39 +0000 (14:40 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 29 Jun 2018 12:58:57 +0000 (14:58 +0200)
package.json
server/controllers/feeds.ts
yarn.lock

index 254281df5060c64c55424f90640847b68f5a8b69..cbe269e7d41ab923287b4e39de0f28ea6d85f8de 100644 (file)
     "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",
index ce57e5c111862fa49a2f3cea98544b8a11007034..1773fc71e2a38eed02a72d5d2fc4314e8819eb36 100644 (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
+        }
+      ]
     })
   })
 
index 8c79ab282a9a8f50280e8e21c7a046ac1fcd0a64..a341e56ebca3c452e1da9300adbdfa9afda72c34 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -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"