Table of Contents

Class Game

Namespace
Playnite.SDK.Models
Assembly
Playnite.SDK.dll

Represents Playnite game object.

public class Game : DatabaseObject, INotifyPropertyChanged, IComparable, IIdentifiable
Inheritance
Game
Implements
Inherited Members

Constructors

Game()

Creates new instance of a Game object.

public Game()

Game(string)

Creates new instance of a Game object with specific name.

public Game(string name)

Parameters

name string

Game name.

Properties

Added

Gets or sets date when game was added to library.

public DateTime? Added { get; set; }

Property Value

DateTime?

AddedSegment

Gets time segment for games added date.

public PastTimeSegment AddedSegment { get; }

Property Value

PastTimeSegment

AgeRatingIds

Gets or sets age rating for a game.

public List<Guid> AgeRatingIds { get; set; }

Property Value

List<Guid>

AgeRatings

Gets game's age rating.

public List<AgeRating> AgeRatings { get; }

Property Value

List<AgeRating>

BackgroundImage

Gets or sets background image. Local file path, HTTP URL or database file ids are supported.

public string BackgroundImage { get; set; }

Property Value

string

Categories

Gets game's categories.

public List<Category> Categories { get; }

Property Value

List<Category>

CategoryIds

Gets or sets game categories.

public List<Guid> CategoryIds { get; set; }

Property Value

List<Guid>

CommunityScore

Gets or sets community rating score.

public int? CommunityScore { get; set; }

Property Value

int?

CommunityScoreGroup

Gets game's community score group.

public ScoreGroup CommunityScoreGroup { get; }

Property Value

ScoreGroup

CommunityScoreRating

Gets game's community score rating.

public ScoreRating CommunityScoreRating { get; }

Property Value

ScoreRating

CompletionStatus

Gets game's completion status.

public CompletionStatus CompletionStatus { get; }

Property Value

CompletionStatus

CompletionStatusId

Gets or sets game completion status.

public Guid CompletionStatusId { get; set; }

Property Value

Guid

CoverImage

Gets or sets game cover image. Local file path, HTTP URL or database file ids are supported.

public string CoverImage { get; set; }

Property Value

string

CriticScore

Gets or sets critic based rating score.

public int? CriticScore { get; set; }

Property Value

int?

CriticScoreGroup

Gets game's critic score group.

public ScoreGroup CriticScoreGroup { get; }

Property Value

ScoreGroup

CriticScoreRating

Gets game's critic score rating.

public ScoreRating CriticScoreRating { get; }

Property Value

ScoreRating

Description

Gets or sets HTML game description.

public string Description { get; set; }

Property Value

string

DeveloperIds

Gets or sets list of developers.

public List<Guid> DeveloperIds { get; set; }

Property Value

List<Guid>

Developers

Gets game's developers.

public List<Company> Developers { get; }

Property Value

List<Company>

EnableSystemHdr

Gets or sets value indicating if the game is should enable HDR on the primary monitor while playing.

public bool EnableSystemHdr { get; set; }

Property Value

bool

Favorite

Gets or sets value indicating if the game is marked as favorite in library.

public bool Favorite { get; set; }

Property Value

bool

FeatureIds

Gets or sets list of game features.

public List<Guid> FeatureIds { get; set; }

Property Value

List<Guid>

Features

Gets game's features.

public List<GameFeature> Features { get; }

Property Value

List<GameFeature>

GameActions

Gets or sets list of additional game actions.

public ObservableCollection<GameAction> GameActions { get; set; }

Property Value

ObservableCollection<GameAction>

GameId

Gets or sets provider id. For example game's Steam ID.

public string GameId { get; set; }

Property Value

string

GameStartedScript

Gets or sets script to be executed after game started.

public string GameStartedScript { get; set; }

Property Value

string

GenreIds

Gets or sets list of genres.

public List<Guid> GenreIds { get; set; }

Property Value

List<Guid>

Genres

Gets game's genres.

public List<Genre> Genres { get; }

Property Value

List<Genre>

Hidden

Gets or sets value indicating if the game is hidden in library.

public bool Hidden { get; set; }

Property Value

bool

Icon

Gets or sets game icon. Local file path, HTTP URL or database file ids are supported.

public string Icon { get; set; }

Property Value

string

IncludeLibraryPluginAction

Gets or sets id of plugin responsible for handling this game.

public bool IncludeLibraryPluginAction { get; set; }

Property Value

bool

InstallDirectory

Gets or sets game installation directory path.

public string InstallDirectory { get; set; }

Property Value

string

InstallSize

Gets or sets the install size in bytes of the game.

public ulong? InstallSize { get; set; }

Property Value

ulong?

InstallSizeGroup

Gets game's install size group.

public InstallSizeGroup InstallSizeGroup { get; }

Property Value

InstallSizeGroup

InstallationStatus

Gets game installation state.

public InstallationStatus InstallationStatus { get; }

Property Value

InstallationStatus

IsCustomGame

Gets value indicating whether the game is custom game.

public bool IsCustomGame { get; }

Property Value

bool

IsInstalled

Gets or sets value indicating whether a game is installed.

public bool IsInstalled { get; set; }

Property Value

bool

IsInstalling

Gets or sets value indicating whether a game is being installed.

public bool IsInstalling { get; set; }

Property Value

bool

IsLaunching

Gets or sets value indicating whether a game is being launched.

public bool IsLaunching { get; set; }

Property Value

bool

IsRunning

Gets or sets value indicating whether a game is currently running.

public bool IsRunning { get; set; }

Property Value

bool

IsUninstalling

Gets or sets value indicating whether a game is being uninstalled.

public bool IsUninstalling { get; set; }

Property Value

bool

LastActivity

Gets or sets last played date.

public DateTime? LastActivity { get; set; }

