├── .github
└── FUNDING.yml
├── CommonPluginsShared
├── Resources
│ └── font.ttf
├── Interfaces
│ ├── IDataContext.cs
│ ├── IPluginSettings.cs
│ └── IPluginDatabase.cs
├── Collections
│ └── PluginDataBaseGameDetails.cs
├── Models
│ ├── SourceLink.cs
│ ├── Folder.cs
│ ├── PluginPaths.cs
│ ├── DataGame.cs
│ ├── CheckElement.cs
│ └── TraceInfos.cs
├── CommonPluginsShared.sln
├── Converters
│ ├── EnumToBooleanConverter.cs
│ ├── HeightToFontSizeConverter.cs
│ ├── ValueOperationConverter.cs
│ ├── TwoBooleanToVisibilityConverter.cs
│ ├── ImageToGrayConverter.cs
│ ├── GetImageConverter.cs
│ ├── StringRemoveConverter.cs
│ ├── ListMoreOneBoolConverter.cs
│ ├── IndexConverter.cs
│ ├── StringToBooleanConverter.cs
│ ├── LocalTimeConverter.cs
│ ├── LocalDateConverter.cs
│ ├── LocalDateTimeConverter.cs
│ ├── VisibilityZeroConverter.cs
│ ├── DockToStringConverter.cs
│ └── GetMediaTypeConverter.cs
├── CumulsErrors.cs
├── Plugins
│ ├── PluginMenu.cs
│ └── PluginElement.cs
├── Paths.cs
├── CommonPluginsShared.shproj
└── Commands.cs
├── CommonPluginsResources
├── Resources
│ ├── font.ttf
│ ├── akr.WPF.Controls.ColorPicker.dll
│ ├── Common.xaml
│ ├── LiveChartsCommon
│ │ └── Common.xaml
│ └── Controls
│ │ └── ListExtendStyle.xaml
├── ResourcesPlaynite
│ ├── icofont.ttf
│ ├── DerivedStyles
│ │ ├── BottomButton.xaml
│ │ └── HighlightBorder.xaml
│ ├── DefaultControls
│ │ ├── Border.xaml
│ │ ├── GridSplitter.xaml
│ │ ├── Popup.xaml
│ │ ├── TextBlock.xaml
│ │ ├── ToolTip.xaml
│ │ ├── Label.xaml
│ │ ├── Hyperlink.xaml
│ │ └── ContextMenu.xaml
│ ├── AmazonLocSource.xaml
│ ├── OriginLocSource.xaml
│ ├── UplayLocSource.xaml
│ ├── Common.xaml
│ ├── RockstarLibrary.xaml
│ └── BattleNetLocSource.xaml
└── Properties
│ └── AssemblyInfo.cs
├── crowdin.yml
├── App.config
├── .coderabbit.yaml
├── CommonPluginsStores
├── Epic
│ └── Models
│ │ ├── AgeGatings.cs
│ │ ├── Category.cs
│ │ ├── CustomAttribute.cs
│ │ ├── Response
│ │ ├── CatalogNamespaceResponse.cs
│ │ ├── CatalogOfferResponse.cs
│ │ ├── PlaytimeItem.cs
│ │ └── LibraryItemsResponse.cs
│ │ ├── Mappings.cs
│ │ ├── ReleaseInfo.cs
│ │ ├── CatalogNs.cs
│ │ ├── Catalog.cs
│ │ ├── KeyImage.cs
│ │ ├── Query
│ │ ├── QueryPlayerAchievement.cs
│ │ └── QueryGetCatalogMappings.cs
│ │ ├── Mapping.cs
│ │ └── Asset.cs
├── Gog
│ └── Models
│ │ ├── UserDataOwned.cs
│ │ ├── PriceData.cs
│ │ ├── WishlistResult.cs
│ │ ├── Common.cs
│ │ ├── PriceResult.cs
│ │ ├── ProfileGames.cs
│ │ └── AccountBasicResponse.cs
├── Models
│ ├── Enumerations
│ │ ├── AccountStatus.cs
│ │ └── AuthStatus.cs
│ ├── AccountWishlist.cs
│ ├── AccountGameInfos.cs
│ ├── GameDlcOwned.cs
│ ├── StoreToken.cs
│ ├── GameInfos.cs
│ ├── AchievementProgression.cs
│ ├── StoreCurrency.cs
│ ├── StoreSettings.cs
│ ├── BasicAccountGameInfos.cs
│ └── Interfaces
│ │ └── IStoreApi.cs
├── Steam
│ └── Models
│ │ ├── SteamKit
│ │ ├── SteamStats.cs
│ │ ├── SteamFriend.cs
│ │ ├── SteamPlayerAchievement.cs
│ │ └── SteamSchema.cs
│ │ ├── SteamUser.cs
│ │ ├── RgProfileData.cs
│ │ ├── SteamFriendsList.cs
│ │ ├── ExtensionsAchievements.cs
│ │ ├── SteamAppList.cs
│ │ ├── SteamAchievementData.cs
│ │ ├── SteamGameAchievements.cs
│ │ ├── SteamOwnedGames.cs
│ │ ├── SteamPlayerSummaries.cs
│ │ └── SteamSearch.cs
├── GameJolt
│ └── Models
│ │ ├── C.cs
│ │ ├── AvatarFrame.cs
│ │ ├── Compatibility.cs
│ │ ├── TrophiesOverwiew.cs
│ │ ├── Theme.cs
│ │ ├── Sellable.cs
│ │ ├── Trophy.cs
│ │ ├── SiteTrophy.cs
│ │ ├── ProfileTrophiesGame.cs
│ │ ├── GameTrophy.cs
│ │ └── Ressource.cs
├── Ea
│ └── Models
│ │ └── Query
│ │ ├── QueryIdentity.cs
│ │ ├── QueryFriends.cs
│ │ ├── QueryRecentGames.cs
│ │ ├── ResponseFriends.cs
│ │ ├── QueryAchievements.cs
│ │ ├── ResponseRecentGames.cs
│ │ ├── ResponseAchievements.cs
│ │ └── ResponseIdentity.cs
├── Psn
│ └── Models
│ │ └── PsnApi.cs
├── CommonPluginsStores.shproj
└── Uplay
│ └── UplayAPI.cs
├── CommonPluginsControls
├── packages.config
├── LiveChartsCommon
│ ├── CustomerForSingle.cs
│ ├── CustomerForTime.cs
│ └── CustomerToolTipForMultipleSingle.xaml.cs
├── Controls
│ ├── TextBlockTrimmed.xaml
│ └── ComboBoxRemovable.xaml.cs
├── PlayniteControls
│ └── SearchBox.xaml
├── Stores
│ ├── Steam
│ │ └── PanelViewModel.cs
│ ├── Gog
│ │ └── PanelViewModel.cs
│ ├── GameJolt
│ │ └── PanelViewModel.cs
│ └── Epic
│ │ └── PanelViewModel.cs
├── Views
│ ├── ListDataUpdated.xaml.cs
│ ├── SelectVariable.xaml.cs
│ └── ListWithNoData.xaml.cs
└── Properties
│ └── AssemblyInfo.cs
├── CommonPlayniteShared
├── Native
│ ├── Fileapi.cs
│ ├── Psapi.cs
│ ├── Winbase.cs
│ ├── Shlwapi.cs
│ ├── Processthreadsapi.cs
│ └── Winnt.cs
├── PluginLibrary
│ ├── HumbleLibrary
│ │ └── Models
│ │ │ └── UserHome.cs
│ ├── OriginLibrary
│ │ └── Models
│ │ │ ├── AppsListResponse.cs
│ │ │ ├── AuthTokenResponse.cs
│ │ │ ├── AccountInfoResponse.cs
│ │ │ ├── StorePageMetadata.cs
│ │ │ ├── AccountEntitlementsResponse.cs
│ │ │ ├── UsageReponse.cs
│ │ │ ├── GameStoreDataResponse.cs
│ │ │ └── GameLocalDataResponse.cs
│ ├── EpicLibrary
│ │ └── Models
│ │ │ ├── AccountResponse.cs
│ │ │ ├── ErrorResponse.cs
│ │ │ ├── OauthResponse.cs
│ │ │ └── LauncherInstalled.cs
│ ├── GogLibrary
│ │ └── Models
│ │ │ ├── PagedResponse.cs
│ │ │ ├── AccountBasicResponse.cs
│ │ │ ├── LibraryGameResponse.cs
│ │ │ └── ProductApiDetail.cs
│ ├── BattleNetLibrary
│ │ └── Models
│ │ │ └── BattleNetApiStatus.cs
│ └── NintendoLibrary
│ │ └── Models
│ │ └── NintendoModels.cs
├── Common
│ ├── Units.cs
│ ├── DesignerTools.cs
│ ├── Xaml.cs
│ ├── GlobalRandom.cs
│ ├── Constants.cs
│ └── Extensions
│ │ ├── ItemsControlExtensions.cs
│ │ └── Enums.cs
├── Converters
│ ├── NegateConverter.cs
│ ├── InvertedBoolenConverter.cs
│ ├── TwoBooleanToBooleanConverter.cs
│ ├── ObjectToStringConverter.cs
│ ├── StringNullOrEmptyToBoolConverter.cs
│ └── StringNullOrEmptyToVisibilityConverter.cs
├── CommonPlayniteShared.shproj
├── Extensions
│ └── IProvideValueTarget.cs
├── Settings
│ └── PlayniteSettings.cs
└── Behaviors
│ └── MediaElementBehaviors.cs
├── README.md
├── LICENSE
└── PluginCommon.csproj
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | ko_fi: lacro59
2 |
--------------------------------------------------------------------------------
/CommonPluginsShared/Resources/font.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lacro59/playnite-plugincommon/HEAD/CommonPluginsShared/Resources/font.ttf
--------------------------------------------------------------------------------
/CommonPluginsResources/Resources/font.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lacro59/playnite-plugincommon/HEAD/CommonPluginsResources/Resources/font.ttf
--------------------------------------------------------------------------------
/crowdin.yml:
--------------------------------------------------------------------------------
1 | files:
2 | - source: /CommonPluginsResources/Localization/Common/LocSource.xaml
3 | translation: /%original_path%/%locale_with_underscore%.xaml
4 |
--------------------------------------------------------------------------------
/CommonPluginsResources/ResourcesPlaynite/icofont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lacro59/playnite-plugincommon/HEAD/CommonPluginsResources/ResourcesPlaynite/icofont.ttf
--------------------------------------------------------------------------------
/CommonPluginsResources/Resources/akr.WPF.Controls.ColorPicker.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lacro59/playnite-plugincommon/HEAD/CommonPluginsResources/Resources/akr.WPF.Controls.ColorPicker.dll
--------------------------------------------------------------------------------
/CommonPluginsShared/Interfaces/IDataContext.cs:
--------------------------------------------------------------------------------
1 | namespace CommonPluginsShared.Interfaces
2 | {
3 | public interface IDataContext
4 | {
5 | bool IsActivated { get; set; }
6 | }
7 | }
--------------------------------------------------------------------------------
/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CommonPluginsResources/Resources/Common.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/.coderabbit.yaml:
--------------------------------------------------------------------------------
1 | # .coderabbit.yaml
2 | reviews:
3 | auto_review:
4 | enabled: true
5 | base_branches:
6 | - "devel"
7 | ignore_title_keywords:
8 | - "l10n"
9 | - "localization"
10 | - "translation"
11 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/AgeGatings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Playnite.SDK.Data;
4 |
5 | namespace CommonPluginsStores.Epic.Models
6 | {
7 | public class AgeGatings
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/CommonPluginsShared/Collections/PluginDataBaseGameDetails.cs:
--------------------------------------------------------------------------------
1 | namespace CommonPluginsShared.Collections
2 | {
3 | public abstract class PluginDataBaseGameDetails : PluginDataBaseGame
4 | {
5 | public abstract Y ItemsDetails { get; set; }
6 | }
7 | }
--------------------------------------------------------------------------------
/CommonPluginsControls/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Gog/Models/UserDataOwned.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK.Data;
2 | using System.Collections.Generic;
3 |
4 | namespace CommonPluginsStores.Gog.Models
5 | {
6 | public class UserDataOwned
7 | {
8 | [SerializationPropertyName("owned")]
9 | public List Owned { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/Category.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Playnite.SDK.Data;
4 |
5 | namespace CommonPluginsStores.Epic.Models
6 | {
7 | public class Category
8 | {
9 | [SerializationPropertyName("path")]
10 | public string Path { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Models/Enumerations/AccountStatus.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Models.Enumerations
6 | {
7 | public enum AccountStatus
8 | {
9 | Checking,
10 | Private,
11 | Public,
12 | Unknown
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Steam/Models/SteamKit/SteamStats.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Steam.Models.SteamKit
6 | {
7 | public class SteamStats
8 | {
9 | public string Name { get; set; }
10 | public string Value { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/Native/Fileapi.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.Native
8 | {
9 | public class Fileapi
10 | {
11 | public const uint FILE_FLAG_BACKUP_SEMANTICS = 0x2000000;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CommonPluginsShared/Models/SourceLink.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsShared.Models
6 | {
7 | public class SourceLink
8 | {
9 | public string Name { get; set; }
10 | public string GameName { get; set; }
11 | public string Url { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/HumbleLibrary/Models/UserHome.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.HumbleLibrary.Models
8 | {
9 | public class UserHome
10 | {
11 | public List gamekeys;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/OriginLibrary/Models/AppsListResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPlayniteShared.PluginLibrary.OriginLibrary.Models
6 | {
7 | public class AppsListResponse
8 | {
9 | public int totalCount;
10 | public List offers;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Models/Enumerations/AuthStatus.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Models.Enumerations
6 | {
7 | public enum AuthStatus
8 | {
9 | Ok,
10 | Checking,
11 | AuthRequired,
12 | PrivateAccount,
13 | Failed,
14 | Unknown
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Gog/Models/PriceData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Gog.Models
6 | {
7 | public class PriceData
8 | {
9 | public dynamic DataObj { get; set; }
10 | public string CodeCurrency { get; set; }
11 | public string SymbolCurrency { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CommonPluginsControls/LiveChartsCommon/CustomerForSingle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CommonPluginsControls.LiveChartsCommon
4 | {
5 | public class CustomerForSingle
6 | {
7 | public string Icon { get; set; }
8 | public string IconText { get; set; }
9 |
10 | public string Name { get; set; }
11 | public double Values { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CommonPluginsShared/Models/Folder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsShared.Models
6 | {
7 | public class Folder
8 | {
9 | public string FolderPath { get; set; }
10 |
11 | // Specific SteamEmulator
12 | public string GameId { get; set; }
13 | public bool HasGame { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Steam/Models/SteamKit/SteamFriend.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Steam.Models.SteamKit
6 | {
7 | public class SteamFriend
8 | {
9 | public ulong SteamId { get; set; }
10 | public string Relationship { get; set; }
11 | public DateTime FriendSince { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/EpicLibrary/Models/AccountResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.EpicLibrary.Models
8 | {
9 | public class AccountResponse
10 | {
11 | public string id;
12 | public string displayName;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CommonPluginsShared/Models/PluginPaths.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsShared.Models
6 | {
7 | public class PluginPaths
8 | {
9 | public string PluginPath { get; set; }
10 | public string PluginUserDataPath { get; set; }
11 | public string PluginDatabasePath { get; set; }
12 | public string PluginCachePath { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CommonPluginsShared/Models/DataGame.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsShared.Models
6 | {
7 | public class DataGame
8 | {
9 | public Guid Id { get; set; }
10 | public string Icon { get; set; }
11 | public string Name { get; set; }
12 |
13 | public bool IsDeleted { get; set; }
14 | public ulong CountData { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Steam/Models/SteamUser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Steam.Models
6 | {
7 | public class SteamUser
8 | {
9 | public ulong SteamId { get; set; }
10 | public uint AccountId => SteamApi.GetAccountId(SteamId);
11 | public string AccountName { get; set; }
12 | public string PersonaName { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Gog/Models/WishlistResult.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK.Data;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace CommonPluginsStores.Gog.Models
7 | {
8 | public class WishlistResult
9 | {
10 | [SerializationPropertyName("wishlist")]
11 | public dynamic Wishlist { get; set; }
12 |
13 | [SerializationPropertyName("checksum")]
14 | public string Checksum { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CommonPluginsStores/GameJolt/Models/C.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK.Data;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace CommonPluginsStores.GameJolt.Models
9 | {
10 | public class C
11 | {
12 | [SerializationPropertyName("eea")]
13 | public bool Eea { get; set; }
14 |
15 | [SerializationPropertyName("ads")]
16 | public bool Ads { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/OriginLibrary/Models/AuthTokenResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.OriginLibrary.Models
8 | {
9 | public class AuthTokenResponse
10 | {
11 | public string error;
12 | public string expires_in;
13 | public string token_type;
14 | public string access_token;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CommonPluginsShared/Models/CheckElement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsShared.Models
6 | {
7 | public class CheckElement
8 | {
9 | public Guid Id { get; set; }
10 | public string Icon { get; set; }
11 | public string Name { get; set; }
12 | public string NameShort { get; set; }
13 | public bool IsCheck { get; set; }
14 | public bool IsVisible { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Steam/Models/SteamKit/SteamPlayerAchievement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Steam.Models.SteamKit
6 | {
7 | public class SteamPlayerAchievement
8 | {
9 | public string ApiName { get; set; }
10 | public int Achieved { get; set; }
11 | public DateTime UnlockTime { get; set; }
12 | public string Name { get; set; }
13 | public string Description { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/CommonPluginsStores/GameJolt/Models/AvatarFrame.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK.Data;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace CommonPluginsStores.GameJolt.Models
9 | {
10 | public class AvatarFrame
11 | {
12 | [SerializationPropertyName("id")]
13 | public int Id { get; set; }
14 |
15 | [SerializationPropertyName("image_url")]
16 | public string ImageUrl { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CommonPluginsResources/ResourcesPlaynite/DerivedStyles/BottomButton.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/EpicLibrary/Models/ErrorResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.EpicLibrary.Models
8 | {
9 | public class ErrorResponse
10 | {
11 | public string errorCode;
12 | public string errorMessage;
13 | public int numericErrorCode;
14 | public string originatingService;
15 | public string intent;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CommonPluginsShared/Interfaces/IPluginSettings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsShared.Interfaces
6 | {
7 | public interface IPluginSettings
8 | {
9 | bool MenuInExtensions { get; set; }
10 |
11 | bool EnableTag { get; set; }
12 |
13 | #region Automatic update when updating library
14 | DateTime LastAutoLibUpdateAssetsDownload { get; set; }
15 | bool AutoImport { get; set; }
16 | #endregion
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/CustomAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Playnite.SDK.Data;
4 |
5 | namespace CommonPluginsStores.Epic.Models
6 | {
7 | public class CustomAttribute
8 | {
9 | [SerializationPropertyName("key")]
10 | public string Key { get; set; }
11 |
12 | [SerializationPropertyName("value")]
13 | public string Value { get; set; }
14 |
15 | [SerializationPropertyName("type")]
16 | public string Type { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/Response/CatalogNamespaceResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Playnite.SDK.Data;
3 |
4 | namespace CommonPluginsStores.Epic.Models.Response
5 | {
6 | public class CatalogNamespaceResponse
7 | {
8 | [SerializationPropertyName("data")]
9 | public DataCatalogNamespace Data { get; set; }
10 | }
11 |
12 | public class DataCatalogNamespace
13 | {
14 | [SerializationPropertyName("Catalog")]
15 | public Catalog Catalog { get; set; }
16 | }
17 | }
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/Response/CatalogOfferResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Playnite.SDK.Data;
4 |
5 | namespace CommonPluginsStores.Epic.Models.Response
6 | {
7 | public class CatalogOfferResponse
8 | {
9 | [SerializationPropertyName("data")]
10 | public DataCatalogOffer Data { get; set; }
11 | }
12 |
13 | public class DataCatalogOffer
14 | {
15 | [SerializationPropertyName("Catalog")]
16 | public Catalog Catalog { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/OriginLibrary/Models/AccountInfoResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.OriginLibrary.Models
8 | {
9 | public class AccountInfoResponse
10 | {
11 | public class AcccountInfoData
12 | {
13 | public long pidId;
14 | }
15 |
16 | public string error;
17 | public AcccountInfoData pid;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/Mappings.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Playnite.SDK.Data;
3 |
4 | namespace CommonPluginsStores.Epic.Models
5 | {
6 | public class Mappings
7 | {
8 | [SerializationPropertyName("cmsSlug")]
9 | public string CmsSlug { get; set; }
10 |
11 | [SerializationPropertyName("offerId")]
12 | public object OfferId { get; set; }
13 |
14 | [SerializationPropertyName("prePurchaseOfferId")]
15 | public object PrePurchaseOfferId { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/Common/Units.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.Common
8 | {
9 | public static class Units
10 | {
11 | public static long MegaBytesToBytes(long megaBytes)
12 | {
13 | return megaBytes * 1024 * 1024;
14 | }
15 |
16 | public static long BytesToMegaBytes(long bytes)
17 | {
18 | return bytes / 1024 / 1024;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/Native/Psapi.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace CommonPlayniteShared.Native
9 | {
10 | public class Psapi
11 | {
12 | private const string dllName = "Psapi.dll";
13 |
14 | [DllImport(dllName, SetLastError = true, CharSet = CharSet.Unicode)]
15 | public static extern int GetMappedFileName(IntPtr hProcess, IntPtr lpv, StringBuilder lpFilename, int nSize);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/Response/PlaytimeItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Playnite.SDK.Data;
4 |
5 | namespace CommonPluginsStores.Epic.Models.Response
6 | {
7 | public class PlaytimeItem
8 | {
9 | [SerializationPropertyName("accountId")]
10 | public string AccountId { get; set; }
11 |
12 | [SerializationPropertyName("artifactId")]
13 | public string ArtifactId { get; set; }
14 |
15 | [SerializationPropertyName("totalTime")]
16 | public int TotalTime { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/GogLibrary/Models/PagedResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.GogLibrary.Models
8 | {
9 | public class PagedResponse
10 | {
11 | public class Embedded
12 | {
13 | public List items;
14 | }
15 |
16 | public int page;
17 | public int pages;
18 | public int total;
19 | public int limit;
20 | public Embedded _embedded;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CommonPluginsControls/LiveChartsCommon/CustomerForTime.cs:
--------------------------------------------------------------------------------
1 | using CommonPluginsControls.Controls;
2 | using System;
3 |
4 | namespace CommonPluginsControls.LiveChartsCommon
5 | {
6 | public class CustomerForTime
7 | {
8 | public string Icon { get; set; }
9 | public string IconText { get; set; }
10 |
11 | public bool HideIsZero { get; set; }
12 |
13 | public string Name { get; set; }
14 | public long Values { get; set; }
15 | public string ValuesFormat => (int)TimeSpan.FromSeconds(Values).TotalHours + "h " + TimeSpan.FromSeconds(Values).ToString(@"mm") + "min";
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Models/AccountWishlist.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CommonPluginsStores.Models
4 | {
5 | ///
6 | /// Represents a user's game wishlist in an account.
7 | /// Inherits from to include basic game details.
8 | ///
9 | public class AccountWishlist : BasicAccountGameInfos
10 | {
11 | private DateTime? _added;
12 |
13 | ///
14 | /// Gets or sets the date when the game was added to the wishlist.
15 | ///
16 | public DateTime? Added { get => _added; set => _added = value; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/GogLibrary/Models/AccountBasicResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.GogLibrary.Models
8 | {
9 | public class AccountBasicResponse
10 | {
11 | public string accessToken;
12 | public int accessTokenExpires;
13 | public string avatar;
14 | public int cacheExpires;
15 | public string clientId;
16 | public bool isLoggedIn;
17 | public string userId;
18 | public string username;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/ReleaseInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Playnite.SDK.Data;
4 |
5 | namespace CommonPluginsStores.Epic.Models
6 | {
7 | public class ReleaseInfo
8 | {
9 | [SerializationPropertyName("id")]
10 | public string Id { get; set; }
11 |
12 | [SerializationPropertyName("appId")]
13 | public string AppId { get; set; }
14 |
15 | [SerializationPropertyName("platform")]
16 | public List Platform { get; set; }
17 |
18 | [SerializationPropertyName("dateAdded")]
19 | public DateTime DateAdded { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/CatalogNs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Playnite.SDK.Data;
4 |
5 | namespace CommonPluginsStores.Epic.Models
6 | {
7 | public class CatalogNs
8 | {
9 | [SerializationPropertyName("displayName")]
10 | public string DisplayName { get; set; }
11 |
12 | [SerializationPropertyName("mappings")]
13 | public List Mappings { get; set; }
14 |
15 | [SerializationPropertyName("parent")]
16 | public string Parent { get; set; }
17 |
18 | [SerializationPropertyName("store")]
19 | public string Store { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Models/AccountGameInfos.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Collections.ObjectModel;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace CommonPluginsStores.Models
8 | {
9 | public class AccountGameInfos : BasicAccountGameInfos
10 | {
11 | public bool IsCommun { get; set; }
12 | public int Playtime { get; set; }
13 |
14 | public int AchievementsUnlocked => Achievements?.Where(y => y.DateUnlocked != default)?.Count() ?? 0;
15 | public ObservableCollection Achievements { get; set; }
16 |
17 | public DateTime LastCall => DateTime.Now;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Steam/Models/RgProfileData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using Playnite.SDK.Data;
5 |
6 | namespace CommonPluginsStores.Steam.Models
7 | {
8 | public class RgProfileData
9 | {
10 | [SerializationPropertyName("url")]
11 | public string Url { get; set; }
12 |
13 | [SerializationPropertyName("steamid")]
14 | public ulong SteamId { get; set; }
15 |
16 | [SerializationPropertyName("personaname")]
17 | public string PersonaName { get; set; }
18 |
19 | [SerializationPropertyName("summary")]
20 | public string Summary { get; set; }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/Native/Winbase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace CommonPlayniteShared.Native
9 | {
10 | [UnmanagedFunctionPointer(CallingConvention.Winapi, SetLastError = true, CharSet = CharSet.Unicode)]
11 | public delegate bool ENUMRESNAMEPROC(IntPtr hModule, IntPtr lpszType, IntPtr lpszName, IntPtr lParam);
12 |
13 | [StructLayout(LayoutKind.Sequential)]
14 | public struct SECURITY_ATTRIBUTES
15 | {
16 | public int nLength;
17 | public IntPtr lpSecurityDescriptor;
18 | public int bInheritHandle;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/BattleNetLibrary/Models/BattleNetApiStatus.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.BattleNetLibrary.Models
8 | {
9 | public class BattleNetApiStatus
10 | {
11 | public class AccountCompletion
12 | {
13 | public bool requiresHealup;
14 | public string accountCountry;
15 | public string completionUrl;
16 | }
17 |
18 | public AccountCompletion accountCompletion;
19 | public string logoutUri;
20 | public string loginUri;
21 | public bool authenticated;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/Catalog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Playnite.SDK.Data;
4 |
5 | namespace CommonPluginsStores.Epic.Models
6 | {
7 | public class Catalog
8 | {
9 | [SerializationPropertyName("catalogOffer")]
10 | public CatalogOffer CatalogOffer { get; set; }
11 |
12 | [SerializationPropertyName("catalogOffers")]
13 | public CatalogOffers CatalogOffers { get; set; }
14 |
15 | [SerializationPropertyName("catalogNs")]
16 | public CatalogNs CatalogNs { get; set; }
17 | }
18 |
19 | public class CatalogOffers
20 | {
21 | [SerializationPropertyName("elements")]
22 | public List Elements { get; set; }
23 | }
24 | }
--------------------------------------------------------------------------------
/CommonPlayniteShared/Common/DesignerTools.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace CommonPlayniteShared.Common
9 | {
10 | public class DesignerTools
11 | {
12 | private static bool? inDesignMode = null;
13 |
14 | public static bool IsInDesignMode
15 | {
16 | get
17 | {
18 | if (inDesignMode == null)
19 | {
20 | inDesignMode = DesignerProperties.GetIsInDesignMode(new System.Windows.DependencyObject());
21 | }
22 |
23 | return inDesignMode.Value;
24 | }
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/CommonPluginsControls/Controls/TextBlockTrimmed.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/CommonPluginsResources/ResourcesPlaynite/DefaultControls/Border.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
12 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Gog/Models/Common.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK.Data;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace CommonPluginsStores.Gog.Models
7 | {
8 | public class Links
9 | {
10 | [SerializationPropertyName("self")]
11 | public Ref Self { get; set; }
12 |
13 | [SerializationPropertyName("first")]
14 | public Ref First { get; set; }
15 |
16 | [SerializationPropertyName("last")]
17 | public Ref Last { get; set; }
18 |
19 | [SerializationPropertyName("next")]
20 | public Ref Next { get; set; }
21 | }
22 |
23 | public class Ref
24 | {
25 | [SerializationPropertyName("href")]
26 | public string Href { get; set; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/OriginLibrary/Models/StorePageMetadata.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.OriginLibrary.Models
8 | {
9 | public class StorePageMetadata
10 | {
11 | public class Components
12 | {
13 | public List> items;
14 | }
15 |
16 | public class GameHub
17 | {
18 | public string name;
19 | public string type;
20 | public string locale;
21 | public string country;
22 | public Components components;
23 | }
24 |
25 | public GameHub gamehub;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Models/GameDlcOwned.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace CommonPluginsStores.Models
5 | {
6 | ///
7 | /// Represents a downloadable content (DLC) owned by the user.
8 | ///
9 | public class GameDlcOwned : ObservableObject
10 | {
11 | private string _id;
12 |
13 | ///
14 | /// Gets or sets the unique identifier for the DLC.
15 | ///
16 | public string Id { get => _id; set => _id = value; }
17 |
18 | private string _id2;
19 |
20 | ///
21 | /// Gets or sets the unique identifier for the DLC.
22 | ///
23 | public string Id2 { get => _id2; set => _id2 = value; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Ea/Models/Query/QueryIdentity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Ea.Models.Query
6 | {
7 | public class QueryIdentity
8 | {
9 | public string query = @"
10 | query {
11 | me {
12 | player {
13 | pd
14 | psd
15 | displayName
16 | uniqueName
17 | nickname
18 | avatar {
19 | medium {
20 | path
21 | }
22 | }
23 | }
24 | }
25 | }";
26 | }
27 | }
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/Response/LibraryItemsResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Playnite.SDK.Data;
4 |
5 | namespace CommonPluginsStores.Epic.Models.Response
6 | {
7 | public class LibraryItemsResponse
8 | {
9 | [SerializationPropertyName("responseMetadata")]
10 | public ResponseMetadata ResponseMetadata { get; set; } = new ResponseMetadata();
11 |
12 | [SerializationPropertyName("records")]
13 | public List Records { get; set; }
14 | }
15 |
16 | public class ResponseMetadata
17 | {
18 | [SerializationPropertyName("nextCursor")]
19 | public string NextCursor { get; set; }
20 |
21 | [SerializationPropertyName("stateToken")]
22 | public string StateToken { get; set; }
23 | }
24 | }
--------------------------------------------------------------------------------
/CommonPluginsResources/ResourcesPlaynite/DefaultControls/GridSplitter.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
12 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/GogLibrary/Models/LibraryGameResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.GogLibrary.Models
8 | {
9 | public class LibraryGameResponse
10 | {
11 | public class Game
12 | {
13 | public string id;
14 | public bool achievementSupport;
15 | public string image;
16 | public string title;
17 | public string url;
18 | }
19 |
20 | public class Stats
21 | {
22 | public DateTime? lastSession;
23 | public int playtime;
24 | }
25 |
26 | public Game game;
27 |
28 | public object stats;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CommonPluginsShared/CommonPluginsShared.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.1321
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "CommonPluginsShared", "CommonPluginsShared.shproj", "{27E5D35B-F3CE-4A3F-9705-4564674615A5}"
7 | EndProject
8 | Global
9 | GlobalSection(SharedMSBuildProjectFiles) = preSolution
10 | CommonPluginsShared.projitems*{27e5d35b-f3ce-4a3f-9705-4564674615a5}*SharedItemsImports = 13
11 | EndGlobalSection
12 | GlobalSection(SolutionProperties) = preSolution
13 | HideSolutionNode = FALSE
14 | EndGlobalSection
15 | GlobalSection(ExtensibilityGlobals) = postSolution
16 | SolutionGuid = {F3146C4F-75B6-4E77-BE2C-6414380B6B6B}
17 | EndGlobalSection
18 | EndGlobal
19 |
--------------------------------------------------------------------------------
/CommonPluginsStores/GameJolt/Models/Compatibility.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK.Data;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace CommonPluginsStores.GameJolt.Models
9 | {
10 | public class Compatibility
11 | {
12 | [SerializationPropertyName("id")]
13 | public int Id { get; set; }
14 |
15 | [SerializationPropertyName("game_id")]
16 | public int GameId { get; set; }
17 |
18 | [SerializationPropertyName("os_windows")]
19 | public bool OsWindows { get; set; }
20 |
21 | [SerializationPropertyName("os_windows_64")]
22 | public bool OsWindows64 { get; set; }
23 |
24 | [SerializationPropertyName("type_html")]
25 | public bool TypeHtml { get; set; }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/CommonPluginsResources/ResourcesPlaynite/DefaultControls/Popup.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Ea/Models/Query/QueryFriends.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Ea.Models.Query
6 | {
7 | public class QueryFriends
8 | {
9 | public string query = @"
10 | query {
11 | me {
12 | friends {
13 | items {
14 | player {
15 | pd
16 | psd
17 | displayName
18 | uniqueName
19 | nickname
20 | avatar {
21 | medium {
22 | path
23 | }
24 | }
25 | }
26 | }
27 | }
28 | }
29 | }";
30 | }
31 | }
--------------------------------------------------------------------------------
/CommonPluginsStores/Ea/Models/Query/QueryRecentGames.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Ea.Models.Query
6 | {
7 | public class QueryRecentGames
8 | {
9 | public class Variables
10 | {
11 | public List gameSlugs = new List();
12 | }
13 |
14 | public Variables variables = new Variables();
15 | public string query = @"
16 | query GetRecentGames($gameSlugs: [String!]!) {
17 | me {
18 | recentGames(gameSlugs: $gameSlugs) {
19 | items {
20 | gameSlug
21 | lastSessionEndDate
22 | totalPlayTimeSeconds
23 | }
24 | }
25 | }
26 | }";
27 | }
28 | }
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/OriginLibrary/Models/AccountEntitlementsResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.OriginLibrary.Models
8 | {
9 | public class AccountEntitlementsResponse
10 | {
11 | public class Entitlement
12 | {
13 | public long entitlementId;
14 | public string offerId;
15 | public string offerPath;
16 | public string status;
17 | public string offerType;
18 | public string originDisplayType;
19 | public string masterTitleId;
20 | public string gameDistributionSubType;
21 | }
22 |
23 | public string error;
24 | public List entitlements;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Models/StoreToken.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CommonPluginsStores.Models
4 | {
5 | ///
6 | /// Represents a store token, which consists of a type and an associated token value.
7 | ///
8 | public class StoreToken
9 | {
10 | public string AccountId { get; set; }
11 |
12 | ///
13 | /// Gets or sets the type of the token (e.g., authentication type).
14 | ///
15 | public string Type { get; set; }
16 |
17 | ///
18 | /// Gets or sets the token value (e.g., authentication token or session token).
19 | ///
20 | public string Token { get; set; }
21 |
22 | public DateTime? ExpireAt { get; set; }
23 |
24 | public string RefreshToken { get; set; }
25 |
26 | public DateTime? RefreshExpireAt { get; set; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/EpicLibrary/Models/OauthResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.EpicLibrary.Models
8 | {
9 | public class OauthResponse
10 | {
11 | public string access_token;
12 | public long expires_in;
13 | public DateTime expires_at;
14 | public string token_type;
15 | public string refresh_token;
16 | public long refresh_expires;
17 | public DateTime refresh_expires_at;
18 | public string account_id;
19 | public string client_id;
20 | public bool internal_client;
21 | public string client_service;
22 | public string app;
23 | public string in_app_id;
24 | public string device_id;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Steam/Models/SteamFriendsList.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK.Data;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace CommonPluginsStores.Steam.Models
7 | {
8 | public class SteamFriendsList
9 | {
10 | [SerializationPropertyName("friendslist")]
11 | public FriendsList FriendsList { get; set; }
12 | }
13 |
14 | public class Friend
15 | {
16 | [SerializationPropertyName("steamid")]
17 | public ulong SteamId { get; set; }
18 | [SerializationPropertyName("relationship")]
19 | public string Relationship { get; set; }
20 | [SerializationPropertyName("friend_since")]
21 | public int FriendSince { get; set; }
22 | }
23 |
24 | public class FriendsList
25 | {
26 | [SerializationPropertyName("friends")]
27 | public List Friends { get; set; }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://crowdin.com/project/playnite-extensions)
2 | [](https://github.com/Lacro59/playnite-plugincommon/graphs/commit-activity)
3 | [](https://github.com/Lacro59/playnite-plugincommon/graphs/contributors)
4 | [](https://github.com/Lacro59/playnite-plugincommon/blob/master/LICENSE)
5 |
6 | # playnite-plugincommon
7 | Common files and functions at plugins for [Playnite](https://playnite.link).
8 |
9 | ## More
10 | Remember to support [Playnite](https://www.patreon.com/playnite) and [Freepik](https://www.flaticon.com/authors/freepik).
11 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/Converters/NegateConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Data;
7 | using System.Windows.Markup;
8 |
9 | namespace CommonPlayniteShared.Converters
10 | {
11 | public class NegateConverter : MarkupExtension, IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
14 | {
15 | return !(bool)value;
16 | }
17 |
18 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
19 | {
20 | return !(bool)value;
21 | }
22 |
23 | public override object ProvideValue(IServiceProvider serviceProvider)
24 | {
25 | return this;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/KeyImage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Playnite.SDK.Data;
4 |
5 | namespace CommonPluginsStores.Epic.Models
6 | {
7 | public class KeyImage
8 | {
9 | [SerializationPropertyName("type")]
10 | public string Type { get; set; }
11 |
12 | [SerializationPropertyName("url")]
13 | public string Url { get; set; }
14 |
15 | [SerializationPropertyName("md5")]
16 | public string Md5 { get; set; }
17 |
18 | [SerializationPropertyName("width")]
19 | public int? Width { get; set; }
20 |
21 | [SerializationPropertyName("height")]
22 | public int? Height { get; set; }
23 |
24 | [SerializationPropertyName("size")]
25 | public int? Size { get; set; }
26 |
27 | [SerializationPropertyName("uploadedDate")]
28 | public DateTime? UploadedDate { get; set; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/Common/Xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows.Markup;
8 |
9 | namespace CommonPlayniteShared.Common
10 | {
11 | public class Xaml
12 | {
13 | public static object FromFile(string path)
14 | {
15 | using (var stream = new StreamReader(path))
16 | {
17 | return XamlReader.Load(stream.BaseStream);
18 | }
19 | }
20 |
21 | public static T FromFile(string path)
22 | {
23 | using (var stream = new StreamReader(path))
24 | {
25 | return (T)XamlReader.Load(stream.BaseStream);
26 | }
27 | }
28 |
29 | public static T FromString(string xaml)
30 | {
31 | return (T)XamlReader.Parse(xaml);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/CommonPluginsResources/Resources/LiveChartsCommon/Common.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4
4 | 2
5 | 10, 10
6 |
7 | #E4555555
8 | #555555
9 | #FFFFFFFF
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/Converters/InvertedBoolenConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Data;
9 | using System.Windows.Markup;
10 |
11 | namespace CommonPlayniteShared.Converters
12 | {
13 | public class InvertedBoolenConverter : MarkupExtension, IValueConverter
14 | {
15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | return !(bool)value;
18 | }
19 |
20 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
21 | {
22 | return !(bool)value;
23 | }
24 |
25 | public override object ProvideValue(IServiceProvider serviceProvider)
26 | {
27 | return this;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/Query/QueryPlayerAchievement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Epic.Models.Query
6 | {
7 | public class QueryPlayerAchievement
8 | {
9 | public class Variables
10 | {
11 | public string epicAccountId = "";
12 | public string sandboxId = "";
13 | }
14 |
15 | public Variables variables = new Variables();
16 | public string query = @"query PlayerAchievement($epicAccountId:String!,$sandboxId:String!){PlayerAchievement{playerAchievementGameRecordsBySandbox(epicAccountId:$epicAccountId sandboxId:$sandboxId){records{totalXP totalUnlocked playerAwards{awardType unlockedDateTime achievementSetId} achievementSets{achievementSetId isBase totalUnlocked totalXP} playerAchievements{playerAchievement{sandboxId epicAccountId unlocked progress XP unlockDate achievementName isBase achievementSetId}}}}}}";
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Steam/Models/ExtensionsAchievements.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using Playnite.SDK.Data;
5 |
6 | namespace CommonPluginsStores.Steam.Models
7 | {
8 | public class Datum
9 | {
10 | [SerializationPropertyName("name")]
11 | public string Name { get; set; }
12 |
13 | [SerializationPropertyName("achievementApiNames")]
14 | public List AchievementApiNames { get; set; }
15 |
16 | [SerializationPropertyName("dlcAppId")]
17 | public int? DlcAppId { get; set; }
18 |
19 | [SerializationPropertyName("dlcAppName")]
20 | public string DlcAppName { get; set; }
21 | }
22 |
23 | public class ExtensionsAchievements
24 | {
25 | [SerializationPropertyName("success")]
26 | public bool Success { get; set; }
27 |
28 | [SerializationPropertyName("data")]
29 | public List Data { get; set; }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/CommonPluginsShared/Converters/EnumToBooleanConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Data;
7 | using System.Windows.Markup;
8 |
9 | namespace CommonPluginsShared.Converters
10 | {
11 | public class EnumToBooleanConverter : MarkupExtension, IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
14 | {
15 | return value.Equals(parameter);
16 | }
17 |
18 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
19 | {
20 | return value.Equals(true) ? parameter : Binding.DoNothing;
21 | }
22 |
23 | public override object ProvideValue(IServiceProvider serviceProvider)
24 | {
25 | return this;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Steam/Models/SteamAppList.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK;
2 | using Playnite.SDK.Data;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace CommonPluginsStores.Steam.Models
8 | {
9 | public class SteamApp
10 | {
11 | [SerializationPropertyName("appid")]
12 | public uint AppId { get; set; }
13 |
14 | [SerializationPropertyName("name")]
15 | public string Name { get; set; }
16 |
17 | [SerializationPropertyName("last_modified")]
18 | public int LastModified { get; set; }
19 |
20 | [SerializationPropertyName("price_change_number")]
21 | public int PriceChangeNumber { get; set; }
22 | }
23 |
24 | public class SteamAppList
25 | {
26 | [SerializationPropertyName("apps")]
27 | public List Apps { get; set; }
28 |
29 | [SerializationPropertyName("have_more_results")]
30 | public bool HaveMoreResults { get; set; }
31 |
32 | [SerializationPropertyName("last_appid")]
33 | public uint LastAppId { get; set; }
34 | }
35 | }
--------------------------------------------------------------------------------
/CommonPlayniteShared/Common/GlobalRandom.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.Common
8 | {
9 | public class GlobalRandom
10 | {
11 | private static readonly Random generator = new Random();
12 |
13 | public static int Next()
14 | {
15 | return generator.Next();
16 | }
17 |
18 | public static int Next(int minValue, int maxValue)
19 | {
20 | return generator.Next(minValue, maxValue);
21 | }
22 |
23 | public static int Next(int maxValue)
24 | {
25 | return generator.Next(maxValue);
26 | }
27 |
28 | public static void NextBytes(byte[] buffer)
29 | {
30 | NextBytes(buffer);
31 | }
32 |
33 | public static double NextDouble()
34 | {
35 | return generator.NextDouble();
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/CommonPluginsShared/Converters/HeightToFontSizeConverter.cs:
--------------------------------------------------------------------------------
1 | using CommonPlayniteShared;
2 | using Playnite.SDK;
3 | using System;
4 | using System.Drawing.Imaging;
5 | using System.Globalization;
6 | using System.IO;
7 | using System.Text.RegularExpressions;
8 | using System.Windows;
9 | using System.Windows.Controls;
10 | using System.Windows.Data;
11 | using System.Windows.Markup;
12 | using System.Windows.Media;
13 | using System.Windows.Media.Imaging;
14 |
15 | namespace CommonPluginsShared.Converters
16 | {
17 | public class HeightToFontSizeConverter : IValueConverter
18 | {
19 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
20 | {
21 | var height = (double)value;
22 | return .5 * height;
23 | }
24 |
25 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
26 | {
27 | throw new NotImplementedException();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Ea/Models/Query/ResponseFriends.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK.Data;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace CommonPluginsStores.Ea.Models.Query
7 | {
8 | public class ResponseFriends
9 | {
10 | [SerializationPropertyName("data")]
11 | public DataFriends Data { get; set; }
12 | }
13 |
14 | public class DataFriends
15 | {
16 | [SerializationPropertyName("me")]
17 | public MeFriends Me { get; set; }
18 | }
19 |
20 | public class Friends
21 | {
22 | [SerializationPropertyName("items")]
23 | public List Items { get; set; }
24 | }
25 |
26 | public class ItemFriends
27 | {
28 | [SerializationPropertyName("player")]
29 | public Player Player { get; set; }
30 | }
31 |
32 | public class MeFriends
33 | {
34 | [SerializationPropertyName("friends")]
35 | public Friends Friends { get; set; }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/CommonPluginsStores/GameJolt/Models/TrophiesOverwiew.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK.Data;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace CommonPluginsStores.GameJolt.Models
9 | {
10 | public class TrophiesOverwiew
11 | {
12 | [SerializationPropertyName("payload")]
13 | public PayloadTrophies Payload { get; set; }
14 |
15 | [SerializationPropertyName("ver")]
16 | public string Ver { get; set; }
17 |
18 | [SerializationPropertyName("user")]
19 | public object User { get; set; }
20 |
21 | [SerializationPropertyName("c")]
22 | public C C { get; set; }
23 | }
24 |
25 | public class PayloadTrophies
26 | {
27 | [SerializationPropertyName("trophies")]
28 | public List Trophies { get; set; }
29 |
30 | [SerializationPropertyName("pageSize")]
31 | public int PageSize { get; set; }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/CommonPluginsStores/GameJolt/Models/Theme.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK.Data;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace CommonPluginsStores.GameJolt.Models
9 | {
10 | public class Theme
11 | {
12 | [SerializationPropertyName("id")]
13 | public int Id { get; set; }
14 |
15 | [SerializationPropertyName("theme_preset_id")]
16 | public int ThemePresetId { get; set; }
17 |
18 | [SerializationPropertyName("highlight")]
19 | public string Highlight { get; set; }
20 |
21 | [SerializationPropertyName("backlight")]
22 | public string Backlight { get; set; }
23 |
24 | [SerializationPropertyName("notice")]
25 | public string Notice { get; set; }
26 |
27 | [SerializationPropertyName("tint")]
28 | public string Tint { get; set; }
29 |
30 | [SerializationPropertyName("custom")]
31 | public string Custom { get; set; }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Models/GameInfos.cs:
--------------------------------------------------------------------------------
1 | using CommonPlayniteShared;
2 | using CommonPluginsShared;
3 | using CommonPluginsShared.Extensions;
4 | using Playnite.SDK.Data;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Collections.ObjectModel;
8 | using System.Globalization;
9 | using System.Linq;
10 | using System.Text;
11 | using System.Text.RegularExpressions;
12 |
13 | namespace CommonPluginsStores.Models
14 | {
15 | ///
16 | /// Represents detailed information about a game, including a list of downloadable content (DLC).
17 | /// Inherits from to include basic game details.
18 | ///
19 | public class GameInfos : BasicGameInfos
20 | {
21 | private ObservableCollection _dlcs;
22 |
23 | ///
24 | /// Gets or sets the list of downloadable content (DLC) associated with the game.
25 | ///
26 | public ObservableCollection Dlcs { get => _dlcs; set => _dlcs = value; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CommonPluginsShared/Converters/ValueOperationConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Text;
5 | using System.Windows.Data;
6 |
7 | namespace CommonPluginsShared.Converters
8 | {
9 | internal class ValueOperationConverter : IMultiValueConverter
10 | {
11 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | try
14 | {
15 | return parameter.ToString() == "-"
16 | ? double.Parse(values[0].ToString()) - double.Parse(values[1].ToString())
17 | : (object)(double.Parse(values[0].ToString()) + double.Parse(values[1].ToString()));
18 | }
19 | catch { }
20 |
21 | return double.NaN;
22 | }
23 |
24 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
25 | {
26 | throw new NotSupportedException();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CommonPluginsShared/Models/TraceInfos.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Reflection;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace CommonPluginsShared.Models
10 | {
11 | public class TraceInfos
12 | {
13 | public string InitialCaller { get; set; }
14 | public ParameterInfo[] CallerParams { get; set; }
15 |
16 | public string FileName { get; set; }
17 | public int LineNumber { get; set; }
18 |
19 | public TraceInfos(Exception ex)
20 | {
21 | StackTrace Trace = new StackTrace(ex, true);
22 | StackFrame Frame = Trace.GetFrames()?.LastOrDefault();
23 | InitialCaller = Frame?.GetMethod()?.Name;
24 | CallerParams = Frame?.GetMethod()?.GetParameters();
25 | FileName = (Frame?.GetFileName()?.IsNullOrEmpty() ?? true) ? "???" : Frame.GetFileName();
26 | LineNumber = Frame?.GetFileLineNumber() ?? 0;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CommonPluginsResources/ResourcesPlaynite/DerivedStyles/HighlightBorder.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
17 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/Common/Constants.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace CommonPlayniteShared.Common
9 | {
10 | public static class Constants
11 | {
12 | public const string DefaultDateTimeFormat = "d";
13 | public const string DefaultPartialReleaseDateTimeFormat = "y";
14 |
15 | public static string DateUiFormat
16 | {
17 | get;
18 | } = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern;
19 |
20 | public static string TimeUiFormat
21 | {
22 | get;
23 | } = CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern;
24 |
25 | public static char[] ListSeparators
26 | {
27 | get;
28 | } = new char[] { ListSeparator };
29 |
30 | public const char ListSeparator = ',';
31 |
32 | public static readonly Guid MaxGuidVal = new Guid("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF");
33 | }
34 | }
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/Mapping.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Playnite.SDK.Data;
3 |
4 | namespace CommonPluginsStores.Epic.Models
5 | {
6 | public class Mapping
7 | {
8 | [SerializationPropertyName("createdDate")]
9 | public string CreatedDate { get; set; }
10 |
11 | [SerializationPropertyName("deletedDate")]
12 | public string DeletedDate { get; set; }
13 |
14 | [SerializationPropertyName("mappings")]
15 | public Mappings Mappings { get; set; }
16 |
17 | [SerializationPropertyName("pageSlug")]
18 | public string PageSlug { get; set; }
19 |
20 | [SerializationPropertyName("pageType")]
21 | public string PageType { get; set; }
22 |
23 | [SerializationPropertyName("productId")]
24 | public string ProductId { get; set; }
25 |
26 | [SerializationPropertyName("sandboxId")]
27 | public string SandboxId { get; set; }
28 |
29 | [SerializationPropertyName("updatedDate")]
30 | public string UpdatedDate { get; set; }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Steam/Models/SteamKit/SteamSchema.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Steam.Models.SteamKit
6 | {
7 | public class SteamSchema
8 | {
9 | public List Achievements { get; set; } = new List();
10 | public List Stats { get; set; } = new List();
11 | }
12 |
13 | public class SteamSchemaStats
14 | {
15 | public string Name { get; set; }
16 | public int DefaultValue { get; set; }
17 | public string DisplayName { get; set; }
18 | }
19 |
20 | public class SteamSchemaAchievements
21 | {
22 | public string Name { get; set; }
23 | public int DefaultValue { get; set; }
24 | public string DisplayName { get; set; }
25 | public bool Hidden { get; set; }
26 | public string Description { get; set; }
27 | public string Icon { get; set; }
28 | public string IconGray { get; set; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Psn/Models/PsnApi.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Psn.Models
6 | {
7 | //public class PsnApi
8 | //{
9 | //}
10 |
11 |
12 | public class Trophies
13 | {
14 | public List trophies { get; set; }
15 | }
16 |
17 | public class Trophie
18 | {
19 | public int trophyId { get; set; }
20 | public string trophyType { get; set; }
21 |
22 | public string trophyName { get; set; }
23 | public string trophyDetail { get; set; }
24 | public string trophyIconUrl { get; set; }
25 |
26 |
27 | public bool trophyHidden { get; set; }
28 | public bool earned { get; set; }
29 | public DateTime? earnedDateTime { get; set; }
30 | public int trophyRare { get; set; }
31 | public string trophyEarnedRate { get; set; }
32 | }
33 |
34 | public class FromUser
35 | {
36 | public string onlineId { get; set; }
37 | public DateTime earnedDate { get; set; }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Models/AchievementProgression.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK.Data;
2 |
3 | namespace CommonPluginsStores.Models
4 | {
5 | public class AchievementProgression
6 | {
7 | ///
8 | /// Gets or sets the unique identifier for the achievement.
9 | ///
10 | public string Id { get; set; }
11 |
12 | ///
13 | /// Gets or sets the minimum value for progression.
14 | ///
15 | public double Min { get; set; }
16 |
17 | ///
18 | /// Gets or sets the maximum value for progression.
19 | ///
20 | public double Max { get; set; }
21 |
22 | ///
23 | /// Gets or sets the current value for progression.
24 | ///
25 | public double Value { get; set; }
26 |
27 | ///
28 | /// Gets a string representation of the progression (e.g., "3 / 10").
29 | ///
30 | [DontSerialize]
31 | public string Progression => Value + " / " + Max;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/CommonPluginsStores/CommonPluginsStores.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | c066f255-3bfa-4862-a490-09d7933647d4
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/CommonPlayniteShared.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 0d7dbc82-26af-49ad-8ed5-0e11aa56bce0
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/Extensions/IProvideValueTarget.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Reflection;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Markup;
9 |
10 | namespace CommonPlayniteShared.Extensions
11 | {
12 | public static class IProvideValueTargetExtensions
13 | {
14 | public static Type GetTargetType(IProvideValueTarget provider)
15 | {
16 | if (provider.TargetProperty == null)
17 | {
18 | return null;
19 | }
20 |
21 | var type = provider.TargetProperty.GetType();
22 | if (type == typeof(DependencyProperty))
23 | {
24 | type = ((DependencyProperty)provider.TargetProperty).PropertyType;
25 | }
26 | else if (typeof(PropertyInfo).IsAssignableFrom(provider.TargetProperty.GetType()))
27 | {
28 | type = ((PropertyInfo)provider.TargetProperty).PropertyType;
29 | }
30 |
31 | return type;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/PluginLibrary/NintendoLibrary/Models/NintendoModels.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace CommonPlayniteShared.PluginLibrary.NintendoLibrary.Models
8 | {
9 | public class AuthError
10 | {
11 | public class Error
12 | {
13 | public string code { get; set; }
14 | public string message { get; set; }
15 | }
16 | public Error error;
17 | }
18 |
19 | public class PurchasedList
20 | {
21 | public int length { get; set; }
22 | public int offset { get; set; }
23 | public int total { get; set; }
24 | public class Transaction
25 | {
26 | public string content_type { get; set; }
27 | public string title { get; set; }
28 | public string device_type { get; set; }
29 | public DateTime date { get; set; }
30 | public ulong transaction_id { get; set; }
31 | }
32 |
33 | public List transactions { get; set; }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Lacro59
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Ea/Models/Query/QueryAchievements.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace CommonPluginsStores.Ea.Models.Query
6 | {
7 | public class QueryAchievements
8 | {
9 | public class Variables
10 | {
11 | public string offerId = string.Empty;
12 | public string playerPsd = string.Empty;
13 | public string locale = "US";
14 | }
15 |
16 | public Variables variables = new Variables();
17 | public string query = @"
18 | query GetAchievements($offerId: String!, $playerPsd: String!, $locale: Locale!) {
19 | achievements(
20 | offerId: $offerId
21 | playerPsd: $playerPsd
22 | showHidden: true
23 | locale: $locale
24 | ) {
25 | id
26 | achievements {
27 | id
28 | name
29 | description
30 | awardCount
31 | date
32 | }
33 | }
34 | }";
35 | }
36 | }
--------------------------------------------------------------------------------
/CommonPluginsShared/Converters/TwoBooleanToVisibilityConverter.cs:
--------------------------------------------------------------------------------
1 | using CommonPlayniteShared;
2 | using Playnite.SDK;
3 | using System;
4 | using System.Drawing.Imaging;
5 | using System.Globalization;
6 | using System.IO;
7 | using System.Text.RegularExpressions;
8 | using System.Windows;
9 | using System.Windows.Controls;
10 | using System.Windows.Data;
11 | using System.Windows.Markup;
12 | using System.Windows.Media;
13 | using System.Windows.Media.Imaging;
14 |
15 | namespace CommonPluginsShared.Converters
16 | {
17 | public class TwoBooleanToVisibilityConverter : IMultiValueConverter
18 | {
19 | public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
20 | {
21 | bool a = (bool)values[0];
22 | bool b = (bool)values[1];
23 |
24 | return a && b ? Visibility.Visible : Visibility.Collapsed;
25 | }
26 |
27 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
28 | {
29 | throw new NotImplementedException();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CommonPluginsResources/ResourcesPlaynite/DefaultControls/TextBlock.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
19 |
--------------------------------------------------------------------------------
/CommonPluginsControls/Controls/ComboBoxRemovable.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace CommonPluginsControls.Controls
17 | {
18 | ///
19 | /// Logique d'interaction pour ComboBoxRemovable.xaml
20 | ///
21 | public partial class ComboBoxRemovable : ComboBox
22 | {
23 | public event RoutedEventHandler ClearEvent;
24 |
25 |
26 | public ComboBoxRemovable()
27 | {
28 | InitializeComponent();
29 | }
30 |
31 |
32 | private void PART_ClearButton_Click(object sender, RoutedEventArgs e)
33 | {
34 | this.Text = string.Empty;
35 | this.SelectedIndex = -1;
36 |
37 | this.ClearEvent?.Invoke(sender, e);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/CommonPlayniteShared/Native/Shlwapi.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace CommonPlayniteShared.Native
9 | {
10 | [Flags]
11 | public enum MatchPatternFlags : uint
12 | {
13 | Normal = 0x00000000, // PMSF_NORMAL
14 | Multiple = 0x00000001, // PMSF_MULTIPLE
15 | DontStripSpaces = 0x00010000 // PMSF_DONT_STRIP_SPACES
16 | }
17 |
18 | public class Shlwapi
19 | {
20 | private const string dllName = "Shlwapi.dll";
21 |
22 | [DllImport(dllName, BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = false, ThrowOnUnmappableChar = true)]
23 | public static extern int SHLoadIndirectString(string pszSource, StringBuilder pszOutBuf, int cchOutBuf, IntPtr ppvReserved);
24 |
25 | [DllImport(dllName, SetLastError = false)]
26 | public static extern int PathMatchSpecExW([MarshalAs(UnmanagedType.LPWStr)] string file, [MarshalAs(UnmanagedType.LPWStr)] string spec, MatchPatternFlags flags);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Steam/Models/SteamAchievementData.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK;
2 | using Playnite.SDK.Data;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 |
7 | namespace CommonPluginsStores.Steam.Models
8 | {
9 | public class SteamAchievementData
10 | {
11 | [SerializationPropertyName("rawname")]
12 | public string RawName { get; set; }
13 | [SerializationPropertyName("hidden")]
14 | public bool Hidden { get; set; }
15 | [SerializationPropertyName("closed")]
16 | public int Closed { get; set; }
17 | [SerializationPropertyName("unlock_time")]
18 | public int UnlockTime { get; set; }
19 | [SerializationPropertyName("icon_closed")]
20 | public string IconClosed { get; set; }
21 | [SerializationPropertyName("icon_open")]
22 | public string IconOpen { get; set; }
23 | [SerializationPropertyName("progress")]
24 | public dynamic Progress { get; set; }
25 | [SerializationPropertyName("name")]
26 | public string Name { get; set; }
27 | [SerializationPropertyName("desc")]
28 | public string Desc { get; set; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/CommonPluginsShared/CumulsErrors.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace CommonPluginsShared
5 | {
6 | ///
7 | /// Group erros message in order to haven't duplicate.
8 | ///
9 | public class CumulErrors
10 | {
11 | private List ListMessage = new List();
12 |
13 |
14 | ///
15 | /// Add a new error message.
16 | ///
17 | ///
18 | public void Add(string Message)
19 | {
20 | if (!ListMessage.Exists(x => x == Message))
21 | {
22 | ListMessage.Add(Message);
23 | }
24 | }
25 |
26 | ///
27 | /// Get list errors messages formatted.
28 | ///
29 | ///
30 | public string Get()
31 | {
32 | string Result = string.Empty;
33 | for (int i = 0; i < ListMessage.Count; i++)
34 | {
35 | Result += ((i != 0) ? Environment.NewLine : string.Empty) + ListMessage[i];
36 | }
37 | return Result;
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/CommonPluginsStores/Steam/Models/SteamGameAchievements.cs:
--------------------------------------------------------------------------------
1 | using Playnite.SDK.Data;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | namespace CommonPluginsStores.Steam.Models
7 | {
8 | public class SteamAchievement
9 | {
10 | [SerializationPropertyName("internal_name")]
11 | public string InternalName { get; set; }
12 | [SerializationPropertyName("localized_name")]
13 | public string LocalizedName { get; set; }
14 | [SerializationPropertyName("localized_desc")]
15 | public string LocalizedDesc { get; set; }
16 | [SerializationPropertyName("icon")]
17 | public string Icon { get; set; }
18 | [SerializationPropertyName("icon_gray")]
19 | public string IconGray { get; set; }
20 | [SerializationPropertyName("hidden")]
21 | public bool Hidden { get; set; }
22 | [SerializationPropertyName("player_percent_unlocked")]
23 | public string PlayerPercentUnlocked { get; set; }
24 | }
25 |
26 | public class SteamGameAchievements
27 | {
28 | [SerializationPropertyName("achievements")]
29 | public List Achievements { get; set; }
30 | }
31 | }
--------------------------------------------------------------------------------
/CommonPluginsStores/Epic/Models/Asset.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Playnite.SDK.Data;
4 |
5 | namespace CommonPluginsStores.Epic.Models
6 | {
7 | public class Asset
8 | {
9 | [SerializationPropertyName("namespace")]
10 | public string Namespace { get; set; }
11 |
12 | [SerializationPropertyName("catalogItemId")]
13 | public string CatalogItemId { get; set; }
14 |
15 | [SerializationPropertyName("appName")]
16 | public string AppName { get; set; }
17 |
18 | [SerializationPropertyName("productId")]
19 | public string ProductId { get; set; }
20 |
21 | [SerializationPropertyName("sandboxName")]
22 | public string SandboxName { get; set; }
23 |
24 | [SerializationPropertyName("sandboxType")]
25 | public string SandboxType { get; set; }
26 |
27 | [SerializationPropertyName("recordType")]
28 | public string RecordType { get; set; }
29 |
30 | [SerializationPropertyName("acquisitionDate")]
31 | public DateTime AcquisitionDate { get; set; }
32 |
33 | [SerializationPropertyName("dependencies")]
34 | public List