244e76a552
Provides rss 2.0, atom 1.0 and json 1.0 feeds for videos (instance and account-wide) on listings and video-watch views. * still lacks redis caching * still lacks lastBuildDate support * still lacks channel-wide support * still lacks semantic annotation (for licenses, NSFW warnings, etc.) * still lacks love ( ˘ ³˘) * RSS: has MRSS support for torrent lists! * RSS: includes the first torrent in an enclosure * JSON: lists all torrents in the 'attachments' object * ATOM: lacking torrent listing support Advances #23 Partial implementation for the accountId generation in the client, which will need a hotfix to add a way to get the proper account id.
23 lines
383 B
TypeScript
23 lines
383 B
TypeScript
import { exists } from './misc'
|
|
|
|
function isValidRSSFeed (value: string) {
|
|
if (!exists(value)) return false
|
|
|
|
const feedExtensions = [
|
|
'xml',
|
|
'json',
|
|
'json1',
|
|
'rss',
|
|
'rss2',
|
|
'atom',
|
|
'atom1'
|
|
]
|
|
|
|
return feedExtensions.indexOf(value) !== -1
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export {
|
|
isValidRSSFeed
|
|
}
|