Skip to content

Commit 955255c

Browse files
committed
patch
1 parent adf375c commit 955255c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/routes/libraries.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ router.get('/:id/videos', async (req, res) => {
8787
if (!access.allowed) return res.json({ videos: [], hasMore: false });
8888

8989
const orderCol = sort === 'date' ? 'v.updated_at' : sort === 'size' ? 'v.size' : 'v.filename';
90-
const [rows] = await pool.execute(
90+
const [rows] = await pool.query(
9191
`SELECT v.id, v.filename, v.title, v.size, v.duration, v.view_count,
9292
v.updated_at, v.created_at, t.filename as thumb,
9393
t.sprite_filename as sprite
@@ -206,7 +206,7 @@ router.get('/:id', async (req, res) => {
206206

207207
if (viewMode === 'flat') {
208208
const orderCol = sort === 'date' ? 'v.updated_at' : sort === 'size' ? 'v.size' : 'v.filename';
209-
const [rows] = await pool.execute(
209+
const [rows] = await pool.query(
210210
`SELECT v.*, t.filename as thumb, t.sprite_filename as sprite FROM videos v LEFT JOIN thumbnails t ON t.video_id = v.id WHERE v.library_id = ? ORDER BY ${orderCol} ${order === 'desc' ? 'DESC' : 'ASC'} LIMIT ?`,
211211
[libraryId, PAGE_SIZE + 1]
212212
);

src/worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function generateThumbnail(videoPath, libraryPath) {
6666
const thumbPath = path.join(thumbDir, thumbName);
6767
try {
6868
execFileSync('ffmpeg', [
69-
'-ss', '3', '-i', videoPath,
69+
'-ss', '15', '-i', videoPath,
7070
'-vframes', '1', '-vf', 'scale=320:-2',
7171
'-q:v', '8', '-y', thumbPath,
7272
], { timeout: 15000, stdio: 'pipe' });

0 commit comments

Comments
 (0)