mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[addon] filter realdebrid cached entries to contain ony videos
This commit is contained in:
22
addon/lib/video.js
Normal file
22
addon/lib/video.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const EXTENSIONS = [
|
||||
"3g2",
|
||||
"3gp",
|
||||
"avi",
|
||||
"flv",
|
||||
"mkv",
|
||||
"mov",
|
||||
"mp2",
|
||||
"mp4",
|
||||
"mpe",
|
||||
"mpeg",
|
||||
"mpg",
|
||||
"mpv",
|
||||
"webm",
|
||||
"wmv",
|
||||
"ogm"
|
||||
];
|
||||
|
||||
module.exports = (filename) => {
|
||||
const extensionMatch = filename.match(/\.(\w{2,4})$/);
|
||||
return extensionMatch && EXTENSIONS.includes(extensionMatch[1].toLowerCase());
|
||||
};
|
||||
Reference in New Issue
Block a user