Skip to content

Commit

Permalink
Fixes no EN translation detection is incorrect
Browse files Browse the repository at this point in the history
Fixes additional info is not being passed through duplicate detection
  • Loading branch information
ronelm2000 committed Oct 20, 2024
1 parent 9d03719 commit dc26323
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MontageWeissTools/Impls/Parsers/Cards/EncoreDecksParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private async Task<WeissSchwarzCard> Decode(EncoreDeckCard setCard)
result.AddOptionalInfo("internal.parser", new string[] { nameof(EncoreDecksParser) });
result.AddOptionalInfo(ParserInfoKey, new EncoreDeckOptionalInfo
{
HasEnglishTranslations = enOptional?.Ability is not null
HasEnglishTranslations = (enOptional?.Ability?.Count ?? 0) > 0
});

result = FixSiteErrata(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ public async IAsyncEnumerable<WeissSchwarzCard> Process(IAsyncEnumerable<WeissSc
.ToListAsync(cancellationToken);
if (dupCards.Count > 0)
{
card.AdditionalInfo = dupCards[0].AdditionalInfo
card.AdditionalInfo.AddRange(dupCards[0].AdditionalInfo
.Select(i => new WeissSchwarzCardOptionalInfo(card, i.Key) { ValueJSON = i.ValueJSON })
.ToList();
);
card.AdditionalInfo = card.AdditionalInfo.DistinctBy(oi => oi.Key).ToList();
db.RemoveRange(dupCards);
}

Expand Down
4 changes: 4 additions & 0 deletions MontageWeissTools/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@
"Export Deck (#69 - Frieren)": {
"commandName": "Project",
"commandLineArgs": "export https://www.encoredecks.com/deck/mZAbG-auc --out sharex --with sendtcp"
},
"Export Set (Frieren)": {
"commandName": "Project",
"commandLineArgs": "parse https://www.encoredecks.com/api/series/6581f1ecee85df630166d7ac/cards"
}
}
}

0 comments on commit dc26323

Please sign in to comment.