Playnite 11 development report
Added 2023-05-31 08:46:38 +0000 UTCHello everyone!
This is a catchup on what I've been doing lately related to P11 and other things.
First of all, I finally finished IGDB plugin rework, something I planned to do a long time ago. I'm now using local copy of IGDB (still running on Playnite server, but the entire IGDB db is copied there) with custom search (as apposed to problematic API search IGDB provides).
This will lead to better game matching, faster metadata downloads and more accurate manual search. It also means that I will now be able to add features previously not possible due to IGDB's API rate limits. One of those being IGDB search integration into Playnite's global search:

I combined this with migration from the current server host to new one, which also meant migrating backend from Windows Server 2012 (yes, the server is very old) to Ubuntu Server 22.
Both of these are not in production yet since server switch (including new IGDB server part) will be bit more complicated, I currently plan to do it over this weekend. I will make an announcement beforehand since it will cause outage of some Playnite features for some time.
Playnite 11 progress
General rewrite
Since P11 is using the newest and greatest .NET runtime, I'm going through each and every file individually rewriting/refactoring everything to make use of the latest features. Funnily enough, this often means straight up removing code since a lot of boilerplate code can be now automatically generated thanks to source generators.
The other big change is use of nullable reference types, which requires more manual work to adjust all the code to make use of it, but it's definitely worth it. You might have seen this dreaded C# error from Playnite itself of some extension: "Object reference not set to an instance of an object". These errors should be now basically completely eliminated.
I'm now also finally able to update many dependency packages to latest versions or even completely remove some of them. One example being Newtonsoft.Json, which you might have come across if you are an extension developer (and it might have caused you some issues thanks to Playnite using old version). Modern .NET introduced a lot of new APIs that previously required 3rd party packages, one of them being good JSON serialization API, so Playnite no longer uses Newtonsoft package.
Various other dependency version conflict issues between Playnite and plugins will be solved via "dependency isolation", which I haven't started working on yet, so I'll go into detail in future post about it.
Overall this is kind of boring and lengthy process so there's nothing that much interesting to report here.
Translations
I switched translation system from using simple XAML based strings to using Project Fluent translation files. This will make it possible for languages to properly support various plural forms and other string variants based on string parameters (for example number of games being referenced, referenced date etc.).
Data storage
I've changed how library data are being saved to the disk. This changed already several times in the past, but I'm 99% sure this is for the last time. I'm switching to "industry standard" SQLite from LiteDB. LiteDB begin native to .NET served me fairly well, but new versions develop in a way which is not suitable for Playnite, which is also the reason why we are currently one major LiteDB version behind.
Move to SQLite should also make it possible to edit library data outside of Playnite more easily. Not that I will officially recommend or support it, but in case somebody will want to do it, they should have less issues with it now.
UI future
I haven't implemented anything related to UI in P11 yet, but there's a big change related to UI since I last mentioned it. It the previous development report I mentioned long term roadmap that looked something like this:
- P11: move to modern .NET, breaking changes to the addon SDK
- P12: no breaking changes to addons
- P13: move to new UI framework, breaking changes to the addon SDK
- P14: no breaking changes to addons
- P15: no breaking changes to addons
This is now changing to:
- P11: move to modern .NET and new UI framework, breaking changes to the addon SDK
- P12: no breaking changes to addons
- P13: no breaking changes to addons
- P14: no breaking changes to addons
- P15: no breaking changes to addons
There are two main reasons I'm now including UI rework in P11:
1) Breaking changes to addons simply suck. People spend a lot of work developing addons in their free time and I completely understand that they might not have time updating them for newer Playnite versions, which inevitably means that these addons simply die. P11 should be the last addon breaking update for a long time. There might be specific changes to the SDK functionality in future which could make some addons loose some functionality, but not in a way that addon will completely stop working.
2) Current UI framework (WPF) is simply becoming too much of a burden and limiting factor when trying to add certain features or improve performance. I was kind of hoping that development on it will pick up somewhat since Microsoft open sourced it, but that's sadly not the case.
I previously mentioned Avalonia specifically as new UI framework of choice, but I'm not 100% decided on that yet. I've spent a long time trying out various other options and I still don't know what I end up using. It's either Avalonia or custom framework built on top of Godot engine.
This will obviously add lot more work into P11, but it will be definitely worth it. I still plan to have some version of P11 out this year, definitely at least some beta version for extension and theme devs to start migrating their addons.
As always, thank you very much for continued support!
Josef
Comments
Got it, thanks for the response :)
Szynek
2023-06-04 12:45:44 +0000 UTCIt's something I will definitely look into after P11 is out, but I don't have any specific plans to support Linux at the moment.
Josef Nemec
2023-06-04 11:59:39 +0000 UTCHello, quick question when it comes to newer .NET version. With .NET being multi-platform, does this brings you closer to potential Linux version? I know that it would be a lot of other work (I'd imagine it would take years, rather than weeks/months), I'm just asking, whether it is more likely to happen / are you even considering that?
Szynek
2023-06-04 11:43:01 +0000 UTCDon't feel bad, my domain controller is still 2008 R2. (I never upgraded beyond that because it worked and I'm not fond of the lesser update/reboot control since that version although now I know ways around that with GPOs.)
Lee Thompson
2023-05-31 09:36:11 +0000 UTCCan't wait for the new theme engine, whatever you decide on. I'm sure I'll have fun messing around with it!
David Griggs
2023-05-31 09:06:23 +0000 UTC