Closed Destinybladez closed 2 years ago
I've added banners but they are only for the game Library.
I'm afraid that adding support to Sources, Platforms or any other field is a no go from me. It needs to be done using a field that all games always have and can't be changed, like the PluginId in my implementation.
I've seen that other themes do it but with all respect, the solutions are very hacky and have numerous issues that I'm not okay with adding for my themes:
They do it by accessing the game property list by index, for example: game.Platforms[0].Name. This is a bad idea because the list those properties can be Null or not have items. Accessing like this is not a good idea
After getting the Platform name like that, then the theme tries to load an image with that name like C:\ThemePath\Xbox 360.png This results in tons of errors if the expected image is not there
This doesn't take into account if there are invalid characters in the Platform name that can't be used in filenames
This solution requires hardcoded platform names. If the name changes, the banners will break.
After all that, the banner is loaded for every game. This results in a significant performance and memory usage hit.
I implemented banners in a different way to how it's been done before in other themes and doesn't carries these issues but has the limitation of only be able to use PluginIds. I think I'd be a cool feature but for those reasons unfortunately I can't add support for that. This will have to wait until there's native support in Playnite or if someone makes an extension for that.
Feature Description
Is it possible to add store/console banners at the top of the game grids?
Screenshots