Property Value

DateTime?

LastActivitySegment

Gets time segment for games last activity.

public PastTimeSegment LastActivitySegment { get; }

Property Value

PastTimeSegment

LastSizeScanDate

Gets or sets date of last date of install size scan made to a game.

public DateTime? LastSizeScanDate { get; set; }

Property Value

DateTime?

Gets or sets list of game related web links.

public ObservableCollection<Link> Links { get; set; }

Property Value

ObservableCollection<Link>

Manual

Gets or sets game manual.

public string Manual { get; set; }

Property Value

string

Modified

Gets or sets date of last modification made to a game.

public DateTime? Modified { get; set; }

Property Value

DateTime?

ModifiedSegment

Gets time segment for games modified date..

public PastTimeSegment ModifiedSegment { get; }

Property Value

PastTimeSegment

Notes

Gets or sets user notes.

public string Notes { get; set; }

Property Value

string

OverrideInstallState

Gets or sets value indicating whether installation state set by integration plugin should be ignored.

public bool OverrideInstallState { get; set; }

Property Value

bool

PlatformIds

Gets or sets platform id.

public List<Guid> PlatformIds { get; set; }

Property Value

List<Guid>

Platforms

Gets game's platform.

public List<Platform> Platforms { get; }

Property Value

List<Platform>

PlayCount

Gets or sets a number indicating how many times the game has been played.

public ulong PlayCount { get; set; }

Property Value

ulong

Playtime

Gets or sets played time in seconds.

public ulong Playtime { get; set; }

Property Value

ulong

PlaytimeCategory

Gets game's play time category.

public PlaytimeCategory PlaytimeCategory { get; }

Property Value

PlaytimeCategory

PluginId

Gets or sets id of plugin responsible for handling this game.

public Guid PluginId { get; set; }

Property Value

Guid

PostScript

Gets or sets post-action script.

public string PostScript { get; set; }

Property Value

string

PreScript

Gets or sets pre-action script.

public string PreScript { get; set; }

Property Value

string

PublisherIds

Gets or sets list of publishers.

public List<Guid> PublisherIds { get; set; }

Property Value

List<Guid>

Publishers

Gets game's publishers.

public List<Company> Publishers { get; }

Property Value

List<Company>

RecentActivity

Gets the most recent date between the last played and added dates.

public DateTime? RecentActivity { get; }

Property Value

DateTime?

RecentActivitySegment

Gets time segment for games recent activity.

public PastTimeSegment RecentActivitySegment { get; }

Property Value

PastTimeSegment

RegionIds

Gets or sets game region.

public List<Guid> RegionIds { get; set; }

Property Value

List<Guid>

Regions

Gets game's region.

public List<Region> Regions { get; }

Property Value

List<Region>

ReleaseDate

Gets or set game's release date.

public ReleaseDate? ReleaseDate { get; set; }

Property Value

ReleaseDate?

ReleaseYear

Gets game's release year.

public int? ReleaseYear { get; }

Property Value

int?

Roms

Gets or sets list of game ROM files.

public ObservableCollection<GameRom> Roms { get; set; }

Property Value

ObservableCollection<GameRom>

Series

Gets game's series.

public List<Series> Series { get; }

Property Value

List<Series>

SeriesIds

Gets or sets game series.

public List<Guid> SeriesIds { get; set; }

Property Value

List<Guid>

SortingName

Gets or sets optional name used for sorting the game by name.

public string SortingName { get; set; }

Property Value

string

Source

Gets game's source.

public GameSource Source { get; }

Property Value

GameSource

SourceId

Gets or sets source of the game.

public Guid SourceId { get; set; }

Property Value

Guid

TagIds

Gets or sets list of tags.

public List<Guid> TagIds { get; set; }

Property Value

List<Guid>

Tags

Gets game's tags.

public List<Tag> Tags { get; }

Property Value

List<Tag>

UseGlobalGameStartedScript

Gets or sets value indicating whether global pre script should be executed.

public bool UseGlobalGameStartedScript { get; set; }

Property Value

bool

UseGlobalPostScript

Gets or sets value indicating whether global post script should be executed.

public bool UseGlobalPostScript { get; set; }

Property Value

bool

UseGlobalPreScript

Gets or sets value indicating whether global pre script should be executed.

public bool UseGlobalPreScript { get; set; }

Property Value

bool

UserScore

Gets or sets user's rating score.

public int? UserScore { get; set; }

Property Value

int?

UserScoreGroup

Gets game's user score group.

public ScoreGroup UserScoreGroup { get; }

Property Value

ScoreGroup

UserScoreRating

Gets game's user score rating.

public ScoreRating UserScoreRating { get; }

Property Value

ScoreRating

Version

Gets or sets game version.

public string Version { get; set; }

Property Value

string

Methods

CopyDiffTo(object)

Copies differential properties to target object intance.

public override void CopyDiffTo(object target)

Parameters

target object

Target object instance to receive new data.

GetCopy()

public Game GetCopy()

Returns

Game

GetDifferences(Game)

Gets differences in game objects.

public List<GameField> GetDifferences(Game otherGame)

Parameters

otherGame Game

Game object to compare to.

Returns

List<GameField>

List of fields that differ.

GetGameRecentActivity()

Gets the most recent date between the last played and added dates.

public DateTime? GetGameRecentActivity()

Returns

DateTime?

GetInstallDrive()

Gets game Install Drive.

public string GetInstallDrive()

Returns

string

GetInstallDriveGroup()

Gets game Install Drive group.

public string GetInstallDriveGroup()

Returns

string

GetInstallSizeGroup()

Gets game Install Size group.

public InstallSizeGroup GetInstallSizeGroup()

Returns

InstallSizeGroup

GetNameGroup()

public char GetNameGroup()

Returns

char

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.