dlss-swapper icon indicating copy to clipboard operation
dlss-swapper copied to clipboard

Add partial support for Ubisoft Connect

Open cftad opened this issue 3 years ago • 4 comments

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);
    }
    });
}

cftad avatar Sep 06 '21 03:09 cftad

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.

beeradmoore avatar Sep 06 '21 03:09 beeradmoore

@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 avatar Sep 06 '21 07:09 beeradmoore

@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.

cftad avatar Sep 06 '21 22:09 cftad

https://github.com/JosefNemec/Playnite/tree/c1973fcc94da97c5863215311924e7adeddc291a/source/Plugins/UplayLibrary

Demonstrates how to fetch Ubisoft games, including artworks.

MorGuux avatar Sep 10 '21 22:09 MorGuux

This has been added in an upcoming release. Thanks for the initial work and comments on this, helped lead to a good solution.

image

beeradmoore avatar Oct 09 '22 02:10 beeradmoore

For particular changes you can see it in #88

beeradmoore avatar Oct 09 '22 02:10 beeradmoore