Store embed titles and search them

This commit is contained in:
Fisto
2026-09-17 13:10:16 +02:00
parent c6caa168be
commit 557ba5ca7e
13 changed files with 200 additions and 10 deletions
+11
View File
@@ -135,6 +135,8 @@ export interface MediaItemResult {
thumbUrl: string | null;
provider: string | null;
downloaded: boolean;
/** Embed title (YouTube and friends), when Discord provided one. */
title: string | null;
createdAt: string;
}
@@ -719,6 +721,8 @@ export class MediaService {
excludeSources?: string[];
includeProviders?: string[];
includeSources?: string[];
titleQuery?: string;
titleExact?: boolean;
sizeLessThan?: number;
sizeGreaterThan?: number;
lengthLessThan?: number;
@@ -850,6 +854,8 @@ export class MediaService {
excludeSources?: string[];
includeProviders?: string[];
includeSources?: string[];
titleQuery?: string;
titleExact?: boolean;
sizeLessThan?: number;
sizeGreaterThan?: number;
lengthLessThan?: number;
@@ -887,6 +893,8 @@ export class MediaService {
excludeSources: options.excludeSources,
includeProviders: options.includeProviders,
includeSources: options.includeSources,
titleQuery: options.titleQuery,
titleExact: options.titleExact,
sizeLessThan: options.sizeLessThan,
sizeGreaterThan: options.sizeGreaterThan,
lengthLessThan: options.lengthLessThan,
@@ -949,6 +957,8 @@ export class MediaService {
excludeSources?: string[];
includeProviders?: string[];
includeSources?: string[];
titleQuery?: string;
titleExact?: boolean;
sizeLessThan?: number;
sizeGreaterThan?: number;
lengthLessThan?: number;
@@ -993,6 +1003,7 @@ export class MediaService {
thumbUrl: row.preview_hash ? `/api/media/${meta.id}/${row.id}/thumb` : null,
provider: row.provider,
downloaded: row.downloaded === 1,
title: row.title,
createdAt: row.created_at
}));
}