dlss-swapper
dlss-swapper copied to clipboard
Add partial support for Ubisoft Connect
Raised to partially address #15
- Further investigation is required for the obtaining of game artwork.
- Adding the games to the library has been omitted due to the recent filter changes.
Omitted Example
GameGridPage.xaml.cs
async Task LoadGamesAsync()
{
var steamLibrary = new SteamLibrary();
var steamGames = await steamLibrary.ListGamesAsync();
var ubiLibrary = new UbisoftLibrary();
var ubiGames = await ubiLibrary.ListGamesAsync();
List<Game> masterLibrary = new List<Game>();
masterLibrary.AddRange(steamGames);
masterLibrary.AddRange(ubiGames);
masterLibrary.Sort();
DispatcherQueue.TryEnqueue(() => {
foreach (var game in masterLibrary)
{
Games.Add(game);
}
});
}
Oh nice. I've changed the LoadGamesAsync a little so it looks like this.
async Task LoadGamesAsync()
{
GameLibraries.Clear();
var steamLibrary = new SteamLibrary();
GameLibraries.Add(steamLibrary);
var steamGamesOh Task = steamLibrary.ListGamesAsync();
await Task.WhenAll(steamGamesTask);
DispatcherQueue.TryEnqueue(() => {
FilterGames();
});
}
But that other code should slip in fine.
@cftad , I've committed my code with filter options which has the updated LoadGamesAsync in it.
Also I'll use feature branches in the future because that just sounds like a good idea in general.
@beeradmoore Awesome, I'll give that a look over, it should be possible to merge this PR without interfering with anything until the filter state is more concrete.
It might also worth be looking at configuring a project board so issues can be tracked and to give users some visibility (roadmap) as to when they might expect their requested feature to be released.
Generally, I tend to use Git Flow when developing as it provides a nice workflow, so that might be something you'd be interested in using for this project.
https://github.com/JosefNemec/Playnite/tree/c1973fcc94da97c5863215311924e7adeddc291a/source/Plugins/UplayLibrary
Demonstrates how to fetch Ubisoft games, including artworks.
This has been added in an upcoming release. Thanks for the initial work and comments on this, helped lead to a good solution.
For particular changes you can see it in #88