Added more UI styling. Updated voice work search provider to send back English tag names, if applicable.
This commit is contained in:
@@ -388,16 +388,18 @@ public class VoiceWorkSearchProvider(AppDbContext context, IVoiceWorkFullTextSea
|
||||
var tagRows = await (
|
||||
from voiceWorkTag in context.VoiceWorkTags.AsNoTracking()
|
||||
join tag in context.Tags.AsNoTracking() on voiceWorkTag.TagId equals tag.TagId
|
||||
join englishTag in context.EnglishTags.AsNoTracking() on tag.TagId equals englishTag.TagId into et
|
||||
from englishTag in et.DefaultIfEmpty()
|
||||
where voiceWorkIds.Contains(voiceWorkTag.VoiceWorkId)
|
||||
orderby voiceWorkTag.VoiceWorkId, voiceWorkTag.Position
|
||||
select new { voiceWorkTag.VoiceWorkId, voiceWorkTag.TagId, tag.Name }
|
||||
select new { voiceWorkTag.VoiceWorkId, voiceWorkTag.TagId, tag.Name, EnglishName = englishTag.Name }
|
||||
).ToListAsync(cancellationToken);
|
||||
|
||||
return tagRows
|
||||
.GroupBy(r => r.VoiceWorkId)
|
||||
.ToDictionary(
|
||||
g => g.Key,
|
||||
g => g.Select(r => new VoiceWorkTagItem { TagId = r.TagId, Name = r.Name }).ToArray()
|
||||
g => g.Select(r => new VoiceWorkTagItem { TagId = r.TagId, Name = r.EnglishName ?? r.Name }).ToArray()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user