Skip to content

Commit

Permalink
- Fix custom tags not being saved.
Browse files Browse the repository at this point in the history
  • Loading branch information
hardiesoft committed Feb 19, 2025
1 parent 9fd054c commit 70a64ad
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions browse-next/src/components/SpectrogramViewer.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import type { ApiRecordingResponse } from "@typedefs/api/recording";
import { type Spectastiq } from "spectastiq";
// import { type Spectastiq } from "./spectastiq";
//import { type Spectastiq } from "./spectastiq";
import {
computed,
type ComputedRef,
Expand Down Expand Up @@ -672,6 +672,9 @@ watch(pendingTrackClass, async (classification: string[]) => {
// Patch the pending track
pendingTrack.value.tags[0].what = classification[0];
pendingTrack.value.tags[0].automatic = false;
const tagToReplace = {
...pendingTrack.value.tags[0],
};
pendingTrack.value.tags[0].createdAt = new Date().toISOString();
pendingTrack.value.tags[0].userId = currentUser.value?.id;
pendingTrack.value.tags[0].userName = currentUser.value?.userName;
Expand Down Expand Up @@ -704,9 +707,8 @@ watch(pendingTrackClass, async (classification: string[]) => {
newId: response.result.trackId,
userId: currentUser.value?.id,
});
await replaceTrackTag(
pendingTrack.value.tags[0],
tagToReplace,
props.recording.id,
response.result.trackId
);
Expand Down

0 comments on commit 70a64ad

Please sign in to comment.