more context menu
This commit is contained in:
parent
da61c74e95
commit
c001e0d6d2
3 changed files with 12 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -26,7 +27,15 @@ internal static class EpicStore
|
||||||
string product = null;
|
string product = null;
|
||||||
try { product = element.CatalogNs.Mappings[0].PageSlug; } catch { }
|
try { product = element.CatalogNs.Mappings[0].PageSlug; } catch { }
|
||||||
string icon = null;
|
string icon = null;
|
||||||
try { icon = element.KeyImages[0].Url; } catch { }
|
for (int i = 0; i < element.KeyImages?.Length; i++)
|
||||||
|
{
|
||||||
|
KeyImage keyImage = element.KeyImages[i];
|
||||||
|
if (keyImage.Type == "Thumbnail")
|
||||||
|
{
|
||||||
|
icon = keyImage.Url;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
(string id, string name, string product, string icon) app = (element.Items[0].Id, element.Title, product, icon);
|
(string id, string name, string product, string icon) app = (element.Items[0].Id, element.Title, product, icon);
|
||||||
if (!dlcIds.Contains(app))
|
if (!dlcIds.Contains(app))
|
||||||
dlcIds.Add(app);
|
dlcIds.Add(app);
|
||||||
|
|
|
@ -22,7 +22,6 @@ internal class Request
|
||||||
elements {
|
elements {
|
||||||
id
|
id
|
||||||
title
|
title
|
||||||
offerType
|
|
||||||
items {
|
items {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
@ -41,7 +40,6 @@ internal class Request
|
||||||
elements {
|
elements {
|
||||||
id
|
id
|
||||||
title
|
title
|
||||||
offerType
|
|
||||||
items {
|
items {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,14 +30,14 @@ internal static class ParadoxLauncher
|
||||||
foreach (ProgramSelection selection in ProgramSelection.AllUsableEnabled)
|
foreach (ProgramSelection selection in ProgramSelection.AllUsableEnabled)
|
||||||
{
|
{
|
||||||
if (selection == paradoxLauncher) continue;
|
if (selection == paradoxLauncher) continue;
|
||||||
if (selection.AppInfo is null || selection.AppInfo.Value?.GetChild("extended")?.GetChild("publisher")?.ToString() != "Paradox Interactive") continue;
|
if (selection.AppInfo?.Value?.GetChild("extended")?.GetChild("publisher")?.ToString() != "Paradox Interactive") continue;
|
||||||
paradoxLauncher.ExtraDlc.Add(new(selection.Id, selection.Name, selection.SelectedDlc));
|
paradoxLauncher.ExtraDlc.Add(new(selection.Id, selection.Name, selection.SelectedDlc));
|
||||||
}
|
}
|
||||||
if (!paradoxLauncher.ExtraDlc.Any())
|
if (!paradoxLauncher.ExtraDlc.Any())
|
||||||
foreach (ProgramSelection selection in ProgramSelection.AllUsable)
|
foreach (ProgramSelection selection in ProgramSelection.AllUsable)
|
||||||
{
|
{
|
||||||
if (selection == paradoxLauncher) continue;
|
if (selection == paradoxLauncher) continue;
|
||||||
if (selection.AppInfo is null || selection.AppInfo.Value?.GetChild("extended")?.GetChild("publisher")?.ToString() != "Paradox Interactive") continue;
|
if (selection.AppInfo?.Value?.GetChild("extended")?.GetChild("publisher")?.ToString() != "Paradox Interactive") continue;
|
||||||
paradoxLauncher.ExtraDlc.Add(new(selection.Id, selection.Name, selection.AllDlc));
|
paradoxLauncher.ExtraDlc.Add(new(selection.Id, selection.Name, selection.AllDlc));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue