1
0
mirror of synced 2024-11-23 22:41:01 +01:00

Prevent duplicate keys in wordlist

This commit is contained in:
asesidaa 2022-09-09 23:21:46 +08:00
parent 1998c2128a
commit 75c98591d8

View File

@ -26,7 +26,8 @@ public class GameDataService : IGameDataService
musicInfo.ThrowIfNull();
wordList.ThrowIfNull();
var dict = wordList.WordListEntries.ToImmutableDictionary(entry => entry.Key);
var dict = wordList.WordListEntries.GroupBy(entry => entry.Key)
.ToImmutableDictionary(group => group.Key, group => group.First());
foreach (var music in musicInfo.Items)
{
var songNameKey = $"song_{music.Id}";