upd: use builtin thumbnail generator if no thumbnail generator is set

This commit is contained in:
ShittyKopper 2024-01-04 19:10:20 +03:00
parent 1cd59c1ee3
commit bc24e6a294
1 changed files with 8 additions and 1 deletions

View File

@ -50,7 +50,14 @@ export class VideoProcessingService {
@bindThis
public getExternalVideoThumbnailUrl(url: string): string | null {
if (this.config.videoThumbnailGenerator == null) return null;
if (this.config.videoThumbnailGenerator == null) {
return appendQuery(
`${this.config.url}/proxy/thumbnail.webp`,
query({
url,
}),
);
}
return appendQuery(
`${this.config.videoThumbnailGenerator}/thumbnail.webp`,