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 {
+ asyncMiddleware,
+ commonVideosFiltersValidator,
+ setDefaultSort,
+ videoCommentsFeedsValidator,
+ videoFeedsValidator,
+ videosSortValidator
+} from '../middlewares'
import { VideoModel } from '../models/video/video'
import * as Feed from 'pfeed'
import { AccountModel } from '../models/account/account'
videosSortValidator,
setDefaultSort,
asyncMiddleware(cacheRoute(ROUTE_CACHE_LIFETIME.FEEDS)),
+ commonVideosFiltersValidator,
asyncMiddleware(videoFeedsValidator),
asyncMiddleware(generateVideoFeed)
)
// Adding video items to the feed, one at a time
comments.forEach(comment => {
- const link = CONFIG.WEBSERVER.URL + '/videos/watch/' + comment.Video.uuid + ';threadId=' + comment.getThreadId()
+ const link = CONFIG.WEBSERVER.URL + comment.getCommentStaticPath()
feed.addItem({
title: `${comment.Video.name} - ${comment.Account.getDisplayName()}`,