Skip to content

Commit

Permalink
fix: Use voicesynthesizer target type in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnRG committed Aug 13, 2024
1 parent 67d88fa commit 17d2d0c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion VocaDbWeb/Scripts/Stores/Tag/TagsEditStore.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { TagBaseContract } from '@/DataContracts/Tag/TagBaseContract';
import { TagSelectionContract } from '@/DataContracts/Tag/TagSelectionContract';
import { TagUsageForApiContract } from '@/DataContracts/Tag/TagUsageForApiContract';
import { ArtistHelper } from '@/Helpers/ArtistHelper';
import { ArtistType } from '@/Models/Artists/ArtistType';
import { EntryType } from '@/Models/EntryType';
import { TagTargetType } from '@/Models/Tags/TagTargetType';
import { trim } from 'lodash-es';
Expand Down Expand Up @@ -37,7 +39,11 @@ export class TagsEditStore {
readonly tagSubtype?: Object,
readonly getSuggestions?: () => Promise<TagUsageForApiContract[]>,
) {
this.target = `${entryType?.toString()}:${tagSubtype?.toString()}`.toLowerCase()
let targetEntryType = entryType?.toString();
if (entryType === EntryType.Artist && ArtistHelper.isVoiceSynthesizerType(tagSubtype?.toString() as ArtistType)) {
targetEntryType = "voicesynthesizer"
}
this.target = `${targetEntryType}:${tagSubtype?.toString()}`.toLowerCase()
makeObservable(this);
}

Expand Down

0 comments on commit 17d2d0c

Please sign in to comment.