Skip to content

Commit

Permalink
FIX / only update trim options when changed
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-ev committed Sep 13, 2023
1 parent ae31e44 commit b3d3bdf
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions client/src/components/makes/TrimAudioVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,26 @@ export default {
if (this.debounce_selection) clearTimeout(this.debounce_selection);
this.debounce_selection = setTimeout(async () => {
await this.$api.updateMeta({
path: this.make.$path,
new_meta: {
selection: this.selection,
},
});
await this.updateSelectionMeta();
}, 1000);
},
setSelect() {
const { start, end } = this.make.selection;
if (start !== this.selection.start || end !== this.selection.end)
this.main_wfpl.getEventEmitter().emit("select", start, end);
},
async updateSelectionMeta() {
if (
this.selection.start !== this.make.selection.start ||
this.selection.end !== this.make.selection.end
)
await this.$api.updateMeta({
path: this.make.$path,
new_meta: {
selection: this.selection,
},
});
},
finished() {
// this.pause();
},
Expand Down

0 comments on commit b3d3bdf

Please sign in to comment.