Skip to content

Commit

Permalink
Support webm
Browse files Browse the repository at this point in the history
  • Loading branch information
soruly committed Jan 4, 2025
1 parent 0cc38f5 commit 0227dd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ npm run delete

### How to begin hashing

By default, it will scan the `VIDEO_PATH` every minute for new video files (.mp4 or .mkv). You can manually trigger a scan by calling this url
By default, it will scan the `VIDEO_PATH` every minute for new video files (.mp4 or .mkv or webm). You can manually trigger a scan by calling this url

```
curl http://localhost:3001/scan
Expand Down
2 changes: 1 addition & 1 deletion src/scan.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default async (req, res) => {
const dbFileSet = new Set(dbFileList.map((e) => e.path));

const videoFileList = fileList
.filter((file) => file.isFile() && [".mkv", ".mp4"].includes(path.extname(file.name)))
.filter((file) => file.isFile() && [".webm", ".mkv", ".mp4"].includes(path.extname(file.name)))
.map((e) => path.join(e.path, e.name).replace(VIDEO_PATH, ""));
const videoFileSet = new Set(videoFileList);

Expand Down

0 comments on commit 0227dd9

Please sign in to comment.