+ const redundancyVideos = config.get<VideosRedundancy[]>('redundancy.videos')
+ if (isArray(redundancyVideos)) {
+ for (const r of redundancyVideos) {
+ if ([ 'most-views', 'trending' ].indexOf(r.strategy) === -1) {
+ return 'Redundancy video entries should have "most-views" strategy instead of ' + r.strategy
+ }
+ }
+
+ const filtered = uniq(redundancyVideos.map(r => r.strategy))
+ if (filtered.length !== redundancyVideos.length) {
+ return 'Redundancy video entries should have uniq strategies'
+ }
+ }
+