Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Latest commit

 

History

History
112 lines (75 loc) · 6.73 KB

README.md

File metadata and controls

112 lines (75 loc) · 6.73 KB

Playnite.StoreSpoofer

This plugin allows for per-entry editing of GameId and PluginId properties of your games. Here are some scenarios in which you'd want to edit those properties:

  • Download metadata from an official store for a manually imported game.
  • Use metadata from a different store than the game was initially imported from.

Includes an option to mass-undo all the changes you've made to your database with this plugin.

Installation

Go to %localappdata%\Playnite\Extensions (or wherever you've installed your Playnite instance) and create a folder for the plugin. You can name this folder however you prefer, the assembly will load regardless. Copy all files from /bin/${Configuration}/ (or root dir of the archive, in you downloaded the plugin from Github's releases) to this folder and restart your Playnite process.

Usage

After you've installed the plugin, its functions will be listed in the Playnite->Extensions menu.

Automatic mode for games from Battle.Net, Steam and GOG is now available under Auto-match... method. It will automatically set GameId and PluginId properties and ask you which library you prefer when multiple providers are available.

Here's a step-by-step guide on how to download metadata from a given store, manually:

  1. Find proper GameId for your Game with correspondence to the store you plan to use. Consult Finding GameId subsection for more insight.
  2. Use Change Game Id of the Selected Game and enter the new GameId.
  3. Use Change Library Plugin of the Selected Game(s) and enter the name of the new Store.
  4. Download metadata using Playnite's built-in editor - Official Store option should now be available.

Please note that some functions support multi-select editing, make use of that as you will.

Finding GameId

Internally, Playnite passes GameId property to the corresponding plugin's MetadataProvider implementation, thus there is no universal way of obtaining it for each and every game store. Consult Playnite's source code for more info.

Provider Protips
BattleNet Copy 'ProductId' field from here
Bethesda See below
Epic See below
GOG Just copy the ID from here
Itchio See below
Origin See below
Steam The number in this URL is the ID.
Twitch See below
Uplay See below

Bethesda
The last part of the url is the id, but that does not matter because of this code. This cannot be mitigated unless I implement runtime IL patching sometime in the future or ship patched plugin assembly. Not that it's worth it anyway - it doesn't download any interesting stuff.


Epic
Actually, you don't need any sort of ID to pull this off. Go here and copy the name to the Name field in the Playnite's editor. You must uncheck Installed checkbox as well.


Itchio
Currently impossible to mitigate. See this. Even if Butler supports grabbing all available games' ids and allows you to download their metadata, Playnite does not and it would require either a new MetadataProvider coded from scratch or heavy modifications to the code.


Origin
Go to Origin Store with Development Tools of your browser enabled. Look for the first API call that looks like this. Highlighted part within quotes is the ID. It should be noted that sometimes the metadata will not download fully (for example: background is missing in the case of The Sims 4 but present with Battlefield 1). Unsure whether it is a bug, more investigation is needed. Remember to disable the Installed checkbox!


Twitch
Playnite uses Twitch's API to download metadata, so you need to own the game beforehand.


Uplay
Same as Bethesda; Playnite checks if the game is installed.


Building

Download or clone the project, restore the packages and copy BattleNetLibrary.dl from your Playnite installation to the external folder. Then build the project using preferred solution configuration. All necessary manifest files will be copied to the /bin/${Configuration}/ folder alongside the binary.

Future

As of now (9/6/2019) there is no way to introduce custom Metadata Providers . A more viable option than this workaround-tier plugin would be to implement a custom Metadata Provider that could search various game stores for a given title and download the data via HTML parsing. This could be implemented in four ways:

  1. Wait until 6.0 release of Playnite and implement it the 'official' way.
  2. Use Mono.Cecil/other trickery to replace the official implementation with a custom one at runtime. Pretty hard.
  3. Create a boilerplate Library Plugin with said Metadata Provider and use Playnite.StoreSpoofer to temporarily switch to it, download the metadata, unswitch.
  4. Implement it via a Generic Plugin, possibly with a custom GUI as Playnite's Dialogs API is pretty limiting.

License (MIT)

Copyright (c) 2019 kvdrrrrr

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.