feat: add way to tell if a converter reports progress

This commit is contained in:
not-nullptr 2024-11-14 16:05:14 +00:00
parent 4b9ae955d7
commit 18d8e57bb5
3 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,7 @@ export class Converter {
* @param to The format to convert to. Includes the dot. * @param to The format to convert to. Includes the dot.
*/ */
public ready: boolean = $state(false); public ready: boolean = $state(false);
public readonly reportsProgress: boolean = false;
public async convert( public async convert(
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars

View File

@ -24,6 +24,8 @@ export class FFmpegConverter extends Converter {
".aiff", ".aiff",
]; ];
public readonly reportsProgress = true;
constructor() { constructor() {
super(); super();
log(["converters", this.name], `created converter`); log(["converters", this.name], `created converter`);

View File

@ -29,6 +29,8 @@ export class VipsConverter extends Converter {
".tiff", ".tiff",
]; ];
public readonly reportsProgress = false;
constructor() { constructor() {
super(); super();
log(["converters", this.name], `created converter`); log(["converters", this.name], `created converter`);