-
Notifications
You must be signed in to change notification settings - Fork 4
Configuration
felixkmh edited this page Sep 17, 2022
·
8 revisions
Themes can provide an optional themeExtras.yaml
config file in the theme root directory (next to theme.yaml
).
This allows to recommend extensions that are supported by a theme, provide banner images and link icons. Every property is optional with exception for the ThemeId
.
public class ThemeExtrasManifest
{
// Id in theme.yaml
public string ThemeId { get; set; }
// Recommended extensions that are used by
// this theme.
public class Recommendation
{
public string AddonName { get; set; }
public string AddonId { get; set; }
// Can be localised by providing a loc key starting withh `LOC`
public List<string> Features { get; set; }
}
public List<Recommendation> Recommendations { get; set; }
// Files/Directories that are saved/restored
// if users changed them
public List<string> PersistentPaths { get; set; }
// Banners
public string DefaultBannerPath { get; set; }
// Files need to be named {SpecificationId}.png or {SpecificationId}.jpg where
// {SpecificationId} needs to be replaced with the specId of a given platfrom, e.g. pc_windows.
public string BannersBySpecIdPath { get; set; }
// Files need to be named {PluginId}.png or {PluginId}.jpg where
// {PluginId} needs to be replaced with the PluginId.
public string BannersByPluginIdPath { get; set; }
// Files need to be named {PlatformName}.png or {PlatformName}.jpg where
// {PlatformName} needs to be replaced with the platform name.
public string BannersByPlatformNamePath { get; set; }
// Files need to be named {SourceName}.png or {SourceName}.jpg where
// {SourceName} needs to be replaced with the source name.
public string BannersBySourceNamePath { get; set; }
// Height with which the banners are loaded into memory. Defaults to 50.
public int? BannerDecodeHeight { get; set; }
// Link icons need to be named {subdomainX...subdomain1.domain.tld}.png
// {subdomainX...subdomain1.domain.tld}.ico or {subdomainX...subdomain1.domain.tld}.jpg.
// e.g. store.epicgames.com.png and epicgames.com.ico. epicgames.com.ico matches both
// epicgames.com and store.epicgames.com, but if store.epicgames.com.png is also available,
// it will be preferred for the latter.
public string WebsiteIconsPath { get; set; }
}
Note: Image files in PersistentPaths
or image files that are inside directories in PersistentPaths
need to be loaded with the CacheOption OnLoad
. Otherwise they cannot be overwritten when restoring files after a theme update.
Example:
ThemeId: felixkmh_DesktopTheme_DH_Dawn
Recommendations:
- AddonName: DuplicateHider
AddonId: felixkmh_DuplicateHider_Plugin
Features:
- Floating SourceSelelctor
- SourceSelector in DetailsList
- LOCReloadScriptsSuccess
- AddonName: ScreenshotVisualizer
AddonId: playnite-screenshotsvisualizer-plugin
Features:
- Show Button
PersistentPaths:
- Images/Banners
- Images/Icons
BannersBySpecIdPath: Images/Banners/PlatformSpecId
BannersByPlatformNamePath: Images/Banners/PlatformName
BannersByPluginIdPath: Images/Banners/PluginId
BannersBySourceNamePath: Images/Banners/SourceName
DefaultBannerPath: Images/Banners/UnknownLibrary.png
BannerDecodeHeight: 75