JosefNemec / Playnite

Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.
https://playnite.link
MIT License
9.13k stars 492 forks source link

Fix downloaded game descriptions #632

Open DennoCoil opened 6 years ago

DennoCoil commented 6 years ago

When receiving the Game Description from an API download, Playnite doesn't do any post processing of this content to convert it from Plain Text to HTML. The Game Description in Edit mode appears correctly as it appears from the API, but because the Game Description is strictly rendering HTML, it needs <br> tags to properly separate lines.

This results in descriptions that are big blocks of unformatted text that need to be hand edited to look like the descriptions it came from.

So while the content downloaded is correct, Playnite doesn't add any <br> tags or post processing to the downloaded content to the HTML renderer to allow it to be viewed properly.

JosefNemec commented 6 years ago

We do change end lines to <br> since version 4.2. Can you provide some specific example when it's not working for you?

ClearStrelok commented 6 years ago

I was going to suggest some kind of autoformating as well, many games descriptions from IGDB and a few from Steam had no formating when I started using Playnite (4.0). I did a full rescan of my library to see if there was any changes and the following games aren't formated properly:

Alpha Protocol (Steam) Half-Life (Steam) The Elder Scrolls V: Skyrim Special Edition (Steam) Half-Life 2: Deathmatch (Steam) Half-Life 2: Episode One (Steam) Half-Life 2: Lost Coast (Steam) Half-Life Deathmatch: Source (Steam) Quake (Steam) State of Decay (Steam) Tomb Raider I to VI (Steam)

Rayman Origins (Imported from Uplay, metadata from IGDB) Psychonauts (Imported from .Exe in Twitch folder, metadata from IGDB) ReCore (Imported from Windows Store, metadata from IGDB) Gears of War 4 (Imported from Windows Store, metadata from IGDB) Halo Wars 2 (Imported from Windows Store, metadata from IGDB) Sea of Thieves (Imported from Windows Store, metadata from IGDB)

Descriptions from GOG and Origin are all perfectly formated, though. The issue only appears consistently with manually imported games.

JosefNemec commented 5 years ago

Adding #397 reference. I tried to find some .NET library that would a good job of formatting HTML, but I was unable to find one. It might be better to skip this entirely and reformat everything when we switch from HTML descriptions to Markdown ones.