Skip to content

Commit

Permalink
fix(plugin): load error caused by yamldotnet (#596)
Browse files Browse the repository at this point in the history
Yamldotnet is explicitly ignored from being packaged by the Toolbox.
This is to avoid version conflicts with Playnite. Instead, use
Playnite's buiilt-in serializers to parse the extension YAML.

Closes #570
  • Loading branch information
andrew-codes authored Oct 25, 2024
2 parents 5223a38 + 6a6ffcf commit 975d99f
Show file tree
Hide file tree
Showing 34 changed files with 20 additions and 23 deletions.
3 changes: 2 additions & 1 deletion apps/PlayniteWebPlugin/src/PlayniteWeb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using MQTTnet.Internal;
using MQTTnet.Protocol;
using Playnite.SDK;
using Playnite.SDK.Data;
using Playnite.SDK.Events;
using Playnite.SDK.Models;
using Playnite.SDK.Plugins;
Expand Down Expand Up @@ -58,7 +59,7 @@ public class PlayniteWeb : GenericPlugin
public PlayniteWeb(IPlayniteAPI api) : base(api)
{
var extensionInfoYaml = System.IO.File.ReadAllText("extension.yaml");
var extension = new YamlDotNet.Serialization.Deserializer().Deserialize<Dictionary<string, string>>(extensionInfoYaml);
var extension = Serialization.FromYaml<Dictionary<string, string>>(extensionInfoYaml);
_version = extension["Version"];

IMqttClient client = new MqttFactory().CreateMqttClient();
Expand Down
3 changes: 0 additions & 3 deletions apps/PlayniteWebPlugin/src/PlayniteWeb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Reference Include="YamlDotNet, Version=16.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
<HintPath>..\..\..\.nuget\YamlDotNet.16.1.3\lib\netstandard2.0\YamlDotNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="EventHandlers.cs" />
Expand Down
1 change: 0 additions & 1 deletion apps/PlayniteWebPlugin/src/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
<package id="System.Text.Json" version="8.0.5" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
<package id="YamlDotNet" version="16.1.3" targetFramework="net462" />
</packages>
Empty file modified docs/README.md
100755 → 100644
Empty file.
Empty file modified docs/documents/CONTRIBUTING.md
100755 → 100644
Empty file.
Empty file modified docs/documents/SECURITY.md
100755 → 100644
Empty file.
Empty file modified docs/documents/api/data-model.md
100755 → 100644
Empty file.
Empty file modified docs/documents/api/mqtt.md
100755 → 100644
Empty file.
Empty file modified docs/documents/contributing/conventions.md
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file modified docs/documents/contributing/development-environment/index.md
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion docs/documents/contributing/development-environment/local-environment.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Install the following software on your local development machine:
- [nvm for OSX](https://github.com/nvm-sh/nvm)
- [nvm for Windows](https://github.com/coreybutler/nvm-windows)
6. [yarn@^4.0.0](https://yarnpkg.com/getting-started)
- With Node.js installed, run `corepack enable && corepack prepare --activate yarn@^4.0.0 && yarn set version berry`
- With Node.js installed, run `corepack enable && corepack prepare --activate yarn@^4.5.1 && yarn set version 4.5.1`

## Preparing Codebase

Expand Down
Empty file modified docs/documents/contributing/rfc.md
100755 → 100644
Empty file.
Empty file modified docs/documents/design/README.md
100755 → 100644
Empty file.
Empty file modified docs/documents/guides/setup.md
100755 → 100644
Empty file.
Empty file modified docs/types.entities/README.md
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/CompletionStatus.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Completion statuses are used to describe a player's progress in a game.

## Defined in

[types.entities.ts:184](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L184)
[types.entities.ts:184](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L184)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/Entity.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Supported entities.

## Defined in

[types.entities.ts:96](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L96)
[types.entities.ts:96](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L96)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/Game.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ A game may have multiple releases across different platforms and sources.

## Defined in

[types.entities.ts:220](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L220)
[types.entities.ts:220](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L220)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/GameAsset.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Game assets are used to associate images with entities.

## Defined in

[types.entities.ts:327](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L327)
[types.entities.ts:327](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L327)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/GameAssetType.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Game asset types represent the types of game assets that can be associated with

## Defined in

[types.entities.ts:317](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L317)
[types.entities.ts:317](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L317)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/GameFeature.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Features are used to describe a game's characteristics.

## Defined in

[types.entities.ts:162](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L162)
[types.entities.ts:162](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L162)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/GameSource.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Sources are used to describe where a game was obtained.

## Defined in

[types.entities.ts:206](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L206)
[types.entities.ts:206](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L206)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/Genre.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Genres are used to categorize games by their game play characteristics.

## Defined in

[types.entities.ts:173](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L173)
[types.entities.ts:173](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L173)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/Identifiable.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Foundation of all data entities; all data entities have an ID.
## Defined in

[types.entities.ts:4](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L4)
[types.entities.ts:4](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L4)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/Platform.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ Platforms are used to categorize games by the system they are played on. Note a

## Defined in

[types.entities.ts:116](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L116)
[types.entities.ts:116](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L116)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/Playlist.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ Playlists are used to group games together for easy access. A playlist consists

## Defined in

[types.entities.ts:299](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L299)
[types.entities.ts:299](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L299)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/Release.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ A release is a specific version of a game that is available on a platform and so

## Defined in

[types.entities.ts:255](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L255)
[types.entities.ts:255](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L255)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/RunState.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Run states are used to describe the current state of a game's process.

## Defined in

[types.entities.ts:247](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L247)
[types.entities.ts:247](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L247)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/Series.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ The "Assassin's Creed" series would include all games in the "Assassin's Creed"

## Defined in

[types.entities.ts:151](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L151)
[types.entities.ts:151](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L151)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/Tag.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Tags are used to categorize games by their characteristics.

## Defined in

[types.entities.ts:195](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L195)
[types.entities.ts:195](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L195)
2 changes: 1 addition & 1 deletion docs/types.entities/type-aliases/User.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Users are used to authenticate and authorize access to the application.

## Defined in

[types.entities.ts:340](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L340)
[types.entities.ts:340](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L340)
2 changes: 1 addition & 1 deletion docs/types.entities/variables/runStates.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Possible run state values.

## Defined in

[types.entities.ts:231](https://github.com/andrew-codes/playnite-web/blob/3df563c965de4d225f67da0c68a1ed509cac24b9/apps/playnite-web/src/server/data/types.entities.ts#L231)
[types.entities.ts:231](https://github.com/andrew-codes/playnite-web/blob/8dfad5f992b92758b413d98f9ebdcf822f89c299/apps/playnite-web/src/server/data/types.entities.ts#L231)

0 comments on commit 975d99f

Please sign in to comment.