mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
chore: switch from biome to eslint + prettier; fix ton of lint issues
This commit is contained in:
@@ -16,14 +16,22 @@ export class AddMediaAssetCommand extends Command {
|
||||
private previousProjectFps: FrameRate | null = null;
|
||||
private appliedProjectFps: FrameRate | null = null;
|
||||
|
||||
constructor(
|
||||
private projectId: string,
|
||||
private asset: Omit<MediaAsset, "id">,
|
||||
) {
|
||||
constructor({
|
||||
projectId,
|
||||
asset,
|
||||
}: {
|
||||
projectId: string;
|
||||
asset: Omit<MediaAsset, "id">;
|
||||
}) {
|
||||
super();
|
||||
this.projectId = projectId;
|
||||
this.asset = asset;
|
||||
this.assetId = generateUUID();
|
||||
}
|
||||
|
||||
private projectId: string;
|
||||
private asset: Omit<MediaAsset, "id">;
|
||||
|
||||
execute(): CommandResult | undefined {
|
||||
const editor = EditorCore.getInstance();
|
||||
this.savedAssets = [...editor.media.getAssets()];
|
||||
@@ -117,7 +125,14 @@ export class AddMediaAssetCommand extends Command {
|
||||
|
||||
const activeProject = editor.project.getActiveOrNull();
|
||||
if (!activeProject) return;
|
||||
if (!this.appliedProjectFps || !frameRatesEqual(activeProject.settings.fps, this.appliedProjectFps)) return;
|
||||
if (
|
||||
!this.appliedProjectFps ||
|
||||
!frameRatesEqual({
|
||||
a: activeProject.settings.fps,
|
||||
b: this.appliedProjectFps,
|
||||
})
|
||||
)
|
||||
return;
|
||||
|
||||
const highestRemainingVideoFps = getHighestImportedVideoFps({
|
||||
mediaAssets: editor.media.getAssets(),
|
||||
|
||||
Reference in New Issue
Block a user