2020-09-21 17:17:34 +00:00
|
|
|
|
// SPDX-License-Identifier: MIT
|
2020-05-26 16:34:33 +00:00
|
|
|
|
//
|
feat/update 3.1.0 (#7)
* Added initial text shaping support
* Fixed some font issues
* (Windows) Added initial text shaping support
* (macOS) Added initial text shaping support
* Disabled building of HarfBuzz-subset on Windows and macOS
* (Android) Added initial text shaping support
* Added the nl_NL locale to locale/languages
* Changed the font VRAM usage calculation to actually only include texture data
* Moved the HarfBuzz segment building to a separate function
Also implemented segment caching and fixed an issue where missing glyphs were not handled correctly
* Moved the text shaping to a separate function
* Fixed a text shaping issue when there was a font change for the last character of a string
* Added support for the pl_PL locale
* Changed two font calculation functions to use shaped text
Also consolidated the HarfBuzz segment creation and shaping into a single function
* Added a hack to make shaped text wrap somehow correctly
* Changed the text shaping function to return the segment vector
* Text shaping segments are no longer created by space characters
* RTL text segments are now flagged as such
* Fixed an issue where text was not correctly centered after line breaks
* Reverted some font changes that were not needed after all
* Changed to having HarfBuzz set the horizontal glyph advance
* Fixed another failure mode for the wrapText shaped text hack
* Added a precaution to prevent crashes in case of broken fonts being used
* Made accurate text layout work correctly using HarfBuzz
* Removed the offensive wrapText hacks and added some optimizations
Also changed the three dots to an actual ellipsis Unicode character when abbreviating text
* Reverted a change in TextComponent as it caused unforeseen issues
* Changed Font::shapeText() to pass the segments vector by reference
* Removed a temporary member variable in Font and replaced it with proper argument passing
* Fixed a regression where text shaping stopped working
* Added sharing of glyph atlas entries between shaped glyph entries that need the same texture
* Added support for the ar_EG locale
* Some font-related code and comments cleanup
* Fixed a source file header typo
* Documentation update
* Removed a lot of unnecessary text processing
* Added the ICU library as a dependency
* (Android) Added the ICU library as a dependency
* (macOS) Added the ICU library as a dependency
* (Windows) Added the ICU library as a dependency
* (Windows) Fixed an MSVC compiler warning
* Replaced all built-in Unicode case conversion logic and lookup tables with facilities from the ICU library
* Documentation update
* Updated the pl_PL translations
* Added a menu title font size adjustment for the pl_PL translations
* Removed support for NetBSD and OpenBSD
* Changed a code comment that referred to BSD Unix
* Documentation update
* Silenced some Clang compiler warnings
* Added experimental support for building on Haiku
* (Haiku) Added a ScreenScraper platform identifier
* (Haiku) Added support for the Sony PlayStation Portable (psp) game system
* (Haiku) Added support for the ScummVM Game Engine (scummvm) game system
* Documentation update
* Updated the pl_PL translations
* Changed ScreenSaver to use TextComponent instead of using Font facilities directly
* Changed Window to use TextComponent instead of using Font facilities directly
* Changed ButtonComponent to use TextComponent instead of using Font facilities directly
* Changed SliderComponent to use TextComponent instead of using Font facilities directly
* Reverted ButtonComponent and SliderComponent to render the debug overlays themselves
* Changed DateTimeEditComponent to use TextComponent instead of using Font facilities directly
* Minor code cleanup
* Changed TextEditComponent to use TextComponent instead of using Font facilities directly
* Changed Font::buildTextCache() and Font::renderTextCache() to protected functions
* Changed a compiler silencing option to only apply to Clang
* (Haiku) Updated CMake configuration to make ES-DE build on Haiku Nightly (but no longer on R1/beta4)
* Documentation update
* (Haiku) Added find rule configuration for RetroArch
Also added a single core for testing purposes
* Removed direct use of Font::wrapText() from OptionListComponent, TextEditComponent and TextListComponent
* Removed direct use of Font::wrapText() from TextComponent
* Fixed an issue where ComponentList could generate elements with negative widths
* Added an assertion to GuiComponent::setSize() to check for negative mSize values
* DateTimeEditComponent no longer renders the debug overlay unless there is a string to display
* (FreeBSD) Added support for building with DEINIT_ON_LAUNCH
* (FreeBSD) Added the man page to the CPack configuration
* (FreeBSD) Added support for rebooting and powering off from inside ES-DE
* (FreeBSD) Added fallback method to locate binary
* Added layout and line wrapping support for shaped text and for mixing of LTR and RTL scripts
* Fixed a special line wrapping scenario where a trailing space should be removed
* (Windows) Fixed some MSVC compiler warnings
* Fixed some Clang compiler warnings
* Fixed an issue where theme names in the theme downloader could get abbreviated
* Added support for the ca_AD locale
* Documentation update
* (Android) Fonts and locales are now copied earlier than the other assets as HarfBuzz and libintl need them earlier in the startup process
* Documentation update
* Added support for the de_DE locale
* (Android) Added a new default find rule entry for Flycast as its application ID has been changed
* Documentation update
* Fixed an issue where text shaping could be permanently disabled after editing text
* Fixed a potential issue where globally disabling text shaping could cause space detection to fail
* Added a check for whether a text element has a width defined when the container property is set
* (Android) Changed ePSXe to use %ROM% instead of %ROMSAF%
* (Haiku) Added support for the PDF viewer
* Updated the el_GR.po, es_ES.po, fr_FR.po, it_IT.po, ja_JP.po, ru_RU.po and zh_CN.po locale files
* Documentation update
* (Haiku) Added correct installation directories to the CMake configuration
* (Haiku) Changed to correct installation directories
* (Haiku) Added support for the correct system resource directories
* (Haiku) Made sure es-pdf-convert is found under all circumstances
* Updated the fr_FR translations
* Updated the es_ES translations
* Updated the it_IT translations
* Added a menu title font size adjustment for the it_IT translations
* Updated the ja_JP translations
* Updated the zh_CN translations
* Fixed an issue where scraping using TheGamesDB would crash the application
* Added an extra check in OptionListComponent to avoid potential crashes
* Removed support for the ca_AD locale
* Added a code comment clarification in FileSystemUtil
* Updated the pl_PL translations
* Some minor code modernization in MameNames
* Fixed an issue where returning from a game would sometimes make the helpsystem use the dimmed theme properties
* (Haiku) Added a resource file
* Added a menu title font size adjustment for the de_DE translations
* (Haiku) Added support for some game systems
* (Haiku) Added a HaikuPorts recipe
* (Haiku) Fixed an URI issue in the HaikuPorts recipe
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Updated the it_IT translations
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Added basic configuration support and menu entries for theme localization
* Changed a theme loading debug message
* (linear-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* (modern-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* Updated the it_IT translations
* Added support for using language variables in the theme configuration
* Added localization support to DateTimeComponent
* Added translations for the automatic collection names when used as theme system variables
* Added localization support for the theme game counter
* Added theme contextual hinting to the custom collection summary text in CollectionSystemsManager
Also added translation support for a string that was previously missed
* Added localization support to the label entries in capabilities.xml
* Fixed a regression where horizontal text containers would sometimes not work correctly
* Fixed an issue where text elements defined as gamecount using the systemdata property could not scroll horizontally
* Added support for including theme files from within the colorScheme and fontSize tag pairs
* Added translations for the automatic collection names (short name versions) when used as theme system variables
* Fixed an incorrect code comment in CollectionSystemsManager
* Added translations for the name and fullname systemdata properties for the text element
* Added translation support for the metadata property for the text element
* Updated all locale (.po) files with the theme engine localization additions
* (linear-es-de) Added translations for en_US, en_GB and sv_SE
* Documentation update
* Updated the fr_FR translations
* (linear-es-de) Added translations for fr_FR
* Updated the ja_JP translations
* Updated the zh_CN translations
* (modern-es-de) Added translations for en_US, en_GB, fr_FR and sv_SE
* Updated the es_ES translations
* Updated the ro_RO translations
* (linear-es-de) Added translations for es_ES
* (linear-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for en_US, en_GB and sv_SE
* (linear-es-de) Updated the es_ES translations
* (modern-es-de) Updated the fr_FR translations
* (linear-es-de) Some minor translation changes
* (modern-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for ro_RO
* Updated the it_IT translations
* Updated the pt_BR translations
* (linear-es-de) Added translations for it_IT
* (modern-es-de) Decreased the helpsystem entry spacing
* (modern-es-de) Added translations for es_ES and it_IT
* (slate-es-de) Added translations for es_ES, fr_FR and it_IT
* (linear-es-de) Added translations for pt_BR
* (modern-es-de) Added translations for pt_BR
* (slate-es-de) Added translations for pt_BR
* (Haiku) Added support for the c64, plus4 and vic20 systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Updated SDL to 2.30.6 on Android, Windows, macOS and the Linux AppImage builds
* Added an ICU filter configuration file
* (macOS) Reduced the ICU library size via a data filter file
* (Windows) Reduced the ICU library size via a data filter file
* Updated the ru_RU translations
* (linear-es-de) Added translations for ru_RU
* (modern-es-de) Added translations for ru_RU
* (slate-es-de) Added translations for ru_RU
* Added a menu title font size adjustment for the ru_RU translations
* Removed an unnecessary element resize in ScrollableContainer
* Fixed a line breaking issue
* Added theme engine translations for 'unknown' metadata values for developer, publisher, genre and players
* Added theme engine translations for 'never' and 'unknown' date values
* (linear-es-de) Added translations for ja_JP and zh_CN
* (modern-es-de) Added translations for ja_JP and zh_CN
* (slate-es-de) Added translations for ja_JP and zh_CN
* Updated all locales with new theme engine translations
* Fixed an issue where the text element defaultValue property no longer worked correctly
* (modern-es-de) Added some capitalized default metadata values
* Documentation update
* pdated the el_GR translations
* (linear-es-de) Updated the system metadata
* (linear-es-de) Added sv_SE translations for all system hardware types
* Updated the de_DE translations
* Updated the pl_PL translations
* Bundled the July 2024 release of the Mozilla TLS/SSL certificates
* Updated the MAME index files to include ROMs up to MAME version 0.269
* (linear-es-de) Added translations for pl_PL
* Added the VirtualXT RetroArch core as an alternative emulator for the dos and pc systems
* Added the Stella 2023 RetroArch core as an alternative emulator for the atari2600 system
* Removed support for the ar_EG, de_DE, el_GR and nl_NL locales and moved their .po files to an archive directory
* Documentation update
* (modern-es-de) Added translations for pl_PL
* (slate-es-de) Added translations for pl_PL
* Updated SDL to 2.30.7 on Android, Windows, macOS and the Linux AppImage builds
* Updated the fr_FR translations
* Added support for the new Lime3DS binary names on Linux, macOS and Windows
* Added some missing find rules for Lime3DS
* (Windows) Added 'Shortcut' as an alternative emulator for the switch system
Also added the .lnk file extension
* Added jgenesis as an alternative emulator for the famicom, gamegear, gb, gbc, genesis, mastersystem, megacd, megacdjp, megadrive, megadrivejp, nes, segacd, sfc, snes and snesna systems on Linux and Windows
* Documentation update
* Added izapple2 standalone as an alternative emulator for the apple2 system on Linux and Windows
* (Android) Added support for the Microsoft Windows (windows) game system using the Winlator emulator
* (Android) Added Winlator PRoot Cmod standalone as an alternative emulator for the windows system
* Documentation update
* (Android) Added support for the PC Arcade Systems (pcarcade) and Taito Type X (type-x) game systems
* Bumped the version to 3.1.0
* (modern-es-de) Eliminated an annoying debug message
* (linear-es-de) Added some missing metadata files
* (linear-es-de) Added some missing sv_SE translations
* Updated the Winlator emulator names
* Documentation update
* Documentation update for the 3.1.0 release
* Updated latest_release.json for the 3.1.0 release
* Fixed a typo in the changelog
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Bumped the version to 3.1.1-alpha
* Video player resources are now completely freed up after finishing view transitions
* Changed a rounding in ScrollableContainer to slightly decrease the risk of glyphs getting cut off at the bottom of the container
* Added the Nanum Square Neo Korean font
* Added support for the ko_KR locale
* Fixed an issue where newly entered ScreenScraper username and password values were positioned incorrectly vertically in the account settings menu
* Documentation update
* Changed the position of the ko_KR language
* Changed the ja_JP position in the languages file
* Fixed an issue where attempting to view media for a game that had no downloaded media paused the playback of all static theme videos
* Documentation update
* Added support for the de_DE locale
* Updated the fr_FR translations
* Documentation update
* Updated the de_DE translations
---------
Co-authored-by: Leon Styhre <leon@leonstyhre.com>
2024-09-18 00:23:26 +00:00
|
|
|
|
// ES-DE Frontend
|
2020-06-21 12:25:28 +00:00
|
|
|
|
// ScreenScraper.cpp
|
2020-05-26 16:34:33 +00:00
|
|
|
|
//
|
2020-06-21 12:25:28 +00:00
|
|
|
|
// Functions specifically for scraping from screenscraper.fr
|
|
|
|
|
// Called from Scraper.
|
2020-05-26 16:34:33 +00:00
|
|
|
|
//
|
|
|
|
|
|
2019-01-11 19:51:05 +00:00
|
|
|
|
#include "scrapers/ScreenScraper.h"
|
|
|
|
|
|
|
|
|
|
#include "FileData.h"
|
|
|
|
|
#include "Log.h"
|
|
|
|
|
#include "PlatformId.h"
|
|
|
|
|
#include "Settings.h"
|
|
|
|
|
#include "SystemData.h"
|
feat/update 3.1.0 (#7)
* Added initial text shaping support
* Fixed some font issues
* (Windows) Added initial text shaping support
* (macOS) Added initial text shaping support
* Disabled building of HarfBuzz-subset on Windows and macOS
* (Android) Added initial text shaping support
* Added the nl_NL locale to locale/languages
* Changed the font VRAM usage calculation to actually only include texture data
* Moved the HarfBuzz segment building to a separate function
Also implemented segment caching and fixed an issue where missing glyphs were not handled correctly
* Moved the text shaping to a separate function
* Fixed a text shaping issue when there was a font change for the last character of a string
* Added support for the pl_PL locale
* Changed two font calculation functions to use shaped text
Also consolidated the HarfBuzz segment creation and shaping into a single function
* Added a hack to make shaped text wrap somehow correctly
* Changed the text shaping function to return the segment vector
* Text shaping segments are no longer created by space characters
* RTL text segments are now flagged as such
* Fixed an issue where text was not correctly centered after line breaks
* Reverted some font changes that were not needed after all
* Changed to having HarfBuzz set the horizontal glyph advance
* Fixed another failure mode for the wrapText shaped text hack
* Added a precaution to prevent crashes in case of broken fonts being used
* Made accurate text layout work correctly using HarfBuzz
* Removed the offensive wrapText hacks and added some optimizations
Also changed the three dots to an actual ellipsis Unicode character when abbreviating text
* Reverted a change in TextComponent as it caused unforeseen issues
* Changed Font::shapeText() to pass the segments vector by reference
* Removed a temporary member variable in Font and replaced it with proper argument passing
* Fixed a regression where text shaping stopped working
* Added sharing of glyph atlas entries between shaped glyph entries that need the same texture
* Added support for the ar_EG locale
* Some font-related code and comments cleanup
* Fixed a source file header typo
* Documentation update
* Removed a lot of unnecessary text processing
* Added the ICU library as a dependency
* (Android) Added the ICU library as a dependency
* (macOS) Added the ICU library as a dependency
* (Windows) Added the ICU library as a dependency
* (Windows) Fixed an MSVC compiler warning
* Replaced all built-in Unicode case conversion logic and lookup tables with facilities from the ICU library
* Documentation update
* Updated the pl_PL translations
* Added a menu title font size adjustment for the pl_PL translations
* Removed support for NetBSD and OpenBSD
* Changed a code comment that referred to BSD Unix
* Documentation update
* Silenced some Clang compiler warnings
* Added experimental support for building on Haiku
* (Haiku) Added a ScreenScraper platform identifier
* (Haiku) Added support for the Sony PlayStation Portable (psp) game system
* (Haiku) Added support for the ScummVM Game Engine (scummvm) game system
* Documentation update
* Updated the pl_PL translations
* Changed ScreenSaver to use TextComponent instead of using Font facilities directly
* Changed Window to use TextComponent instead of using Font facilities directly
* Changed ButtonComponent to use TextComponent instead of using Font facilities directly
* Changed SliderComponent to use TextComponent instead of using Font facilities directly
* Reverted ButtonComponent and SliderComponent to render the debug overlays themselves
* Changed DateTimeEditComponent to use TextComponent instead of using Font facilities directly
* Minor code cleanup
* Changed TextEditComponent to use TextComponent instead of using Font facilities directly
* Changed Font::buildTextCache() and Font::renderTextCache() to protected functions
* Changed a compiler silencing option to only apply to Clang
* (Haiku) Updated CMake configuration to make ES-DE build on Haiku Nightly (but no longer on R1/beta4)
* Documentation update
* (Haiku) Added find rule configuration for RetroArch
Also added a single core for testing purposes
* Removed direct use of Font::wrapText() from OptionListComponent, TextEditComponent and TextListComponent
* Removed direct use of Font::wrapText() from TextComponent
* Fixed an issue where ComponentList could generate elements with negative widths
* Added an assertion to GuiComponent::setSize() to check for negative mSize values
* DateTimeEditComponent no longer renders the debug overlay unless there is a string to display
* (FreeBSD) Added support for building with DEINIT_ON_LAUNCH
* (FreeBSD) Added the man page to the CPack configuration
* (FreeBSD) Added support for rebooting and powering off from inside ES-DE
* (FreeBSD) Added fallback method to locate binary
* Added layout and line wrapping support for shaped text and for mixing of LTR and RTL scripts
* Fixed a special line wrapping scenario where a trailing space should be removed
* (Windows) Fixed some MSVC compiler warnings
* Fixed some Clang compiler warnings
* Fixed an issue where theme names in the theme downloader could get abbreviated
* Added support for the ca_AD locale
* Documentation update
* (Android) Fonts and locales are now copied earlier than the other assets as HarfBuzz and libintl need them earlier in the startup process
* Documentation update
* Added support for the de_DE locale
* (Android) Added a new default find rule entry for Flycast as its application ID has been changed
* Documentation update
* Fixed an issue where text shaping could be permanently disabled after editing text
* Fixed a potential issue where globally disabling text shaping could cause space detection to fail
* Added a check for whether a text element has a width defined when the container property is set
* (Android) Changed ePSXe to use %ROM% instead of %ROMSAF%
* (Haiku) Added support for the PDF viewer
* Updated the el_GR.po, es_ES.po, fr_FR.po, it_IT.po, ja_JP.po, ru_RU.po and zh_CN.po locale files
* Documentation update
* (Haiku) Added correct installation directories to the CMake configuration
* (Haiku) Changed to correct installation directories
* (Haiku) Added support for the correct system resource directories
* (Haiku) Made sure es-pdf-convert is found under all circumstances
* Updated the fr_FR translations
* Updated the es_ES translations
* Updated the it_IT translations
* Added a menu title font size adjustment for the it_IT translations
* Updated the ja_JP translations
* Updated the zh_CN translations
* Fixed an issue where scraping using TheGamesDB would crash the application
* Added an extra check in OptionListComponent to avoid potential crashes
* Removed support for the ca_AD locale
* Added a code comment clarification in FileSystemUtil
* Updated the pl_PL translations
* Some minor code modernization in MameNames
* Fixed an issue where returning from a game would sometimes make the helpsystem use the dimmed theme properties
* (Haiku) Added a resource file
* Added a menu title font size adjustment for the de_DE translations
* (Haiku) Added support for some game systems
* (Haiku) Added a HaikuPorts recipe
* (Haiku) Fixed an URI issue in the HaikuPorts recipe
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Updated the it_IT translations
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Added basic configuration support and menu entries for theme localization
* Changed a theme loading debug message
* (linear-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* (modern-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* Updated the it_IT translations
* Added support for using language variables in the theme configuration
* Added localization support to DateTimeComponent
* Added translations for the automatic collection names when used as theme system variables
* Added localization support for the theme game counter
* Added theme contextual hinting to the custom collection summary text in CollectionSystemsManager
Also added translation support for a string that was previously missed
* Added localization support to the label entries in capabilities.xml
* Fixed a regression where horizontal text containers would sometimes not work correctly
* Fixed an issue where text elements defined as gamecount using the systemdata property could not scroll horizontally
* Added support for including theme files from within the colorScheme and fontSize tag pairs
* Added translations for the automatic collection names (short name versions) when used as theme system variables
* Fixed an incorrect code comment in CollectionSystemsManager
* Added translations for the name and fullname systemdata properties for the text element
* Added translation support for the metadata property for the text element
* Updated all locale (.po) files with the theme engine localization additions
* (linear-es-de) Added translations for en_US, en_GB and sv_SE
* Documentation update
* Updated the fr_FR translations
* (linear-es-de) Added translations for fr_FR
* Updated the ja_JP translations
* Updated the zh_CN translations
* (modern-es-de) Added translations for en_US, en_GB, fr_FR and sv_SE
* Updated the es_ES translations
* Updated the ro_RO translations
* (linear-es-de) Added translations for es_ES
* (linear-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for en_US, en_GB and sv_SE
* (linear-es-de) Updated the es_ES translations
* (modern-es-de) Updated the fr_FR translations
* (linear-es-de) Some minor translation changes
* (modern-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for ro_RO
* Updated the it_IT translations
* Updated the pt_BR translations
* (linear-es-de) Added translations for it_IT
* (modern-es-de) Decreased the helpsystem entry spacing
* (modern-es-de) Added translations for es_ES and it_IT
* (slate-es-de) Added translations for es_ES, fr_FR and it_IT
* (linear-es-de) Added translations for pt_BR
* (modern-es-de) Added translations for pt_BR
* (slate-es-de) Added translations for pt_BR
* (Haiku) Added support for the c64, plus4 and vic20 systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Updated SDL to 2.30.6 on Android, Windows, macOS and the Linux AppImage builds
* Added an ICU filter configuration file
* (macOS) Reduced the ICU library size via a data filter file
* (Windows) Reduced the ICU library size via a data filter file
* Updated the ru_RU translations
* (linear-es-de) Added translations for ru_RU
* (modern-es-de) Added translations for ru_RU
* (slate-es-de) Added translations for ru_RU
* Added a menu title font size adjustment for the ru_RU translations
* Removed an unnecessary element resize in ScrollableContainer
* Fixed a line breaking issue
* Added theme engine translations for 'unknown' metadata values for developer, publisher, genre and players
* Added theme engine translations for 'never' and 'unknown' date values
* (linear-es-de) Added translations for ja_JP and zh_CN
* (modern-es-de) Added translations for ja_JP and zh_CN
* (slate-es-de) Added translations for ja_JP and zh_CN
* Updated all locales with new theme engine translations
* Fixed an issue where the text element defaultValue property no longer worked correctly
* (modern-es-de) Added some capitalized default metadata values
* Documentation update
* pdated the el_GR translations
* (linear-es-de) Updated the system metadata
* (linear-es-de) Added sv_SE translations for all system hardware types
* Updated the de_DE translations
* Updated the pl_PL translations
* Bundled the July 2024 release of the Mozilla TLS/SSL certificates
* Updated the MAME index files to include ROMs up to MAME version 0.269
* (linear-es-de) Added translations for pl_PL
* Added the VirtualXT RetroArch core as an alternative emulator for the dos and pc systems
* Added the Stella 2023 RetroArch core as an alternative emulator for the atari2600 system
* Removed support for the ar_EG, de_DE, el_GR and nl_NL locales and moved their .po files to an archive directory
* Documentation update
* (modern-es-de) Added translations for pl_PL
* (slate-es-de) Added translations for pl_PL
* Updated SDL to 2.30.7 on Android, Windows, macOS and the Linux AppImage builds
* Updated the fr_FR translations
* Added support for the new Lime3DS binary names on Linux, macOS and Windows
* Added some missing find rules for Lime3DS
* (Windows) Added 'Shortcut' as an alternative emulator for the switch system
Also added the .lnk file extension
* Added jgenesis as an alternative emulator for the famicom, gamegear, gb, gbc, genesis, mastersystem, megacd, megacdjp, megadrive, megadrivejp, nes, segacd, sfc, snes and snesna systems on Linux and Windows
* Documentation update
* Added izapple2 standalone as an alternative emulator for the apple2 system on Linux and Windows
* (Android) Added support for the Microsoft Windows (windows) game system using the Winlator emulator
* (Android) Added Winlator PRoot Cmod standalone as an alternative emulator for the windows system
* Documentation update
* (Android) Added support for the PC Arcade Systems (pcarcade) and Taito Type X (type-x) game systems
* Bumped the version to 3.1.0
* (modern-es-de) Eliminated an annoying debug message
* (linear-es-de) Added some missing metadata files
* (linear-es-de) Added some missing sv_SE translations
* Updated the Winlator emulator names
* Documentation update
* Documentation update for the 3.1.0 release
* Updated latest_release.json for the 3.1.0 release
* Fixed a typo in the changelog
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Bumped the version to 3.1.1-alpha
* Video player resources are now completely freed up after finishing view transitions
* Changed a rounding in ScrollableContainer to slightly decrease the risk of glyphs getting cut off at the bottom of the container
* Added the Nanum Square Neo Korean font
* Added support for the ko_KR locale
* Fixed an issue where newly entered ScreenScraper username and password values were positioned incorrectly vertically in the account settings menu
* Documentation update
* Changed the position of the ko_KR language
* Changed the ja_JP position in the languages file
* Fixed an issue where attempting to view media for a game that had no downloaded media paused the playback of all static theme videos
* Documentation update
* Added support for the de_DE locale
* Updated the fr_FR translations
* Documentation update
* Updated the de_DE translations
---------
Co-authored-by: Leon Styhre <leon@leonstyhre.com>
2024-09-18 00:23:26 +00:00
|
|
|
|
#include "utils/LocalizationUtil.h"
|
2021-07-07 18:03:42 +00:00
|
|
|
|
#include "utils/StringUtil.h"
|
|
|
|
|
#include "utils/TimeUtil.h"
|
2020-07-30 18:11:45 +00:00
|
|
|
|
|
2020-12-28 10:29:32 +00:00
|
|
|
|
#include <cmath>
|
2019-01-11 19:51:05 +00:00
|
|
|
|
#include <cstring>
|
2020-07-30 18:11:45 +00:00
|
|
|
|
#include <pugixml.hpp>
|
2019-01-11 19:51:05 +00:00
|
|
|
|
|
|
|
|
|
using namespace PlatformIds;
|
|
|
|
|
|
2021-11-13 13:27:26 +00:00
|
|
|
|
namespace
|
2021-07-07 18:03:42 +00:00
|
|
|
|
{
|
2021-11-13 13:27:26 +00:00
|
|
|
|
// List of systems and their IDs from:
|
2024-01-10 22:21:08 +00:00
|
|
|
|
// https://api.screenscraper.fr/api/systemesListe.php?devid=xxx&devpassword=yyy&softname=zzz&output=XML
|
2022-01-16 11:09:55 +00:00
|
|
|
|
const std::map<PlatformId, unsigned short> screenscraper_platformid_map {
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{THREEDO, 29},
|
2023-10-08 10:17:48 +00:00
|
|
|
|
{ACORN_ELECTRON, 85},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{AMSTRAD_CPC, 65},
|
|
|
|
|
{AMSTRAD_GX4000, 87},
|
|
|
|
|
{APPLE_II, 86},
|
|
|
|
|
{APPLE_IIGS, 217},
|
|
|
|
|
{ARCADE, 75},
|
2022-05-19 15:32:12 +00:00
|
|
|
|
{ARCADIA_2001, 94},
|
2023-09-17 16:28:51 +00:00
|
|
|
|
{ACORN_ARCHIMEDES, 84},
|
2023-06-30 16:44:31 +00:00
|
|
|
|
{ARDUBOY, 263},
|
2022-05-12 20:45:52 +00:00
|
|
|
|
{BALLY_ASTROCADE, 44},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{ATARI_800, 43},
|
|
|
|
|
{ATARI_2600, 26},
|
|
|
|
|
{ATARI_5200, 40},
|
|
|
|
|
{ATARI_7800, 41},
|
|
|
|
|
{ATARI_JAGUAR, 27},
|
|
|
|
|
{ATARI_JAGUAR_CD, 171},
|
|
|
|
|
{ATARI_LYNX, 28},
|
|
|
|
|
{ATARI_ST, 42},
|
|
|
|
|
{ATARI_XE, 43},
|
|
|
|
|
{ATOMISWAVE, 53},
|
|
|
|
|
{BBC_MICRO, 37},
|
2023-09-18 16:04:47 +00:00
|
|
|
|
{BIT_CORPORATION_GAMATE, 266},
|
2023-02-28 17:20:14 +00:00
|
|
|
|
{CASIO_PV1000, 74},
|
2023-10-10 15:02:28 +00:00
|
|
|
|
{COLECO_ADAM, 89},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{COLECOVISION, 48},
|
2022-05-19 15:32:12 +00:00
|
|
|
|
{VTECH_CREATIVISION, 241},
|
2023-02-01 21:30:43 +00:00
|
|
|
|
{VTECH_VSMILE, 120},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{COMMODORE_64, 66},
|
2023-09-18 15:55:46 +00:00
|
|
|
|
{COMMODORE_AMIGA, 64},
|
|
|
|
|
{COMMODORE_AMIGA_CD32, 130},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{COMMODORE_CDTV, 129},
|
2023-09-18 15:55:46 +00:00
|
|
|
|
{COMMODORE_PLUS4, 99},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{COMMODORE_VIC20, 73},
|
2022-07-04 17:50:19 +00:00
|
|
|
|
{CREATRONIC_MEGA_DUCK, 90},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{DAPHNE, 49},
|
2023-07-05 17:27:59 +00:00
|
|
|
|
{EPOCH_SCV, 67},
|
2023-10-10 16:45:59 +00:00
|
|
|
|
{FUJITSU_FM_7, 97},
|
2022-07-06 18:10:28 +00:00
|
|
|
|
{FUJITSU_FM_TOWNS, 253},
|
2023-09-18 19:00:13 +00:00
|
|
|
|
{FUNTECH_SUPER_ACAN, 100},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{INTELLIVISION, 115},
|
|
|
|
|
{GAMEENGINE_LUTRO, 206},
|
2023-07-04 18:28:21 +00:00
|
|
|
|
{GAMEENGINE_LOWRES_NX, 244},
|
2023-02-25 20:38:25 +00:00
|
|
|
|
{GAMEENGINE_WASM4, 262},
|
2023-07-10 12:48:39 +00:00
|
|
|
|
{HARTUNG_GAME_MASTER, 103},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{APPLE_MACINTOSH, 146},
|
|
|
|
|
{GOOGLE_ANDROID, 63},
|
2023-02-03 19:16:29 +00:00
|
|
|
|
{LCD_GAMES, 75},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{MICROSOFT_XBOX, 32},
|
|
|
|
|
{MICROSOFT_XBOX_360, 33},
|
feat/update-noruntime (#11)
* Documentation update
* Added the NooDS RetroArch core as an alternative emulator for the gba and nds systems
* Documentation update
* Updated the archive/el_GR.po file
* Fixed an issue where MD5 hashes were calculated when using the single-game scraper
* Refactored the helpsystem code and added support for using an arbitrary amount of helpsystem elements
* Removed the obsolete HelpStyle code
* Fixed some Clang compiler warnings
* Added 'thumbstickclick' as a supported 'entries' property value for the helpsystem element
* Documentation update
* Added 'lr' and 'ltrt' as supported 'entries' property values for the helpsystem element
* Documentation update
* Made it possible to set per-element icon overrides for the helpsystem element
* Fixed an issue where the helpsystem icons were sometimes not getting updated
* Fixed an issue where the default helpsystem element was not displayed if there was no theme configuration for it
* Eliminated some unnecessary helpsystem updates
* Changed a code comment
* Added 'imageSize', 'imageMaxSize', 'imageCropSize' and 'imageCropPos' properties to the video element
* Documentation update
* Added support for a 'none' value to the helpsystem element scope property
* Documentation update
* Rewrote the logic for the 'none' value for the helpsystem element scope property
* Added 'rotation' and 'rotationOrigin' properties to the helpsystem element
* Documentation update
* Added an 'entryLayout' property to the helpsystem element
* Added support for a 'none' value to the video element imageType property
* Documentation update
* Added a 'fadeInType' property to the video element
* Documentation update
* Added a clock element and a corresponding menu entry
* Documentation update
* Adjusted the default position for the clock
* Fixed an issue where applying rounded corners caused rendering artfifacts if the texture did not use premultiplied alpha
* Added a BackgroundComponent to replace NinePatchComponent for rendering menu and popup backgrounds
* Rewrote most components to use BackgroundComponent instead of NinePatchComponent
* Removed the obsolete frame.png and frame.svg graphics resource files
* Increased the background blur slightly when a menu is open
* Removed an unused variable
* Small adjustment to the GuiInfoPopup corner roundness
* Made the menu and launch screen scale up at the same speed regardless of the display refresh rate
* Documentation update
* (Linux) Added support for the Flatpak release of Ruffle
* Added the .ruf file extension to the flash system
* Fixed an issue where the DateTimeComponent gamelist fadeout didn't work correctly
* Changed the rendering order so that the clock is rendered above the textlist quick scrolling overlay
* Added an option to completely disable the game launch screen
* Added a screensaver-game-select custom event
* Added game-select and system-select custom events and a corresponding 'Browsing custom events' menu option
* (Linux) Changed the AppImage find rule for Mandarine to mandarine-qt*.AppImage
* Documentation update
* Made a HelpComponent function private instead of public
* (iOS) Fixed a build issue
* Added support for building against ICU 76.1 and later
* Added a SystemStatus class to poll Bluetooth, Wi-Fi, cellular and battery information from the operating system
* Fixed an issue where the wrong SystemStatus Wi-Fi debug info was shown
* (Android) Changed system status polling to run on the main thread
* (Windows) Fixed a typo that caused a build error
* (Linux) Fixed an issue where the battery was not detected
* (macOS) Fixed an issue where the battery capacity was not calculated correctly
* (Windows) Fixed a linker error due to two missing libraries
* (Linux) Added the BlueZ library as a dependency
* (Linux) Added the BlueZ library as a dependency
* Added a CMake find module for BlueZ
* (Linux) Fixed a CMake find module name mismatch for BlueZ
* Changed the CMake configuration to only check for the BlueZ library on Linux and not on FreeBSD
* Changed a CMake configuration comment
* OCD commit
* (Linux) Added support for checking for multiple Bluetooth adapters
* Disabled system status polling on FreeBSD and Haiku
* Added clamping to the battery capacity to work around buggy OS drivers
* Added system status indicator icons
* Added a system status component
* (Android) Fixed an issue where there was a PLACEHOLDER entry present for the consolearcade system in the es_systems.xml file
* Added menu options to toggle the system status indicators
* Fixed some issues with the system status indicators
* Fixed an issue where the battery text was not updated correctly when changing its menu option
* Documentation update
* (macOS) Added a NSBluetoothAlwaysUsageDescription key to the Info.plist file
* Fixed an issue where the battery percentage text was sometimes shown when it shouldn't have been
* Fixed an issue where some theme properties did not load correctly for the clock element
* Reorganized the positions of the systemstatus and clock elements in ThemeData
* (linear-es-de) Added configuration for the systemstatus and clock elements
* Made a small adjustment to the systemstatus element's default position
* (linear-es-de) Small adjustment to the position of the systemstatus element
* Changed SystemStatusComponent to use a height property instead of a size property
* (linear-es-de) Updated the theme config to use a height property for the systemstatus element
* Documentation update
* (linear-es-de) Relocated the configuration for the systemstatus and clock elements
* Removed the backgroundMargins and lineSpacing properties for the clock element and added backgroundColorEnd, backgroundGradientType and backgroundPadding
* (linear-es-de) Removed an obsolete property for the clock element
* (modern-es-de) Added systemstatus and clock configuration
* (slate-es-de) Added systemstatus and clock configuration
* Fixed a rendering issue when combining rotation and background padding for the clock element
* Added backgroundColor, backgroundColorEnd, backgroundGradientType, backgroundPadding and backgroundCornerRadius properties to the helpsystem element
* Added 'rotation' and 'rotationOrigin' properties to the systemstatus element
* Documentation update
* Added libgallium to the TSAN_suppressions file
* Added a compensation for a strange helpsystem sizing issue when drawing the element background
* Fixed an issue where the override for the 'battery_low' systemstatus icon did not work
* Added two sorting flags to make the translation update script generate identical output across different machines
* Changed the .po update script to not use fuzzy matching
* Added a .continueignore entry to the .gitignore file
* Updated all .po files with the new translation messages
* Updated the en_US and en_GB translations
* Updated the sv_SE translations
* (Android) Added MAME4droid Current emulator entries for all systems where MAME4droid 2024 was supported
Also changed from MAME4droid 2024 to MAME4droid Current for all systems where only this emulator was supported
* (Linux) Added a find rule entry for the new PCSX2 binary name (pcsx2)
* (Linux) Added a find rule entry for the new DuckStation binary name (duckstation)
* Added the b2 RetroArch core as an alternative emulator for the bbcmicro system
* Documentation update
* Updated SDL to 2.32.2
* Updated the MAME index files to include ROMs up to MAME version 0.275
* Bundled the February 2025 release of the Mozilla TLS/SSL certificates
* Documentation update
* Updated the nl_NL translations
* Updated the ro_RO translations
* Updated the fr_FR translations
* Updated the pt_BR translations
* Updated the it_IT translations
* Updated the fr_FR translations
* Updated the ko_KR translations
* Updated the es_ES translations
* Updated the de_DE translations
* Updated the es_ES translations
* Updated the ro_RO translations
* Updated the ru_RU translations
* Updated the ja_JP translations
* Updated the zh_CN translations
* Updated the sv_SE translations
* Updated the ca_ES translations
* Added a 'scope' property to the systemstatus and clock elements
* Documentation update
* Updated the pl_PL translations
* (linear-es-de) Added system metadata translations for 15 languages
* Added support for the Vircon32 Virtual Console (vircon32) game system
* (linear-es-de) Added support for the Vircon32 Virtual Console (vircon32) game system
* (modern-es-de) Added support for the Vircon32 Virtual Console (vircon32) game system
* (slate-es-de) Added support for the Vircon32 Virtual Console (vircon32) game system
* Documentation update
* Added the .m3u file extension to the sega32x, sega32xjp and sega32xna systems
* (Android) Added a find rule entry for the new Cemu package name
* Added A7800 standalone as an alternative emulator for the atari7800 system on Linux and Windows
* (Linux) Added XM6 TypeG Wine and XM6 TypeG Proton as alternative emulators for the x68000 system
Also added XM6 TypeG standalone as an alternative emulator for the x68000 system on Windows
* (Android) Added Azahar standalone as an alternative emulator for the n3ds system
* Documentation update
* (Linux) Added MFME Wine and MFME Proton as alternative emulators for the arcade system
Also added MFME standalone as an alternative emulator for the arcade system on Windows
* Added a %ROMRAWWIN% variable
* (Linux) Added support for the manually downloaded release of Mesen
* Added Mesen standalone as an alternative emulator for the colecovision, wonderswan and wonderswancolor systems on Linux and Windows
* Added Azahar standalone as an alternative emulator for the n3ds system on Linux and Windows
* Documentation update
* Made a small adjustment to the button_y_PS helpsystem button
* Updated the de_DE translations
* Updated the de_DE translations
* Updated the zh_TW translations
* Documentation update
* Fixed some segfaults that could occur during emergency shutdown
* Improved the cleanup on window deinit
* Fixed a crash on window deinit
* Fixed a rare issue where reloading the application could lead to a crash
* Optimized HelpComponent updates by caching the icons
* The HelpComponent icon cache is now cleared when pressing ctrl-r
* Added an 'entryRelativeScale' property to the helpsystem element
* Fixed a code comment typo
* Documentation update
* Updated the sv_SE translations
* (linear-es-de) Adjusted the relative scale between the icons and text for the helpsystem element
* Split the backgroundPadding property into backgroundHorizontalPadding and backgroundVerticalPadding properties for the helpsystem, systemstatus and clock elements
* (slate-es-de) Updated to use the new backgroundHorizontalPadding and backgroundVerticalPadding properties for the systemstatus and clock elements
* Documentation update
* The LANG and LANGUAGE variables are now set explicitly to the UTF-8 character encoding on Linux, macOS and Android
* (modern-es-de) Adjusted the relative scale between the icons and text for the helpsystem element
* Added the bsnes-jg RetroArch core as an alternative emulator for the satellaview, sfc, snes, snesna and sufami systems
* (Windows) Fixed an issue where there could be double quotation marks added to the launch command under some special circumstances
* Enabled directories interpreted as files with MAME RetroArch for the apple2, apple2gs and fmtowns systems on Linux, macOS and Windows
* (Windows) Added back accidentally deleted MAME standalone entry for the apple2 system
* Documentation update
* (Windows) Made the hack to remove double quotation marks on game launch slightly less dangerous
* Simplified a number of HelpComponent function and variable names
* (Android) The launch sound is no longer played if the launch screen is set as disabled
* The launch sound is now always stopped when returning to ES-DE after a game launch
* The launch sound is no longer played if the launch screen is set as disabled when built with the DEINIT_ON_LAUNCH option
* Prevented the launch sound from getting stopped when running in the background on game launch
* Updated the de_DE translations
* Fixed an issue where the menus would sometimes contain fractional rows
* Updated the ko_KR translations
* (Android) Added SkyEmu standalone as an alternative emulator for the gb, gba, gbc and nds systems
* Documentation update
* Added support for the 8:7 display aspect ratio
* Added translations for the '8:7 vertical' message
* Documentation update
* Documentation update
* Fixed an issue where a double free in GuiLaunchScreen could cause an unclean application shutdown
* Updated the archive/el_GR.po file
* (Linux) Added MFME Wine and MFME Proton as alternative emulators for the mame system
Also added MFME standalone as an alternative emulator for the mame system on Windows
* (Linux) Added find rule entries for Lindbergh Loader
* Added initial support for the Microsoft Xbox One (xboxone) game system
* (linear-es-de) Added support for the Microsoft Xbox One (xboxone) game system
* (modern-es-de) Added support for the Microsoft Xbox One (xboxone) game system
* (slate-es-de) Added support for the Microsoft Xbox One (xboxone) game system
* Documentation update
* Added support for the Sega Mark III (mark3) game system
* (linear-es-de) Added support for the Sega Mark III (mark3) game system
* (modern-es-de) Added support for the Sega Mark III (mark3) game system
* (slate-es-de) Added support for the Sega Mark III (mark3) game system
* Documentation update
* Added support for the Sony PlayStation 4 (ps4) game system on Linux, macOS and Windows
* Updated the archive/el_GR.po file
* Documentation update
* (Linux) Moved an emulator entry in es_find_rules.xml that was not sorted correctly
* (Android) Added a find rule entry for the Pizza Boy SC Basic emulator
* Added the CannonBall and Mr.Boom RetroArch cores as alternative emulators for the ports system
* Documentation update
* Updated the dummy ROMs archives with the latest systems
* Added RPCS3 Game Serial as an alternative emulator for the consolearcade and ps3 systems on Linux, macOS and Windows
* Documentation update
* (linear-es-de) Updated the system metadata for the mark3, vircon32 and xboxone systems
* (linear-es-de) Added zh_TW metadata translations for most systems
* (linear-es-de) Added zh_TW metadata translations for some systems
* (linear-es-de) Updated the system metadata for some systems
Also removed two obsolete system metadata files
* (linear-es-de) Updated some sv_SE system metadata entries
* Fixed an issue where the update_version_string.sh script would not update the Info.plist file correctly
* Bumped the version to 3.2.0
* Fixed a potential crash when disabling the help prompts
* Updated "update from upstream"script to fetch `stable-3.2`
* Added HelpStyle definition if def RETRODECK
* Removed HelpStyle (was introduced by RetroDECK)
* Added dependencies for ES-DE 3.2.0: dav1d, bluez, libvpx e icu
* fix(manifest): libvpx hash
* fix(manifest): update ICU source SHA256 hash
* fix(icu): change build system to simple and update build commands
* fix(icu): switch build system to autotools and update build directory structure
* fix(es-de): remove ICU dependency and update build options for ES-DE for statically linking it
* Documentation update
* feat(manifest): update runtime version to 6.8
* feat(automation): added the AppImage build job
* feat(build): install PipeWire development dependencies for ES-DE workflow
* feat(build): update dependencies for ES-DE workflow
* feat(workflow): add job to check and delete empty releases after builds
* fix(build): update release notes format in build workflow [skip ci]
* Triggering build
* feat(build): add Bluetooth development dependencies and improve AppImage naming
* feat(build): rename AppImage output for ES-DE to RetroDECK format
* feat(build): update script for RetroDECK AppImage creation
* feat(build): add bcm_host and brcmegl dependencies to build workflow
* feat(build): replace brcmegl with fuse in dependency installation
* Documentation update for the 3.2.0 release
* feat(manifest): reverted runtime version to 6.7 in application YAML
---------
Co-authored-by: Leon Styhre <leon.styhre@nw-soft.com>
2025-04-08 04:33:45 +00:00
|
|
|
|
{MICROSOFT_XBOX_ONE, 34},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{MSX, 113},
|
|
|
|
|
{MSX2, 116},
|
|
|
|
|
{MSX_TURBO_R, 118},
|
|
|
|
|
{SNK_NEO_GEO, 142},
|
2022-04-10 10:13:35 +00:00
|
|
|
|
{SNK_NEO_GEO_CD, 70},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{SNK_NEO_GEO_POCKET, 25},
|
|
|
|
|
{SNK_NEO_GEO_POCKET_COLOR, 82},
|
|
|
|
|
{NINTENDO_3DS, 17},
|
|
|
|
|
{NINTENDO_64, 14},
|
|
|
|
|
{NINTENDO_DS, 15},
|
|
|
|
|
{NINTENDO_FAMICOM, 3},
|
|
|
|
|
{NINTENDO_FAMICOM_DISK_SYSTEM, 106},
|
|
|
|
|
{NINTENDO_ENTERTAINMENT_SYSTEM, 3},
|
|
|
|
|
{FAIRCHILD_CHANNELF, 80},
|
|
|
|
|
{NINTENDO_GAME_BOY, 9},
|
|
|
|
|
{NINTENDO_GAME_BOY_ADVANCE, 12},
|
|
|
|
|
{NINTENDO_GAME_BOY_COLOR, 10},
|
2023-07-02 09:21:40 +00:00
|
|
|
|
{NINTENDO_SUPER_GAME_BOY, 127},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{NINTENDO_GAMECUBE, 13},
|
|
|
|
|
{NINTENDO_WII, 16},
|
|
|
|
|
{NINTENDO_WII_U, 18},
|
|
|
|
|
{NINTENDO_VIRTUAL_BOY, 11},
|
|
|
|
|
{NINTENDO_GAME_AND_WATCH, 52},
|
|
|
|
|
{NINTENDO_POKEMON_MINI, 211},
|
|
|
|
|
{NINTENDO_SATELLAVIEW, 107},
|
|
|
|
|
{NINTENDO_SWITCH, 225},
|
2023-10-03 19:01:34 +00:00
|
|
|
|
{NOKIA_NGAGE, 30},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{BANDAI_SUFAMI_TURBO, 108},
|
2022-07-13 17:00:30 +00:00
|
|
|
|
{DRAGON32, 91},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{DOS, 135},
|
|
|
|
|
{PC, 135},
|
2023-09-16 11:10:19 +00:00
|
|
|
|
{MICROSOFT_WINDOWS, 138},
|
|
|
|
|
{MICROSOFT_WINDOWS_3X, 136},
|
2022-05-14 09:01:01 +00:00
|
|
|
|
{VALVE_STEAM, 138},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{NEC_PCFX, 72},
|
2022-04-10 10:50:03 +00:00
|
|
|
|
{GAMEENGINE_PICO8, 234},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{PHILIPS_CDI, 133},
|
|
|
|
|
{GAMEENGINE_OPENBOR, 214},
|
2022-07-07 16:20:58 +00:00
|
|
|
|
{GAMEENGINE_EASYRPG, 231},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{TANGERINE_ORIC, 131},
|
|
|
|
|
{GAMEENGINE_SCUMMVM, 123},
|
|
|
|
|
{SEGA_32X, 19},
|
|
|
|
|
{SEGA_CD, 20},
|
|
|
|
|
{SEGA_DREAMCAST, 23},
|
|
|
|
|
{SEGA_GAME_GEAR, 21},
|
|
|
|
|
{SEGA_GENESIS, 1},
|
|
|
|
|
{SEGA_MASTER_SYSTEM, 2},
|
|
|
|
|
{SEGA_MEGA_DRIVE, 1},
|
|
|
|
|
{SEGA_SATURN, 22},
|
|
|
|
|
{SEGA_SG1000, 109},
|
|
|
|
|
{SHARP_X1, 220},
|
|
|
|
|
{SHARP_X68000, 79},
|
|
|
|
|
{GAMEENGINE_SOLARUS, 223},
|
2022-04-10 10:37:04 +00:00
|
|
|
|
{GAMEENGINE_Z_MACHINE, 215},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{SONY_PLAYSTATION, 57},
|
|
|
|
|
{SONY_PLAYSTATION_2, 58},
|
|
|
|
|
{SONY_PLAYSTATION_3, 59},
|
2023-06-30 16:44:31 +00:00
|
|
|
|
{SONY_PLAYSTATION_4, 60},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{SONY_PLAYSTATION_VITA, 62},
|
|
|
|
|
{SONY_PLAYSTATION_PORTABLE, 61},
|
|
|
|
|
{SAMCOUPE, 213},
|
|
|
|
|
{SUPER_NINTENDO, 4},
|
2023-10-23 19:12:26 +00:00
|
|
|
|
{SUPER_NINTENDO_MSU1, 210},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{NEC_SUPERGRAFX, 105},
|
|
|
|
|
{GAMEENGINE_TIC80, 222},
|
|
|
|
|
{NEC_PC_8800, 221},
|
|
|
|
|
{NEC_PC_9800, 208},
|
|
|
|
|
{NEC_PC_ENGINE, 31},
|
|
|
|
|
{NEC_PC_ENGINE_CD, 114},
|
|
|
|
|
{BANDAI_WONDERSWAN, 45},
|
|
|
|
|
{BANDAI_WONDERSWAN_COLOR, 46},
|
|
|
|
|
{SINCLAIR_ZX_SPECTRUM, 76},
|
|
|
|
|
{SINCLAIR_ZX81_SINCLAR, 77},
|
|
|
|
|
{VIDEOPAC_ODYSSEY2, 104},
|
|
|
|
|
{VECTREX, 102},
|
|
|
|
|
{TANDY_TRS80, 144},
|
|
|
|
|
{TANDY_COLOR_COMPUTER, 144},
|
2022-06-12 13:40:05 +00:00
|
|
|
|
{TEXAS_INSTRUMENTS_TI99, 205},
|
2023-03-01 21:09:27 +00:00
|
|
|
|
{TIGER_GAME_COM, 121},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{SEGA_NAOMI, 56},
|
|
|
|
|
{THOMSON_MOTO, 141},
|
|
|
|
|
{UZEBOX, 216},
|
2023-07-10 17:12:53 +00:00
|
|
|
|
{FUTURE_PINBALL, 199},
|
feat/update-noruntime (#11)
* Documentation update
* Added the NooDS RetroArch core as an alternative emulator for the gba and nds systems
* Documentation update
* Updated the archive/el_GR.po file
* Fixed an issue where MD5 hashes were calculated when using the single-game scraper
* Refactored the helpsystem code and added support for using an arbitrary amount of helpsystem elements
* Removed the obsolete HelpStyle code
* Fixed some Clang compiler warnings
* Added 'thumbstickclick' as a supported 'entries' property value for the helpsystem element
* Documentation update
* Added 'lr' and 'ltrt' as supported 'entries' property values for the helpsystem element
* Documentation update
* Made it possible to set per-element icon overrides for the helpsystem element
* Fixed an issue where the helpsystem icons were sometimes not getting updated
* Fixed an issue where the default helpsystem element was not displayed if there was no theme configuration for it
* Eliminated some unnecessary helpsystem updates
* Changed a code comment
* Added 'imageSize', 'imageMaxSize', 'imageCropSize' and 'imageCropPos' properties to the video element
* Documentation update
* Added support for a 'none' value to the helpsystem element scope property
* Documentation update
* Rewrote the logic for the 'none' value for the helpsystem element scope property
* Added 'rotation' and 'rotationOrigin' properties to the helpsystem element
* Documentation update
* Added an 'entryLayout' property to the helpsystem element
* Added support for a 'none' value to the video element imageType property
* Documentation update
* Added a 'fadeInType' property to the video element
* Documentation update
* Added a clock element and a corresponding menu entry
* Documentation update
* Adjusted the default position for the clock
* Fixed an issue where applying rounded corners caused rendering artfifacts if the texture did not use premultiplied alpha
* Added a BackgroundComponent to replace NinePatchComponent for rendering menu and popup backgrounds
* Rewrote most components to use BackgroundComponent instead of NinePatchComponent
* Removed the obsolete frame.png and frame.svg graphics resource files
* Increased the background blur slightly when a menu is open
* Removed an unused variable
* Small adjustment to the GuiInfoPopup corner roundness
* Made the menu and launch screen scale up at the same speed regardless of the display refresh rate
* Documentation update
* (Linux) Added support for the Flatpak release of Ruffle
* Added the .ruf file extension to the flash system
* Fixed an issue where the DateTimeComponent gamelist fadeout didn't work correctly
* Changed the rendering order so that the clock is rendered above the textlist quick scrolling overlay
* Added an option to completely disable the game launch screen
* Added a screensaver-game-select custom event
* Added game-select and system-select custom events and a corresponding 'Browsing custom events' menu option
* (Linux) Changed the AppImage find rule for Mandarine to mandarine-qt*.AppImage
* Documentation update
* Made a HelpComponent function private instead of public
* (iOS) Fixed a build issue
* Added support for building against ICU 76.1 and later
* Added a SystemStatus class to poll Bluetooth, Wi-Fi, cellular and battery information from the operating system
* Fixed an issue where the wrong SystemStatus Wi-Fi debug info was shown
* (Android) Changed system status polling to run on the main thread
* (Windows) Fixed a typo that caused a build error
* (Linux) Fixed an issue where the battery was not detected
* (macOS) Fixed an issue where the battery capacity was not calculated correctly
* (Windows) Fixed a linker error due to two missing libraries
* (Linux) Added the BlueZ library as a dependency
* (Linux) Added the BlueZ library as a dependency
* Added a CMake find module for BlueZ
* (Linux) Fixed a CMake find module name mismatch for BlueZ
* Changed the CMake configuration to only check for the BlueZ library on Linux and not on FreeBSD
* Changed a CMake configuration comment
* OCD commit
* (Linux) Added support for checking for multiple Bluetooth adapters
* Disabled system status polling on FreeBSD and Haiku
* Added clamping to the battery capacity to work around buggy OS drivers
* Added system status indicator icons
* Added a system status component
* (Android) Fixed an issue where there was a PLACEHOLDER entry present for the consolearcade system in the es_systems.xml file
* Added menu options to toggle the system status indicators
* Fixed some issues with the system status indicators
* Fixed an issue where the battery text was not updated correctly when changing its menu option
* Documentation update
* (macOS) Added a NSBluetoothAlwaysUsageDescription key to the Info.plist file
* Fixed an issue where the battery percentage text was sometimes shown when it shouldn't have been
* Fixed an issue where some theme properties did not load correctly for the clock element
* Reorganized the positions of the systemstatus and clock elements in ThemeData
* (linear-es-de) Added configuration for the systemstatus and clock elements
* Made a small adjustment to the systemstatus element's default position
* (linear-es-de) Small adjustment to the position of the systemstatus element
* Changed SystemStatusComponent to use a height property instead of a size property
* (linear-es-de) Updated the theme config to use a height property for the systemstatus element
* Documentation update
* (linear-es-de) Relocated the configuration for the systemstatus and clock elements
* Removed the backgroundMargins and lineSpacing properties for the clock element and added backgroundColorEnd, backgroundGradientType and backgroundPadding
* (linear-es-de) Removed an obsolete property for the clock element
* (modern-es-de) Added systemstatus and clock configuration
* (slate-es-de) Added systemstatus and clock configuration
* Fixed a rendering issue when combining rotation and background padding for the clock element
* Added backgroundColor, backgroundColorEnd, backgroundGradientType, backgroundPadding and backgroundCornerRadius properties to the helpsystem element
* Added 'rotation' and 'rotationOrigin' properties to the systemstatus element
* Documentation update
* Added libgallium to the TSAN_suppressions file
* Added a compensation for a strange helpsystem sizing issue when drawing the element background
* Fixed an issue where the override for the 'battery_low' systemstatus icon did not work
* Added two sorting flags to make the translation update script generate identical output across different machines
* Changed the .po update script to not use fuzzy matching
* Added a .continueignore entry to the .gitignore file
* Updated all .po files with the new translation messages
* Updated the en_US and en_GB translations
* Updated the sv_SE translations
* (Android) Added MAME4droid Current emulator entries for all systems where MAME4droid 2024 was supported
Also changed from MAME4droid 2024 to MAME4droid Current for all systems where only this emulator was supported
* (Linux) Added a find rule entry for the new PCSX2 binary name (pcsx2)
* (Linux) Added a find rule entry for the new DuckStation binary name (duckstation)
* Added the b2 RetroArch core as an alternative emulator for the bbcmicro system
* Documentation update
* Updated SDL to 2.32.2
* Updated the MAME index files to include ROMs up to MAME version 0.275
* Bundled the February 2025 release of the Mozilla TLS/SSL certificates
* Documentation update
* Updated the nl_NL translations
* Updated the ro_RO translations
* Updated the fr_FR translations
* Updated the pt_BR translations
* Updated the it_IT translations
* Updated the fr_FR translations
* Updated the ko_KR translations
* Updated the es_ES translations
* Updated the de_DE translations
* Updated the es_ES translations
* Updated the ro_RO translations
* Updated the ru_RU translations
* Updated the ja_JP translations
* Updated the zh_CN translations
* Updated the sv_SE translations
* Updated the ca_ES translations
* Added a 'scope' property to the systemstatus and clock elements
* Documentation update
* Updated the pl_PL translations
* (linear-es-de) Added system metadata translations for 15 languages
* Added support for the Vircon32 Virtual Console (vircon32) game system
* (linear-es-de) Added support for the Vircon32 Virtual Console (vircon32) game system
* (modern-es-de) Added support for the Vircon32 Virtual Console (vircon32) game system
* (slate-es-de) Added support for the Vircon32 Virtual Console (vircon32) game system
* Documentation update
* Added the .m3u file extension to the sega32x, sega32xjp and sega32xna systems
* (Android) Added a find rule entry for the new Cemu package name
* Added A7800 standalone as an alternative emulator for the atari7800 system on Linux and Windows
* (Linux) Added XM6 TypeG Wine and XM6 TypeG Proton as alternative emulators for the x68000 system
Also added XM6 TypeG standalone as an alternative emulator for the x68000 system on Windows
* (Android) Added Azahar standalone as an alternative emulator for the n3ds system
* Documentation update
* (Linux) Added MFME Wine and MFME Proton as alternative emulators for the arcade system
Also added MFME standalone as an alternative emulator for the arcade system on Windows
* Added a %ROMRAWWIN% variable
* (Linux) Added support for the manually downloaded release of Mesen
* Added Mesen standalone as an alternative emulator for the colecovision, wonderswan and wonderswancolor systems on Linux and Windows
* Added Azahar standalone as an alternative emulator for the n3ds system on Linux and Windows
* Documentation update
* Made a small adjustment to the button_y_PS helpsystem button
* Updated the de_DE translations
* Updated the de_DE translations
* Updated the zh_TW translations
* Documentation update
* Fixed some segfaults that could occur during emergency shutdown
* Improved the cleanup on window deinit
* Fixed a crash on window deinit
* Fixed a rare issue where reloading the application could lead to a crash
* Optimized HelpComponent updates by caching the icons
* The HelpComponent icon cache is now cleared when pressing ctrl-r
* Added an 'entryRelativeScale' property to the helpsystem element
* Fixed a code comment typo
* Documentation update
* Updated the sv_SE translations
* (linear-es-de) Adjusted the relative scale between the icons and text for the helpsystem element
* Split the backgroundPadding property into backgroundHorizontalPadding and backgroundVerticalPadding properties for the helpsystem, systemstatus and clock elements
* (slate-es-de) Updated to use the new backgroundHorizontalPadding and backgroundVerticalPadding properties for the systemstatus and clock elements
* Documentation update
* The LANG and LANGUAGE variables are now set explicitly to the UTF-8 character encoding on Linux, macOS and Android
* (modern-es-de) Adjusted the relative scale between the icons and text for the helpsystem element
* Added the bsnes-jg RetroArch core as an alternative emulator for the satellaview, sfc, snes, snesna and sufami systems
* (Windows) Fixed an issue where there could be double quotation marks added to the launch command under some special circumstances
* Enabled directories interpreted as files with MAME RetroArch for the apple2, apple2gs and fmtowns systems on Linux, macOS and Windows
* (Windows) Added back accidentally deleted MAME standalone entry for the apple2 system
* Documentation update
* (Windows) Made the hack to remove double quotation marks on game launch slightly less dangerous
* Simplified a number of HelpComponent function and variable names
* (Android) The launch sound is no longer played if the launch screen is set as disabled
* The launch sound is now always stopped when returning to ES-DE after a game launch
* The launch sound is no longer played if the launch screen is set as disabled when built with the DEINIT_ON_LAUNCH option
* Prevented the launch sound from getting stopped when running in the background on game launch
* Updated the de_DE translations
* Fixed an issue where the menus would sometimes contain fractional rows
* Updated the ko_KR translations
* (Android) Added SkyEmu standalone as an alternative emulator for the gb, gba, gbc and nds systems
* Documentation update
* Added support for the 8:7 display aspect ratio
* Added translations for the '8:7 vertical' message
* Documentation update
* Documentation update
* Fixed an issue where a double free in GuiLaunchScreen could cause an unclean application shutdown
* Updated the archive/el_GR.po file
* (Linux) Added MFME Wine and MFME Proton as alternative emulators for the mame system
Also added MFME standalone as an alternative emulator for the mame system on Windows
* (Linux) Added find rule entries for Lindbergh Loader
* Added initial support for the Microsoft Xbox One (xboxone) game system
* (linear-es-de) Added support for the Microsoft Xbox One (xboxone) game system
* (modern-es-de) Added support for the Microsoft Xbox One (xboxone) game system
* (slate-es-de) Added support for the Microsoft Xbox One (xboxone) game system
* Documentation update
* Added support for the Sega Mark III (mark3) game system
* (linear-es-de) Added support for the Sega Mark III (mark3) game system
* (modern-es-de) Added support for the Sega Mark III (mark3) game system
* (slate-es-de) Added support for the Sega Mark III (mark3) game system
* Documentation update
* Added support for the Sony PlayStation 4 (ps4) game system on Linux, macOS and Windows
* Updated the archive/el_GR.po file
* Documentation update
* (Linux) Moved an emulator entry in es_find_rules.xml that was not sorted correctly
* (Android) Added a find rule entry for the Pizza Boy SC Basic emulator
* Added the CannonBall and Mr.Boom RetroArch cores as alternative emulators for the ports system
* Documentation update
* Updated the dummy ROMs archives with the latest systems
* Added RPCS3 Game Serial as an alternative emulator for the consolearcade and ps3 systems on Linux, macOS and Windows
* Documentation update
* (linear-es-de) Updated the system metadata for the mark3, vircon32 and xboxone systems
* (linear-es-de) Added zh_TW metadata translations for most systems
* (linear-es-de) Added zh_TW metadata translations for some systems
* (linear-es-de) Updated the system metadata for some systems
Also removed two obsolete system metadata files
* (linear-es-de) Updated some sv_SE system metadata entries
* Fixed an issue where the update_version_string.sh script would not update the Info.plist file correctly
* Bumped the version to 3.2.0
* Fixed a potential crash when disabling the help prompts
* Updated "update from upstream"script to fetch `stable-3.2`
* Added HelpStyle definition if def RETRODECK
* Removed HelpStyle (was introduced by RetroDECK)
* Added dependencies for ES-DE 3.2.0: dav1d, bluez, libvpx e icu
* fix(manifest): libvpx hash
* fix(manifest): update ICU source SHA256 hash
* fix(icu): change build system to simple and update build commands
* fix(icu): switch build system to autotools and update build directory structure
* fix(es-de): remove ICU dependency and update build options for ES-DE for statically linking it
* Documentation update
* feat(manifest): update runtime version to 6.8
* feat(automation): added the AppImage build job
* feat(build): install PipeWire development dependencies for ES-DE workflow
* feat(build): update dependencies for ES-DE workflow
* feat(workflow): add job to check and delete empty releases after builds
* fix(build): update release notes format in build workflow [skip ci]
* Triggering build
* feat(build): add Bluetooth development dependencies and improve AppImage naming
* feat(build): rename AppImage output for ES-DE to RetroDECK format
* feat(build): update script for RetroDECK AppImage creation
* feat(build): add bcm_host and brcmegl dependencies to build workflow
* feat(build): replace brcmegl with fuse in dependency installation
* Documentation update for the 3.2.0 release
* feat(manifest): reverted runtime version to 6.7 in application YAML
---------
Co-authored-by: Leon Styhre <leon.styhre@nw-soft.com>
2025-04-08 04:33:45 +00:00
|
|
|
|
{VIRCON32, 272},
|
2023-07-10 17:16:41 +00:00
|
|
|
|
{VISUAL_PINBALL, 198},
|
2022-07-04 17:50:19 +00:00
|
|
|
|
{WATARA_SUPERVISION, 207},
|
2021-11-13 13:27:26 +00:00
|
|
|
|
{SPECTRAVIDEO, 218},
|
|
|
|
|
{PALM_OS, 219}};
|
2019-01-11 19:51:05 +00:00
|
|
|
|
|
2021-11-13 13:27:26 +00:00
|
|
|
|
// Help XML parsing method, finding an direct child XML node starting from the parent and
|
|
|
|
|
// filtering by an attribute value list.
|
|
|
|
|
pugi::xml_node find_child_by_attribute_list(const pugi::xml_node& node_parent,
|
|
|
|
|
const std::string& node_name,
|
|
|
|
|
const std::string& attribute_name,
|
|
|
|
|
const std::vector<std::string> attribute_values)
|
|
|
|
|
{
|
|
|
|
|
for (auto _val : attribute_values) {
|
|
|
|
|
for (pugi::xml_node node : node_parent.children(node_name.c_str())) {
|
|
|
|
|
if (node.attribute(attribute_name.c_str()).value() == _val)
|
|
|
|
|
return node;
|
|
|
|
|
}
|
2020-06-21 12:25:28 +00:00
|
|
|
|
}
|
2021-11-13 13:27:26 +00:00
|
|
|
|
|
|
|
|
|
return pugi::xml_node(nullptr);
|
2020-06-21 12:25:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-11-13 13:27:26 +00:00
|
|
|
|
} // namespace
|
2019-01-11 19:51:05 +00:00
|
|
|
|
|
|
|
|
|
void screenscraper_generate_scraper_requests(const ScraperSearchParams& params,
|
2021-07-07 18:03:42 +00:00
|
|
|
|
std::queue<std::unique_ptr<ScraperRequest>>& requests,
|
|
|
|
|
std::vector<ScraperSearchResult>& results)
|
2019-01-11 19:51:05 +00:00
|
|
|
|
{
|
2020-06-21 12:25:28 +00:00
|
|
|
|
std::string path;
|
|
|
|
|
ScreenScraperRequest::ScreenScraperConfig ssConfig;
|
|
|
|
|
|
2022-04-05 15:48:47 +00:00
|
|
|
|
ssConfig.automaticMode = params.automaticMode;
|
|
|
|
|
|
2020-11-14 14:30:49 +00:00
|
|
|
|
if (params.game->isArcadeGame())
|
2021-07-07 18:03:42 +00:00
|
|
|
|
ssConfig.isArcadeSystem = true;
|
2020-11-14 14:30:49 +00:00
|
|
|
|
else
|
|
|
|
|
ssConfig.isArcadeSystem = false;
|
|
|
|
|
|
2020-10-10 11:05:12 +00:00
|
|
|
|
if (params.nameOverride == "") {
|
2021-12-17 19:18:47 +00:00
|
|
|
|
if (Settings::getInstance()->getBool("ScraperSearchMetadataName")) {
|
2020-11-14 14:30:49 +00:00
|
|
|
|
path = ssConfig.getGameSearchUrl(
|
2023-08-03 18:48:54 +00:00
|
|
|
|
Utils::String::removeParenthesis(params.game->metadata.get("name")), params.md5Hash,
|
|
|
|
|
params.fileSize);
|
2021-12-17 19:18:47 +00:00
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
std::string cleanName;
|
|
|
|
|
if (params.game->getType() == GAME &&
|
|
|
|
|
Utils::FileSystem::isDirectory(params.game->getFullPath())) {
|
|
|
|
|
// For the special case where a directory has a supported file extension and is
|
|
|
|
|
// therefore interpreted as a file, exclude the extension from the search.
|
|
|
|
|
cleanName = Utils::FileSystem::getStem(params.game->getCleanName());
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
cleanName = params.game->getCleanName();
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-03 18:48:54 +00:00
|
|
|
|
path = ssConfig.getGameSearchUrl(cleanName, params.md5Hash, params.fileSize);
|
2021-12-17 19:18:47 +00:00
|
|
|
|
}
|
2020-10-10 11:05:12 +00:00
|
|
|
|
}
|
|
|
|
|
else {
|
2023-08-03 18:48:54 +00:00
|
|
|
|
path = ssConfig.getGameSearchUrl(params.nameOverride, params.md5Hash, params.fileSize);
|
2020-10-10 11:05:12 +00:00
|
|
|
|
}
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
|
|
|
|
auto& platforms = params.system->getPlatformIds();
|
|
|
|
|
std::vector<unsigned short> p_ids;
|
|
|
|
|
|
|
|
|
|
// Get the IDs of each platform from the ScreenScraper list.
|
2021-11-17 16:35:34 +00:00
|
|
|
|
for (auto platformIt = platforms.cbegin(); platformIt != platforms.cend(); ++platformIt) {
|
2020-06-21 12:25:28 +00:00
|
|
|
|
auto mapIt = screenscraper_platformid_map.find(*platformIt);
|
|
|
|
|
|
|
|
|
|
if (mapIt != screenscraper_platformid_map.cend()) {
|
2023-01-22 12:09:41 +00:00
|
|
|
|
p_ids.emplace_back(mapIt->second);
|
2020-06-21 12:25:28 +00:00
|
|
|
|
}
|
|
|
|
|
else {
|
2021-07-07 18:03:42 +00:00
|
|
|
|
LOG(LogWarning) << "ScreenScraper: No support for platform \""
|
|
|
|
|
<< getPlatformName(*platformIt) << "\", search will be inaccurate";
|
2020-06-21 12:25:28 +00:00
|
|
|
|
// Add the scrape request without a platform/system ID.
|
2021-07-07 18:03:42 +00:00
|
|
|
|
requests.push(
|
|
|
|
|
std::unique_ptr<ScraperRequest>(new ScreenScraperRequest(requests, results, path)));
|
2020-06-21 12:25:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-08 19:56:11 +00:00
|
|
|
|
if (p_ids.size() == 0) {
|
|
|
|
|
LOG(LogWarning) << "ScreenScraper: No platform defined, search will be inaccurate";
|
|
|
|
|
// Add the scrape request without a platform/system ID.
|
2021-07-07 18:03:42 +00:00
|
|
|
|
requests.push(
|
|
|
|
|
std::unique_ptr<ScraperRequest>(new ScreenScraperRequest(requests, results, path)));
|
2021-02-08 19:56:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
|
// Sort the platform IDs and remove duplicates.
|
|
|
|
|
std::sort(p_ids.begin(), p_ids.end());
|
|
|
|
|
auto last = std::unique(p_ids.begin(), p_ids.end());
|
|
|
|
|
p_ids.erase(last, p_ids.end());
|
|
|
|
|
|
2021-11-17 16:35:34 +00:00
|
|
|
|
for (auto platform = p_ids.cbegin(); platform != p_ids.cend(); ++platform) {
|
2023-08-04 16:08:59 +00:00
|
|
|
|
requests.push(std::unique_ptr<ScraperRequest>(new ScreenScraperRequest(
|
|
|
|
|
requests, results,
|
|
|
|
|
path + "&systemeid=" + HttpReq::urlEncode(std::to_string(*platform)))));
|
2020-06-21 12:25:28 +00:00
|
|
|
|
}
|
2019-01-11 19:51:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-05-26 16:34:33 +00:00
|
|
|
|
void ScreenScraperRequest::process(const std::unique_ptr<HttpReq>& req,
|
2021-07-07 18:03:42 +00:00
|
|
|
|
std::vector<ScraperSearchResult>& results)
|
2019-01-11 19:51:05 +00:00
|
|
|
|
{
|
2020-06-21 12:25:28 +00:00
|
|
|
|
assert(req->status() == HttpReq::REQ_SUCCESS);
|
2019-01-11 19:51:05 +00:00
|
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
|
pugi::xml_document doc;
|
2020-07-28 21:15:35 +00:00
|
|
|
|
|
|
|
|
|
// It seems as if screenscraper.fr has changed their API slightly and now just returns
|
|
|
|
|
// a simple text messsage upon not finding any matching game. If we don't return here,
|
|
|
|
|
// we will get a pugixml error trying to process this string as an XML message.
|
|
|
|
|
if (req->getContent().find("Erreur : Rom") == 0)
|
|
|
|
|
return;
|
|
|
|
|
|
2023-01-22 12:09:41 +00:00
|
|
|
|
pugi::xml_parse_result parseResult {doc.load_string(req->getContent().c_str())};
|
2019-01-11 19:51:05 +00:00
|
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
|
if (!parseResult) {
|
|
|
|
|
std::stringstream ss;
|
2020-07-26 21:30:45 +00:00
|
|
|
|
ss << "ScreenScraperRequest - Error parsing XML: " << parseResult.description();
|
2019-01-11 19:51:05 +00:00
|
|
|
|
|
feat/update 3.1.0 (#7)
* Added initial text shaping support
* Fixed some font issues
* (Windows) Added initial text shaping support
* (macOS) Added initial text shaping support
* Disabled building of HarfBuzz-subset on Windows and macOS
* (Android) Added initial text shaping support
* Added the nl_NL locale to locale/languages
* Changed the font VRAM usage calculation to actually only include texture data
* Moved the HarfBuzz segment building to a separate function
Also implemented segment caching and fixed an issue where missing glyphs were not handled correctly
* Moved the text shaping to a separate function
* Fixed a text shaping issue when there was a font change for the last character of a string
* Added support for the pl_PL locale
* Changed two font calculation functions to use shaped text
Also consolidated the HarfBuzz segment creation and shaping into a single function
* Added a hack to make shaped text wrap somehow correctly
* Changed the text shaping function to return the segment vector
* Text shaping segments are no longer created by space characters
* RTL text segments are now flagged as such
* Fixed an issue where text was not correctly centered after line breaks
* Reverted some font changes that were not needed after all
* Changed to having HarfBuzz set the horizontal glyph advance
* Fixed another failure mode for the wrapText shaped text hack
* Added a precaution to prevent crashes in case of broken fonts being used
* Made accurate text layout work correctly using HarfBuzz
* Removed the offensive wrapText hacks and added some optimizations
Also changed the three dots to an actual ellipsis Unicode character when abbreviating text
* Reverted a change in TextComponent as it caused unforeseen issues
* Changed Font::shapeText() to pass the segments vector by reference
* Removed a temporary member variable in Font and replaced it with proper argument passing
* Fixed a regression where text shaping stopped working
* Added sharing of glyph atlas entries between shaped glyph entries that need the same texture
* Added support for the ar_EG locale
* Some font-related code and comments cleanup
* Fixed a source file header typo
* Documentation update
* Removed a lot of unnecessary text processing
* Added the ICU library as a dependency
* (Android) Added the ICU library as a dependency
* (macOS) Added the ICU library as a dependency
* (Windows) Added the ICU library as a dependency
* (Windows) Fixed an MSVC compiler warning
* Replaced all built-in Unicode case conversion logic and lookup tables with facilities from the ICU library
* Documentation update
* Updated the pl_PL translations
* Added a menu title font size adjustment for the pl_PL translations
* Removed support for NetBSD and OpenBSD
* Changed a code comment that referred to BSD Unix
* Documentation update
* Silenced some Clang compiler warnings
* Added experimental support for building on Haiku
* (Haiku) Added a ScreenScraper platform identifier
* (Haiku) Added support for the Sony PlayStation Portable (psp) game system
* (Haiku) Added support for the ScummVM Game Engine (scummvm) game system
* Documentation update
* Updated the pl_PL translations
* Changed ScreenSaver to use TextComponent instead of using Font facilities directly
* Changed Window to use TextComponent instead of using Font facilities directly
* Changed ButtonComponent to use TextComponent instead of using Font facilities directly
* Changed SliderComponent to use TextComponent instead of using Font facilities directly
* Reverted ButtonComponent and SliderComponent to render the debug overlays themselves
* Changed DateTimeEditComponent to use TextComponent instead of using Font facilities directly
* Minor code cleanup
* Changed TextEditComponent to use TextComponent instead of using Font facilities directly
* Changed Font::buildTextCache() and Font::renderTextCache() to protected functions
* Changed a compiler silencing option to only apply to Clang
* (Haiku) Updated CMake configuration to make ES-DE build on Haiku Nightly (but no longer on R1/beta4)
* Documentation update
* (Haiku) Added find rule configuration for RetroArch
Also added a single core for testing purposes
* Removed direct use of Font::wrapText() from OptionListComponent, TextEditComponent and TextListComponent
* Removed direct use of Font::wrapText() from TextComponent
* Fixed an issue where ComponentList could generate elements with negative widths
* Added an assertion to GuiComponent::setSize() to check for negative mSize values
* DateTimeEditComponent no longer renders the debug overlay unless there is a string to display
* (FreeBSD) Added support for building with DEINIT_ON_LAUNCH
* (FreeBSD) Added the man page to the CPack configuration
* (FreeBSD) Added support for rebooting and powering off from inside ES-DE
* (FreeBSD) Added fallback method to locate binary
* Added layout and line wrapping support for shaped text and for mixing of LTR and RTL scripts
* Fixed a special line wrapping scenario where a trailing space should be removed
* (Windows) Fixed some MSVC compiler warnings
* Fixed some Clang compiler warnings
* Fixed an issue where theme names in the theme downloader could get abbreviated
* Added support for the ca_AD locale
* Documentation update
* (Android) Fonts and locales are now copied earlier than the other assets as HarfBuzz and libintl need them earlier in the startup process
* Documentation update
* Added support for the de_DE locale
* (Android) Added a new default find rule entry for Flycast as its application ID has been changed
* Documentation update
* Fixed an issue where text shaping could be permanently disabled after editing text
* Fixed a potential issue where globally disabling text shaping could cause space detection to fail
* Added a check for whether a text element has a width defined when the container property is set
* (Android) Changed ePSXe to use %ROM% instead of %ROMSAF%
* (Haiku) Added support for the PDF viewer
* Updated the el_GR.po, es_ES.po, fr_FR.po, it_IT.po, ja_JP.po, ru_RU.po and zh_CN.po locale files
* Documentation update
* (Haiku) Added correct installation directories to the CMake configuration
* (Haiku) Changed to correct installation directories
* (Haiku) Added support for the correct system resource directories
* (Haiku) Made sure es-pdf-convert is found under all circumstances
* Updated the fr_FR translations
* Updated the es_ES translations
* Updated the it_IT translations
* Added a menu title font size adjustment for the it_IT translations
* Updated the ja_JP translations
* Updated the zh_CN translations
* Fixed an issue where scraping using TheGamesDB would crash the application
* Added an extra check in OptionListComponent to avoid potential crashes
* Removed support for the ca_AD locale
* Added a code comment clarification in FileSystemUtil
* Updated the pl_PL translations
* Some minor code modernization in MameNames
* Fixed an issue where returning from a game would sometimes make the helpsystem use the dimmed theme properties
* (Haiku) Added a resource file
* Added a menu title font size adjustment for the de_DE translations
* (Haiku) Added support for some game systems
* (Haiku) Added a HaikuPorts recipe
* (Haiku) Fixed an URI issue in the HaikuPorts recipe
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Updated the it_IT translations
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Added basic configuration support and menu entries for theme localization
* Changed a theme loading debug message
* (linear-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* (modern-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* Updated the it_IT translations
* Added support for using language variables in the theme configuration
* Added localization support to DateTimeComponent
* Added translations for the automatic collection names when used as theme system variables
* Added localization support for the theme game counter
* Added theme contextual hinting to the custom collection summary text in CollectionSystemsManager
Also added translation support for a string that was previously missed
* Added localization support to the label entries in capabilities.xml
* Fixed a regression where horizontal text containers would sometimes not work correctly
* Fixed an issue where text elements defined as gamecount using the systemdata property could not scroll horizontally
* Added support for including theme files from within the colorScheme and fontSize tag pairs
* Added translations for the automatic collection names (short name versions) when used as theme system variables
* Fixed an incorrect code comment in CollectionSystemsManager
* Added translations for the name and fullname systemdata properties for the text element
* Added translation support for the metadata property for the text element
* Updated all locale (.po) files with the theme engine localization additions
* (linear-es-de) Added translations for en_US, en_GB and sv_SE
* Documentation update
* Updated the fr_FR translations
* (linear-es-de) Added translations for fr_FR
* Updated the ja_JP translations
* Updated the zh_CN translations
* (modern-es-de) Added translations for en_US, en_GB, fr_FR and sv_SE
* Updated the es_ES translations
* Updated the ro_RO translations
* (linear-es-de) Added translations for es_ES
* (linear-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for en_US, en_GB and sv_SE
* (linear-es-de) Updated the es_ES translations
* (modern-es-de) Updated the fr_FR translations
* (linear-es-de) Some minor translation changes
* (modern-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for ro_RO
* Updated the it_IT translations
* Updated the pt_BR translations
* (linear-es-de) Added translations for it_IT
* (modern-es-de) Decreased the helpsystem entry spacing
* (modern-es-de) Added translations for es_ES and it_IT
* (slate-es-de) Added translations for es_ES, fr_FR and it_IT
* (linear-es-de) Added translations for pt_BR
* (modern-es-de) Added translations for pt_BR
* (slate-es-de) Added translations for pt_BR
* (Haiku) Added support for the c64, plus4 and vic20 systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Updated SDL to 2.30.6 on Android, Windows, macOS and the Linux AppImage builds
* Added an ICU filter configuration file
* (macOS) Reduced the ICU library size via a data filter file
* (Windows) Reduced the ICU library size via a data filter file
* Updated the ru_RU translations
* (linear-es-de) Added translations for ru_RU
* (modern-es-de) Added translations for ru_RU
* (slate-es-de) Added translations for ru_RU
* Added a menu title font size adjustment for the ru_RU translations
* Removed an unnecessary element resize in ScrollableContainer
* Fixed a line breaking issue
* Added theme engine translations for 'unknown' metadata values for developer, publisher, genre and players
* Added theme engine translations for 'never' and 'unknown' date values
* (linear-es-de) Added translations for ja_JP and zh_CN
* (modern-es-de) Added translations for ja_JP and zh_CN
* (slate-es-de) Added translations for ja_JP and zh_CN
* Updated all locales with new theme engine translations
* Fixed an issue where the text element defaultValue property no longer worked correctly
* (modern-es-de) Added some capitalized default metadata values
* Documentation update
* pdated the el_GR translations
* (linear-es-de) Updated the system metadata
* (linear-es-de) Added sv_SE translations for all system hardware types
* Updated the de_DE translations
* Updated the pl_PL translations
* Bundled the July 2024 release of the Mozilla TLS/SSL certificates
* Updated the MAME index files to include ROMs up to MAME version 0.269
* (linear-es-de) Added translations for pl_PL
* Added the VirtualXT RetroArch core as an alternative emulator for the dos and pc systems
* Added the Stella 2023 RetroArch core as an alternative emulator for the atari2600 system
* Removed support for the ar_EG, de_DE, el_GR and nl_NL locales and moved their .po files to an archive directory
* Documentation update
* (modern-es-de) Added translations for pl_PL
* (slate-es-de) Added translations for pl_PL
* Updated SDL to 2.30.7 on Android, Windows, macOS and the Linux AppImage builds
* Updated the fr_FR translations
* Added support for the new Lime3DS binary names on Linux, macOS and Windows
* Added some missing find rules for Lime3DS
* (Windows) Added 'Shortcut' as an alternative emulator for the switch system
Also added the .lnk file extension
* Added jgenesis as an alternative emulator for the famicom, gamegear, gb, gbc, genesis, mastersystem, megacd, megacdjp, megadrive, megadrivejp, nes, segacd, sfc, snes and snesna systems on Linux and Windows
* Documentation update
* Added izapple2 standalone as an alternative emulator for the apple2 system on Linux and Windows
* (Android) Added support for the Microsoft Windows (windows) game system using the Winlator emulator
* (Android) Added Winlator PRoot Cmod standalone as an alternative emulator for the windows system
* Documentation update
* (Android) Added support for the PC Arcade Systems (pcarcade) and Taito Type X (type-x) game systems
* Bumped the version to 3.1.0
* (modern-es-de) Eliminated an annoying debug message
* (linear-es-de) Added some missing metadata files
* (linear-es-de) Added some missing sv_SE translations
* Updated the Winlator emulator names
* Documentation update
* Documentation update for the 3.1.0 release
* Updated latest_release.json for the 3.1.0 release
* Fixed a typo in the changelog
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Bumped the version to 3.1.1-alpha
* Video player resources are now completely freed up after finishing view transitions
* Changed a rounding in ScrollableContainer to slightly decrease the risk of glyphs getting cut off at the bottom of the container
* Added the Nanum Square Neo Korean font
* Added support for the ko_KR locale
* Fixed an issue where newly entered ScreenScraper username and password values were positioned incorrectly vertically in the account settings menu
* Documentation update
* Changed the position of the ko_KR language
* Changed the ja_JP position in the languages file
* Fixed an issue where attempting to view media for a game that had no downloaded media paused the playback of all static theme videos
* Documentation update
* Added support for the de_DE locale
* Updated the fr_FR translations
* Documentation update
* Updated the de_DE translations
---------
Co-authored-by: Leon Styhre <leon@leonstyhre.com>
2024-09-18 00:23:26 +00:00
|
|
|
|
const size_t maxErrorLength {150};
|
|
|
|
|
|
|
|
|
|
std::string err {ss.str()};
|
|
|
|
|
if (err.length() > maxErrorLength)
|
|
|
|
|
err = err.substr(0, maxErrorLength) + "...";
|
2020-06-21 12:25:28 +00:00
|
|
|
|
LOG(LogError) << err;
|
feat/update 3.1.0 (#7)
* Added initial text shaping support
* Fixed some font issues
* (Windows) Added initial text shaping support
* (macOS) Added initial text shaping support
* Disabled building of HarfBuzz-subset on Windows and macOS
* (Android) Added initial text shaping support
* Added the nl_NL locale to locale/languages
* Changed the font VRAM usage calculation to actually only include texture data
* Moved the HarfBuzz segment building to a separate function
Also implemented segment caching and fixed an issue where missing glyphs were not handled correctly
* Moved the text shaping to a separate function
* Fixed a text shaping issue when there was a font change for the last character of a string
* Added support for the pl_PL locale
* Changed two font calculation functions to use shaped text
Also consolidated the HarfBuzz segment creation and shaping into a single function
* Added a hack to make shaped text wrap somehow correctly
* Changed the text shaping function to return the segment vector
* Text shaping segments are no longer created by space characters
* RTL text segments are now flagged as such
* Fixed an issue where text was not correctly centered after line breaks
* Reverted some font changes that were not needed after all
* Changed to having HarfBuzz set the horizontal glyph advance
* Fixed another failure mode for the wrapText shaped text hack
* Added a precaution to prevent crashes in case of broken fonts being used
* Made accurate text layout work correctly using HarfBuzz
* Removed the offensive wrapText hacks and added some optimizations
Also changed the three dots to an actual ellipsis Unicode character when abbreviating text
* Reverted a change in TextComponent as it caused unforeseen issues
* Changed Font::shapeText() to pass the segments vector by reference
* Removed a temporary member variable in Font and replaced it with proper argument passing
* Fixed a regression where text shaping stopped working
* Added sharing of glyph atlas entries between shaped glyph entries that need the same texture
* Added support for the ar_EG locale
* Some font-related code and comments cleanup
* Fixed a source file header typo
* Documentation update
* Removed a lot of unnecessary text processing
* Added the ICU library as a dependency
* (Android) Added the ICU library as a dependency
* (macOS) Added the ICU library as a dependency
* (Windows) Added the ICU library as a dependency
* (Windows) Fixed an MSVC compiler warning
* Replaced all built-in Unicode case conversion logic and lookup tables with facilities from the ICU library
* Documentation update
* Updated the pl_PL translations
* Added a menu title font size adjustment for the pl_PL translations
* Removed support for NetBSD and OpenBSD
* Changed a code comment that referred to BSD Unix
* Documentation update
* Silenced some Clang compiler warnings
* Added experimental support for building on Haiku
* (Haiku) Added a ScreenScraper platform identifier
* (Haiku) Added support for the Sony PlayStation Portable (psp) game system
* (Haiku) Added support for the ScummVM Game Engine (scummvm) game system
* Documentation update
* Updated the pl_PL translations
* Changed ScreenSaver to use TextComponent instead of using Font facilities directly
* Changed Window to use TextComponent instead of using Font facilities directly
* Changed ButtonComponent to use TextComponent instead of using Font facilities directly
* Changed SliderComponent to use TextComponent instead of using Font facilities directly
* Reverted ButtonComponent and SliderComponent to render the debug overlays themselves
* Changed DateTimeEditComponent to use TextComponent instead of using Font facilities directly
* Minor code cleanup
* Changed TextEditComponent to use TextComponent instead of using Font facilities directly
* Changed Font::buildTextCache() and Font::renderTextCache() to protected functions
* Changed a compiler silencing option to only apply to Clang
* (Haiku) Updated CMake configuration to make ES-DE build on Haiku Nightly (but no longer on R1/beta4)
* Documentation update
* (Haiku) Added find rule configuration for RetroArch
Also added a single core for testing purposes
* Removed direct use of Font::wrapText() from OptionListComponent, TextEditComponent and TextListComponent
* Removed direct use of Font::wrapText() from TextComponent
* Fixed an issue where ComponentList could generate elements with negative widths
* Added an assertion to GuiComponent::setSize() to check for negative mSize values
* DateTimeEditComponent no longer renders the debug overlay unless there is a string to display
* (FreeBSD) Added support for building with DEINIT_ON_LAUNCH
* (FreeBSD) Added the man page to the CPack configuration
* (FreeBSD) Added support for rebooting and powering off from inside ES-DE
* (FreeBSD) Added fallback method to locate binary
* Added layout and line wrapping support for shaped text and for mixing of LTR and RTL scripts
* Fixed a special line wrapping scenario where a trailing space should be removed
* (Windows) Fixed some MSVC compiler warnings
* Fixed some Clang compiler warnings
* Fixed an issue where theme names in the theme downloader could get abbreviated
* Added support for the ca_AD locale
* Documentation update
* (Android) Fonts and locales are now copied earlier than the other assets as HarfBuzz and libintl need them earlier in the startup process
* Documentation update
* Added support for the de_DE locale
* (Android) Added a new default find rule entry for Flycast as its application ID has been changed
* Documentation update
* Fixed an issue where text shaping could be permanently disabled after editing text
* Fixed a potential issue where globally disabling text shaping could cause space detection to fail
* Added a check for whether a text element has a width defined when the container property is set
* (Android) Changed ePSXe to use %ROM% instead of %ROMSAF%
* (Haiku) Added support for the PDF viewer
* Updated the el_GR.po, es_ES.po, fr_FR.po, it_IT.po, ja_JP.po, ru_RU.po and zh_CN.po locale files
* Documentation update
* (Haiku) Added correct installation directories to the CMake configuration
* (Haiku) Changed to correct installation directories
* (Haiku) Added support for the correct system resource directories
* (Haiku) Made sure es-pdf-convert is found under all circumstances
* Updated the fr_FR translations
* Updated the es_ES translations
* Updated the it_IT translations
* Added a menu title font size adjustment for the it_IT translations
* Updated the ja_JP translations
* Updated the zh_CN translations
* Fixed an issue where scraping using TheGamesDB would crash the application
* Added an extra check in OptionListComponent to avoid potential crashes
* Removed support for the ca_AD locale
* Added a code comment clarification in FileSystemUtil
* Updated the pl_PL translations
* Some minor code modernization in MameNames
* Fixed an issue where returning from a game would sometimes make the helpsystem use the dimmed theme properties
* (Haiku) Added a resource file
* Added a menu title font size adjustment for the de_DE translations
* (Haiku) Added support for some game systems
* (Haiku) Added a HaikuPorts recipe
* (Haiku) Fixed an URI issue in the HaikuPorts recipe
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Updated the it_IT translations
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Added basic configuration support and menu entries for theme localization
* Changed a theme loading debug message
* (linear-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* (modern-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* Updated the it_IT translations
* Added support for using language variables in the theme configuration
* Added localization support to DateTimeComponent
* Added translations for the automatic collection names when used as theme system variables
* Added localization support for the theme game counter
* Added theme contextual hinting to the custom collection summary text in CollectionSystemsManager
Also added translation support for a string that was previously missed
* Added localization support to the label entries in capabilities.xml
* Fixed a regression where horizontal text containers would sometimes not work correctly
* Fixed an issue where text elements defined as gamecount using the systemdata property could not scroll horizontally
* Added support for including theme files from within the colorScheme and fontSize tag pairs
* Added translations for the automatic collection names (short name versions) when used as theme system variables
* Fixed an incorrect code comment in CollectionSystemsManager
* Added translations for the name and fullname systemdata properties for the text element
* Added translation support for the metadata property for the text element
* Updated all locale (.po) files with the theme engine localization additions
* (linear-es-de) Added translations for en_US, en_GB and sv_SE
* Documentation update
* Updated the fr_FR translations
* (linear-es-de) Added translations for fr_FR
* Updated the ja_JP translations
* Updated the zh_CN translations
* (modern-es-de) Added translations for en_US, en_GB, fr_FR and sv_SE
* Updated the es_ES translations
* Updated the ro_RO translations
* (linear-es-de) Added translations for es_ES
* (linear-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for en_US, en_GB and sv_SE
* (linear-es-de) Updated the es_ES translations
* (modern-es-de) Updated the fr_FR translations
* (linear-es-de) Some minor translation changes
* (modern-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for ro_RO
* Updated the it_IT translations
* Updated the pt_BR translations
* (linear-es-de) Added translations for it_IT
* (modern-es-de) Decreased the helpsystem entry spacing
* (modern-es-de) Added translations for es_ES and it_IT
* (slate-es-de) Added translations for es_ES, fr_FR and it_IT
* (linear-es-de) Added translations for pt_BR
* (modern-es-de) Added translations for pt_BR
* (slate-es-de) Added translations for pt_BR
* (Haiku) Added support for the c64, plus4 and vic20 systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Updated SDL to 2.30.6 on Android, Windows, macOS and the Linux AppImage builds
* Added an ICU filter configuration file
* (macOS) Reduced the ICU library size via a data filter file
* (Windows) Reduced the ICU library size via a data filter file
* Updated the ru_RU translations
* (linear-es-de) Added translations for ru_RU
* (modern-es-de) Added translations for ru_RU
* (slate-es-de) Added translations for ru_RU
* Added a menu title font size adjustment for the ru_RU translations
* Removed an unnecessary element resize in ScrollableContainer
* Fixed a line breaking issue
* Added theme engine translations for 'unknown' metadata values for developer, publisher, genre and players
* Added theme engine translations for 'never' and 'unknown' date values
* (linear-es-de) Added translations for ja_JP and zh_CN
* (modern-es-de) Added translations for ja_JP and zh_CN
* (slate-es-de) Added translations for ja_JP and zh_CN
* Updated all locales with new theme engine translations
* Fixed an issue where the text element defaultValue property no longer worked correctly
* (modern-es-de) Added some capitalized default metadata values
* Documentation update
* pdated the el_GR translations
* (linear-es-de) Updated the system metadata
* (linear-es-de) Added sv_SE translations for all system hardware types
* Updated the de_DE translations
* Updated the pl_PL translations
* Bundled the July 2024 release of the Mozilla TLS/SSL certificates
* Updated the MAME index files to include ROMs up to MAME version 0.269
* (linear-es-de) Added translations for pl_PL
* Added the VirtualXT RetroArch core as an alternative emulator for the dos and pc systems
* Added the Stella 2023 RetroArch core as an alternative emulator for the atari2600 system
* Removed support for the ar_EG, de_DE, el_GR and nl_NL locales and moved their .po files to an archive directory
* Documentation update
* (modern-es-de) Added translations for pl_PL
* (slate-es-de) Added translations for pl_PL
* Updated SDL to 2.30.7 on Android, Windows, macOS and the Linux AppImage builds
* Updated the fr_FR translations
* Added support for the new Lime3DS binary names on Linux, macOS and Windows
* Added some missing find rules for Lime3DS
* (Windows) Added 'Shortcut' as an alternative emulator for the switch system
Also added the .lnk file extension
* Added jgenesis as an alternative emulator for the famicom, gamegear, gb, gbc, genesis, mastersystem, megacd, megacdjp, megadrive, megadrivejp, nes, segacd, sfc, snes and snesna systems on Linux and Windows
* Documentation update
* Added izapple2 standalone as an alternative emulator for the apple2 system on Linux and Windows
* (Android) Added support for the Microsoft Windows (windows) game system using the Winlator emulator
* (Android) Added Winlator PRoot Cmod standalone as an alternative emulator for the windows system
* Documentation update
* (Android) Added support for the PC Arcade Systems (pcarcade) and Taito Type X (type-x) game systems
* Bumped the version to 3.1.0
* (modern-es-de) Eliminated an annoying debug message
* (linear-es-de) Added some missing metadata files
* (linear-es-de) Added some missing sv_SE translations
* Updated the Winlator emulator names
* Documentation update
* Documentation update for the 3.1.0 release
* Updated latest_release.json for the 3.1.0 release
* Fixed a typo in the changelog
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Bumped the version to 3.1.1-alpha
* Video player resources are now completely freed up after finishing view transitions
* Changed a rounding in ScrollableContainer to slightly decrease the risk of glyphs getting cut off at the bottom of the container
* Added the Nanum Square Neo Korean font
* Added support for the ko_KR locale
* Fixed an issue where newly entered ScreenScraper username and password values were positioned incorrectly vertically in the account settings menu
* Documentation update
* Changed the position of the ko_KR language
* Changed the ja_JP position in the languages file
* Fixed an issue where attempting to view media for a game that had no downloaded media paused the playback of all static theme videos
* Documentation update
* Added support for the de_DE locale
* Updated the fr_FR translations
* Documentation update
* Updated the de_DE translations
---------
Co-authored-by: Leon Styhre <leon@leonstyhre.com>
2024-09-18 00:23:26 +00:00
|
|
|
|
|
|
|
|
|
std::string content {req->getContent()};
|
|
|
|
|
if (content.length() > maxErrorLength)
|
|
|
|
|
content = content.substr(0, maxErrorLength) + "...";
|
|
|
|
|
setError(_("ScreenScraper error:") + " \n" + content, true);
|
2020-07-30 18:11:45 +00:00
|
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
2019-01-11 19:51:05 +00:00
|
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
|
processGame(doc, results);
|
2020-09-26 11:07:52 +00:00
|
|
|
|
|
|
|
|
|
// For some files, screenscraper.fr consistently responds with the game name 'ZZZ(notgame)',
|
|
|
|
|
// or sometimes in the longer format 'ZZZ(notgame):Fichier Annexes - Non Jeux'. For instance
|
|
|
|
|
// this can happen for configuration files for DOS games such as 'setup.exe' and similar.
|
|
|
|
|
// We definitely don't want to save these to our gamelists, so we simply skip these
|
|
|
|
|
// responses. There also seems to be some cases where this type of response is randomly
|
|
|
|
|
// returned instead of a valid game name, and retrying a second time returns the proper
|
|
|
|
|
// name. But it's basically impossible to know which is the case, and we really can't
|
|
|
|
|
// compensate for errors in the scraper service.
|
2023-02-02 22:18:08 +00:00
|
|
|
|
for (auto it = results.cbegin(); it != results.cend();) {
|
|
|
|
|
const std::string gameName {Utils::String::toUpper((*it).mdl.get("name"))};
|
2020-09-26 11:07:52 +00:00
|
|
|
|
if (gameName.substr(0, 12) == "ZZZ(NOTGAME)") {
|
2023-08-04 15:56:50 +00:00
|
|
|
|
LOG(LogWarning) << "ScreenScraperRequest: Received \"ZZZ(notgame)\" as game name, "
|
2021-07-07 18:03:42 +00:00
|
|
|
|
"ignoring response";
|
2023-02-02 22:18:08 +00:00
|
|
|
|
it = results.erase(it);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
++it;
|
2020-09-26 11:07:52 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-04 16:02:12 +00:00
|
|
|
|
|
|
|
|
|
// If there are multiple platforms defined for the system, then it's possible that the scraper
|
|
|
|
|
// service will return the same results for each platform, so we need to remove such duplicates.
|
|
|
|
|
if (results.size() > 1) {
|
2023-10-24 18:32:19 +00:00
|
|
|
|
std::vector<std::string> gameIDs;
|
|
|
|
|
for (auto it = results.cbegin(); it != results.cend();) {
|
|
|
|
|
if (std::find(gameIDs.begin(), gameIDs.end(), (*it).gameID) != gameIDs.end()) {
|
|
|
|
|
LOG(LogDebug)
|
|
|
|
|
<< "ScreenScraperRequest::process(): Removed duplicate entry for game ID "
|
|
|
|
|
<< (*it).gameID;
|
2023-08-04 16:02:12 +00:00
|
|
|
|
it = results.erase(it);
|
|
|
|
|
}
|
|
|
|
|
else {
|
2023-10-24 18:32:19 +00:00
|
|
|
|
gameIDs.emplace_back((*it).gameID);
|
2023-08-04 16:02:12 +00:00
|
|
|
|
++it;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-01-11 19:51:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-05-26 16:34:33 +00:00
|
|
|
|
void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc,
|
2021-07-07 18:03:42 +00:00
|
|
|
|
std::vector<ScraperSearchResult>& out_results)
|
2019-01-11 19:51:05 +00:00
|
|
|
|
{
|
2023-01-22 12:09:41 +00:00
|
|
|
|
pugi::xml_node data {xmldoc.child("Data")};
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
feat/update 3.1.0 (#7)
* Added initial text shaping support
* Fixed some font issues
* (Windows) Added initial text shaping support
* (macOS) Added initial text shaping support
* Disabled building of HarfBuzz-subset on Windows and macOS
* (Android) Added initial text shaping support
* Added the nl_NL locale to locale/languages
* Changed the font VRAM usage calculation to actually only include texture data
* Moved the HarfBuzz segment building to a separate function
Also implemented segment caching and fixed an issue where missing glyphs were not handled correctly
* Moved the text shaping to a separate function
* Fixed a text shaping issue when there was a font change for the last character of a string
* Added support for the pl_PL locale
* Changed two font calculation functions to use shaped text
Also consolidated the HarfBuzz segment creation and shaping into a single function
* Added a hack to make shaped text wrap somehow correctly
* Changed the text shaping function to return the segment vector
* Text shaping segments are no longer created by space characters
* RTL text segments are now flagged as such
* Fixed an issue where text was not correctly centered after line breaks
* Reverted some font changes that were not needed after all
* Changed to having HarfBuzz set the horizontal glyph advance
* Fixed another failure mode for the wrapText shaped text hack
* Added a precaution to prevent crashes in case of broken fonts being used
* Made accurate text layout work correctly using HarfBuzz
* Removed the offensive wrapText hacks and added some optimizations
Also changed the three dots to an actual ellipsis Unicode character when abbreviating text
* Reverted a change in TextComponent as it caused unforeseen issues
* Changed Font::shapeText() to pass the segments vector by reference
* Removed a temporary member variable in Font and replaced it with proper argument passing
* Fixed a regression where text shaping stopped working
* Added sharing of glyph atlas entries between shaped glyph entries that need the same texture
* Added support for the ar_EG locale
* Some font-related code and comments cleanup
* Fixed a source file header typo
* Documentation update
* Removed a lot of unnecessary text processing
* Added the ICU library as a dependency
* (Android) Added the ICU library as a dependency
* (macOS) Added the ICU library as a dependency
* (Windows) Added the ICU library as a dependency
* (Windows) Fixed an MSVC compiler warning
* Replaced all built-in Unicode case conversion logic and lookup tables with facilities from the ICU library
* Documentation update
* Updated the pl_PL translations
* Added a menu title font size adjustment for the pl_PL translations
* Removed support for NetBSD and OpenBSD
* Changed a code comment that referred to BSD Unix
* Documentation update
* Silenced some Clang compiler warnings
* Added experimental support for building on Haiku
* (Haiku) Added a ScreenScraper platform identifier
* (Haiku) Added support for the Sony PlayStation Portable (psp) game system
* (Haiku) Added support for the ScummVM Game Engine (scummvm) game system
* Documentation update
* Updated the pl_PL translations
* Changed ScreenSaver to use TextComponent instead of using Font facilities directly
* Changed Window to use TextComponent instead of using Font facilities directly
* Changed ButtonComponent to use TextComponent instead of using Font facilities directly
* Changed SliderComponent to use TextComponent instead of using Font facilities directly
* Reverted ButtonComponent and SliderComponent to render the debug overlays themselves
* Changed DateTimeEditComponent to use TextComponent instead of using Font facilities directly
* Minor code cleanup
* Changed TextEditComponent to use TextComponent instead of using Font facilities directly
* Changed Font::buildTextCache() and Font::renderTextCache() to protected functions
* Changed a compiler silencing option to only apply to Clang
* (Haiku) Updated CMake configuration to make ES-DE build on Haiku Nightly (but no longer on R1/beta4)
* Documentation update
* (Haiku) Added find rule configuration for RetroArch
Also added a single core for testing purposes
* Removed direct use of Font::wrapText() from OptionListComponent, TextEditComponent and TextListComponent
* Removed direct use of Font::wrapText() from TextComponent
* Fixed an issue where ComponentList could generate elements with negative widths
* Added an assertion to GuiComponent::setSize() to check for negative mSize values
* DateTimeEditComponent no longer renders the debug overlay unless there is a string to display
* (FreeBSD) Added support for building with DEINIT_ON_LAUNCH
* (FreeBSD) Added the man page to the CPack configuration
* (FreeBSD) Added support for rebooting and powering off from inside ES-DE
* (FreeBSD) Added fallback method to locate binary
* Added layout and line wrapping support for shaped text and for mixing of LTR and RTL scripts
* Fixed a special line wrapping scenario where a trailing space should be removed
* (Windows) Fixed some MSVC compiler warnings
* Fixed some Clang compiler warnings
* Fixed an issue where theme names in the theme downloader could get abbreviated
* Added support for the ca_AD locale
* Documentation update
* (Android) Fonts and locales are now copied earlier than the other assets as HarfBuzz and libintl need them earlier in the startup process
* Documentation update
* Added support for the de_DE locale
* (Android) Added a new default find rule entry for Flycast as its application ID has been changed
* Documentation update
* Fixed an issue where text shaping could be permanently disabled after editing text
* Fixed a potential issue where globally disabling text shaping could cause space detection to fail
* Added a check for whether a text element has a width defined when the container property is set
* (Android) Changed ePSXe to use %ROM% instead of %ROMSAF%
* (Haiku) Added support for the PDF viewer
* Updated the el_GR.po, es_ES.po, fr_FR.po, it_IT.po, ja_JP.po, ru_RU.po and zh_CN.po locale files
* Documentation update
* (Haiku) Added correct installation directories to the CMake configuration
* (Haiku) Changed to correct installation directories
* (Haiku) Added support for the correct system resource directories
* (Haiku) Made sure es-pdf-convert is found under all circumstances
* Updated the fr_FR translations
* Updated the es_ES translations
* Updated the it_IT translations
* Added a menu title font size adjustment for the it_IT translations
* Updated the ja_JP translations
* Updated the zh_CN translations
* Fixed an issue where scraping using TheGamesDB would crash the application
* Added an extra check in OptionListComponent to avoid potential crashes
* Removed support for the ca_AD locale
* Added a code comment clarification in FileSystemUtil
* Updated the pl_PL translations
* Some minor code modernization in MameNames
* Fixed an issue where returning from a game would sometimes make the helpsystem use the dimmed theme properties
* (Haiku) Added a resource file
* Added a menu title font size adjustment for the de_DE translations
* (Haiku) Added support for some game systems
* (Haiku) Added a HaikuPorts recipe
* (Haiku) Fixed an URI issue in the HaikuPorts recipe
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Updated the it_IT translations
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Added basic configuration support and menu entries for theme localization
* Changed a theme loading debug message
* (linear-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* (modern-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* Updated the it_IT translations
* Added support for using language variables in the theme configuration
* Added localization support to DateTimeComponent
* Added translations for the automatic collection names when used as theme system variables
* Added localization support for the theme game counter
* Added theme contextual hinting to the custom collection summary text in CollectionSystemsManager
Also added translation support for a string that was previously missed
* Added localization support to the label entries in capabilities.xml
* Fixed a regression where horizontal text containers would sometimes not work correctly
* Fixed an issue where text elements defined as gamecount using the systemdata property could not scroll horizontally
* Added support for including theme files from within the colorScheme and fontSize tag pairs
* Added translations for the automatic collection names (short name versions) when used as theme system variables
* Fixed an incorrect code comment in CollectionSystemsManager
* Added translations for the name and fullname systemdata properties for the text element
* Added translation support for the metadata property for the text element
* Updated all locale (.po) files with the theme engine localization additions
* (linear-es-de) Added translations for en_US, en_GB and sv_SE
* Documentation update
* Updated the fr_FR translations
* (linear-es-de) Added translations for fr_FR
* Updated the ja_JP translations
* Updated the zh_CN translations
* (modern-es-de) Added translations for en_US, en_GB, fr_FR and sv_SE
* Updated the es_ES translations
* Updated the ro_RO translations
* (linear-es-de) Added translations for es_ES
* (linear-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for en_US, en_GB and sv_SE
* (linear-es-de) Updated the es_ES translations
* (modern-es-de) Updated the fr_FR translations
* (linear-es-de) Some minor translation changes
* (modern-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for ro_RO
* Updated the it_IT translations
* Updated the pt_BR translations
* (linear-es-de) Added translations for it_IT
* (modern-es-de) Decreased the helpsystem entry spacing
* (modern-es-de) Added translations for es_ES and it_IT
* (slate-es-de) Added translations for es_ES, fr_FR and it_IT
* (linear-es-de) Added translations for pt_BR
* (modern-es-de) Added translations for pt_BR
* (slate-es-de) Added translations for pt_BR
* (Haiku) Added support for the c64, plus4 and vic20 systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Updated SDL to 2.30.6 on Android, Windows, macOS and the Linux AppImage builds
* Added an ICU filter configuration file
* (macOS) Reduced the ICU library size via a data filter file
* (Windows) Reduced the ICU library size via a data filter file
* Updated the ru_RU translations
* (linear-es-de) Added translations for ru_RU
* (modern-es-de) Added translations for ru_RU
* (slate-es-de) Added translations for ru_RU
* Added a menu title font size adjustment for the ru_RU translations
* Removed an unnecessary element resize in ScrollableContainer
* Fixed a line breaking issue
* Added theme engine translations for 'unknown' metadata values for developer, publisher, genre and players
* Added theme engine translations for 'never' and 'unknown' date values
* (linear-es-de) Added translations for ja_JP and zh_CN
* (modern-es-de) Added translations for ja_JP and zh_CN
* (slate-es-de) Added translations for ja_JP and zh_CN
* Updated all locales with new theme engine translations
* Fixed an issue where the text element defaultValue property no longer worked correctly
* (modern-es-de) Added some capitalized default metadata values
* Documentation update
* pdated the el_GR translations
* (linear-es-de) Updated the system metadata
* (linear-es-de) Added sv_SE translations for all system hardware types
* Updated the de_DE translations
* Updated the pl_PL translations
* Bundled the July 2024 release of the Mozilla TLS/SSL certificates
* Updated the MAME index files to include ROMs up to MAME version 0.269
* (linear-es-de) Added translations for pl_PL
* Added the VirtualXT RetroArch core as an alternative emulator for the dos and pc systems
* Added the Stella 2023 RetroArch core as an alternative emulator for the atari2600 system
* Removed support for the ar_EG, de_DE, el_GR and nl_NL locales and moved their .po files to an archive directory
* Documentation update
* (modern-es-de) Added translations for pl_PL
* (slate-es-de) Added translations for pl_PL
* Updated SDL to 2.30.7 on Android, Windows, macOS and the Linux AppImage builds
* Updated the fr_FR translations
* Added support for the new Lime3DS binary names on Linux, macOS and Windows
* Added some missing find rules for Lime3DS
* (Windows) Added 'Shortcut' as an alternative emulator for the switch system
Also added the .lnk file extension
* Added jgenesis as an alternative emulator for the famicom, gamegear, gb, gbc, genesis, mastersystem, megacd, megacdjp, megadrive, megadrivejp, nes, segacd, sfc, snes and snesna systems on Linux and Windows
* Documentation update
* Added izapple2 standalone as an alternative emulator for the apple2 system on Linux and Windows
* (Android) Added support for the Microsoft Windows (windows) game system using the Winlator emulator
* (Android) Added Winlator PRoot Cmod standalone as an alternative emulator for the windows system
* Documentation update
* (Android) Added support for the PC Arcade Systems (pcarcade) and Taito Type X (type-x) game systems
* Bumped the version to 3.1.0
* (modern-es-de) Eliminated an annoying debug message
* (linear-es-de) Added some missing metadata files
* (linear-es-de) Added some missing sv_SE translations
* Updated the Winlator emulator names
* Documentation update
* Documentation update for the 3.1.0 release
* Updated latest_release.json for the 3.1.0 release
* Fixed a typo in the changelog
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Bumped the version to 3.1.1-alpha
* Video player resources are now completely freed up after finishing view transitions
* Changed a rounding in ScrollableContainer to slightly decrease the risk of glyphs getting cut off at the bottom of the container
* Added the Nanum Square Neo Korean font
* Added support for the ko_KR locale
* Fixed an issue where newly entered ScreenScraper username and password values were positioned incorrectly vertically in the account settings menu
* Documentation update
* Changed the position of the ko_KR language
* Changed the ja_JP position in the languages file
* Fixed an issue where attempting to view media for a game that had no downloaded media paused the playback of all static theme videos
* Documentation update
* Added support for the de_DE locale
* Updated the fr_FR translations
* Documentation update
* Updated the de_DE translations
---------
Co-authored-by: Leon Styhre <leon@leonstyhre.com>
2024-09-18 00:23:26 +00:00
|
|
|
|
// The "niveau" tag indicates whether the account is valid (correct username and password).
|
2020-11-14 14:30:49 +00:00
|
|
|
|
if (Settings::getInstance()->getBool("ScraperUseAccountScreenScraper") &&
|
feat/update 3.1.0 (#7)
* Added initial text shaping support
* Fixed some font issues
* (Windows) Added initial text shaping support
* (macOS) Added initial text shaping support
* Disabled building of HarfBuzz-subset on Windows and macOS
* (Android) Added initial text shaping support
* Added the nl_NL locale to locale/languages
* Changed the font VRAM usage calculation to actually only include texture data
* Moved the HarfBuzz segment building to a separate function
Also implemented segment caching and fixed an issue where missing glyphs were not handled correctly
* Moved the text shaping to a separate function
* Fixed a text shaping issue when there was a font change for the last character of a string
* Added support for the pl_PL locale
* Changed two font calculation functions to use shaped text
Also consolidated the HarfBuzz segment creation and shaping into a single function
* Added a hack to make shaped text wrap somehow correctly
* Changed the text shaping function to return the segment vector
* Text shaping segments are no longer created by space characters
* RTL text segments are now flagged as such
* Fixed an issue where text was not correctly centered after line breaks
* Reverted some font changes that were not needed after all
* Changed to having HarfBuzz set the horizontal glyph advance
* Fixed another failure mode for the wrapText shaped text hack
* Added a precaution to prevent crashes in case of broken fonts being used
* Made accurate text layout work correctly using HarfBuzz
* Removed the offensive wrapText hacks and added some optimizations
Also changed the three dots to an actual ellipsis Unicode character when abbreviating text
* Reverted a change in TextComponent as it caused unforeseen issues
* Changed Font::shapeText() to pass the segments vector by reference
* Removed a temporary member variable in Font and replaced it with proper argument passing
* Fixed a regression where text shaping stopped working
* Added sharing of glyph atlas entries between shaped glyph entries that need the same texture
* Added support for the ar_EG locale
* Some font-related code and comments cleanup
* Fixed a source file header typo
* Documentation update
* Removed a lot of unnecessary text processing
* Added the ICU library as a dependency
* (Android) Added the ICU library as a dependency
* (macOS) Added the ICU library as a dependency
* (Windows) Added the ICU library as a dependency
* (Windows) Fixed an MSVC compiler warning
* Replaced all built-in Unicode case conversion logic and lookup tables with facilities from the ICU library
* Documentation update
* Updated the pl_PL translations
* Added a menu title font size adjustment for the pl_PL translations
* Removed support for NetBSD and OpenBSD
* Changed a code comment that referred to BSD Unix
* Documentation update
* Silenced some Clang compiler warnings
* Added experimental support for building on Haiku
* (Haiku) Added a ScreenScraper platform identifier
* (Haiku) Added support for the Sony PlayStation Portable (psp) game system
* (Haiku) Added support for the ScummVM Game Engine (scummvm) game system
* Documentation update
* Updated the pl_PL translations
* Changed ScreenSaver to use TextComponent instead of using Font facilities directly
* Changed Window to use TextComponent instead of using Font facilities directly
* Changed ButtonComponent to use TextComponent instead of using Font facilities directly
* Changed SliderComponent to use TextComponent instead of using Font facilities directly
* Reverted ButtonComponent and SliderComponent to render the debug overlays themselves
* Changed DateTimeEditComponent to use TextComponent instead of using Font facilities directly
* Minor code cleanup
* Changed TextEditComponent to use TextComponent instead of using Font facilities directly
* Changed Font::buildTextCache() and Font::renderTextCache() to protected functions
* Changed a compiler silencing option to only apply to Clang
* (Haiku) Updated CMake configuration to make ES-DE build on Haiku Nightly (but no longer on R1/beta4)
* Documentation update
* (Haiku) Added find rule configuration for RetroArch
Also added a single core for testing purposes
* Removed direct use of Font::wrapText() from OptionListComponent, TextEditComponent and TextListComponent
* Removed direct use of Font::wrapText() from TextComponent
* Fixed an issue where ComponentList could generate elements with negative widths
* Added an assertion to GuiComponent::setSize() to check for negative mSize values
* DateTimeEditComponent no longer renders the debug overlay unless there is a string to display
* (FreeBSD) Added support for building with DEINIT_ON_LAUNCH
* (FreeBSD) Added the man page to the CPack configuration
* (FreeBSD) Added support for rebooting and powering off from inside ES-DE
* (FreeBSD) Added fallback method to locate binary
* Added layout and line wrapping support for shaped text and for mixing of LTR and RTL scripts
* Fixed a special line wrapping scenario where a trailing space should be removed
* (Windows) Fixed some MSVC compiler warnings
* Fixed some Clang compiler warnings
* Fixed an issue where theme names in the theme downloader could get abbreviated
* Added support for the ca_AD locale
* Documentation update
* (Android) Fonts and locales are now copied earlier than the other assets as HarfBuzz and libintl need them earlier in the startup process
* Documentation update
* Added support for the de_DE locale
* (Android) Added a new default find rule entry for Flycast as its application ID has been changed
* Documentation update
* Fixed an issue where text shaping could be permanently disabled after editing text
* Fixed a potential issue where globally disabling text shaping could cause space detection to fail
* Added a check for whether a text element has a width defined when the container property is set
* (Android) Changed ePSXe to use %ROM% instead of %ROMSAF%
* (Haiku) Added support for the PDF viewer
* Updated the el_GR.po, es_ES.po, fr_FR.po, it_IT.po, ja_JP.po, ru_RU.po and zh_CN.po locale files
* Documentation update
* (Haiku) Added correct installation directories to the CMake configuration
* (Haiku) Changed to correct installation directories
* (Haiku) Added support for the correct system resource directories
* (Haiku) Made sure es-pdf-convert is found under all circumstances
* Updated the fr_FR translations
* Updated the es_ES translations
* Updated the it_IT translations
* Added a menu title font size adjustment for the it_IT translations
* Updated the ja_JP translations
* Updated the zh_CN translations
* Fixed an issue where scraping using TheGamesDB would crash the application
* Added an extra check in OptionListComponent to avoid potential crashes
* Removed support for the ca_AD locale
* Added a code comment clarification in FileSystemUtil
* Updated the pl_PL translations
* Some minor code modernization in MameNames
* Fixed an issue where returning from a game would sometimes make the helpsystem use the dimmed theme properties
* (Haiku) Added a resource file
* Added a menu title font size adjustment for the de_DE translations
* (Haiku) Added support for some game systems
* (Haiku) Added a HaikuPorts recipe
* (Haiku) Fixed an URI issue in the HaikuPorts recipe
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Updated the it_IT translations
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Added basic configuration support and menu entries for theme localization
* Changed a theme loading debug message
* (linear-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* (modern-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* Updated the it_IT translations
* Added support for using language variables in the theme configuration
* Added localization support to DateTimeComponent
* Added translations for the automatic collection names when used as theme system variables
* Added localization support for the theme game counter
* Added theme contextual hinting to the custom collection summary text in CollectionSystemsManager
Also added translation support for a string that was previously missed
* Added localization support to the label entries in capabilities.xml
* Fixed a regression where horizontal text containers would sometimes not work correctly
* Fixed an issue where text elements defined as gamecount using the systemdata property could not scroll horizontally
* Added support for including theme files from within the colorScheme and fontSize tag pairs
* Added translations for the automatic collection names (short name versions) when used as theme system variables
* Fixed an incorrect code comment in CollectionSystemsManager
* Added translations for the name and fullname systemdata properties for the text element
* Added translation support for the metadata property for the text element
* Updated all locale (.po) files with the theme engine localization additions
* (linear-es-de) Added translations for en_US, en_GB and sv_SE
* Documentation update
* Updated the fr_FR translations
* (linear-es-de) Added translations for fr_FR
* Updated the ja_JP translations
* Updated the zh_CN translations
* (modern-es-de) Added translations for en_US, en_GB, fr_FR and sv_SE
* Updated the es_ES translations
* Updated the ro_RO translations
* (linear-es-de) Added translations for es_ES
* (linear-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for en_US, en_GB and sv_SE
* (linear-es-de) Updated the es_ES translations
* (modern-es-de) Updated the fr_FR translations
* (linear-es-de) Some minor translation changes
* (modern-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for ro_RO
* Updated the it_IT translations
* Updated the pt_BR translations
* (linear-es-de) Added translations for it_IT
* (modern-es-de) Decreased the helpsystem entry spacing
* (modern-es-de) Added translations for es_ES and it_IT
* (slate-es-de) Added translations for es_ES, fr_FR and it_IT
* (linear-es-de) Added translations for pt_BR
* (modern-es-de) Added translations for pt_BR
* (slate-es-de) Added translations for pt_BR
* (Haiku) Added support for the c64, plus4 and vic20 systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Updated SDL to 2.30.6 on Android, Windows, macOS and the Linux AppImage builds
* Added an ICU filter configuration file
* (macOS) Reduced the ICU library size via a data filter file
* (Windows) Reduced the ICU library size via a data filter file
* Updated the ru_RU translations
* (linear-es-de) Added translations for ru_RU
* (modern-es-de) Added translations for ru_RU
* (slate-es-de) Added translations for ru_RU
* Added a menu title font size adjustment for the ru_RU translations
* Removed an unnecessary element resize in ScrollableContainer
* Fixed a line breaking issue
* Added theme engine translations for 'unknown' metadata values for developer, publisher, genre and players
* Added theme engine translations for 'never' and 'unknown' date values
* (linear-es-de) Added translations for ja_JP and zh_CN
* (modern-es-de) Added translations for ja_JP and zh_CN
* (slate-es-de) Added translations for ja_JP and zh_CN
* Updated all locales with new theme engine translations
* Fixed an issue where the text element defaultValue property no longer worked correctly
* (modern-es-de) Added some capitalized default metadata values
* Documentation update
* pdated the el_GR translations
* (linear-es-de) Updated the system metadata
* (linear-es-de) Added sv_SE translations for all system hardware types
* Updated the de_DE translations
* Updated the pl_PL translations
* Bundled the July 2024 release of the Mozilla TLS/SSL certificates
* Updated the MAME index files to include ROMs up to MAME version 0.269
* (linear-es-de) Added translations for pl_PL
* Added the VirtualXT RetroArch core as an alternative emulator for the dos and pc systems
* Added the Stella 2023 RetroArch core as an alternative emulator for the atari2600 system
* Removed support for the ar_EG, de_DE, el_GR and nl_NL locales and moved their .po files to an archive directory
* Documentation update
* (modern-es-de) Added translations for pl_PL
* (slate-es-de) Added translations for pl_PL
* Updated SDL to 2.30.7 on Android, Windows, macOS and the Linux AppImage builds
* Updated the fr_FR translations
* Added support for the new Lime3DS binary names on Linux, macOS and Windows
* Added some missing find rules for Lime3DS
* (Windows) Added 'Shortcut' as an alternative emulator for the switch system
Also added the .lnk file extension
* Added jgenesis as an alternative emulator for the famicom, gamegear, gb, gbc, genesis, mastersystem, megacd, megacdjp, megadrive, megadrivejp, nes, segacd, sfc, snes and snesna systems on Linux and Windows
* Documentation update
* Added izapple2 standalone as an alternative emulator for the apple2 system on Linux and Windows
* (Android) Added support for the Microsoft Windows (windows) game system using the Winlator emulator
* (Android) Added Winlator PRoot Cmod standalone as an alternative emulator for the windows system
* Documentation update
* (Android) Added support for the PC Arcade Systems (pcarcade) and Taito Type X (type-x) game systems
* Bumped the version to 3.1.0
* (modern-es-de) Eliminated an annoying debug message
* (linear-es-de) Added some missing metadata files
* (linear-es-de) Added some missing sv_SE translations
* Updated the Winlator emulator names
* Documentation update
* Documentation update for the 3.1.0 release
* Updated latest_release.json for the 3.1.0 release
* Fixed a typo in the changelog
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Bumped the version to 3.1.1-alpha
* Video player resources are now completely freed up after finishing view transitions
* Changed a rounding in ScrollableContainer to slightly decrease the risk of glyphs getting cut off at the bottom of the container
* Added the Nanum Square Neo Korean font
* Added support for the ko_KR locale
* Fixed an issue where newly entered ScreenScraper username and password values were positioned incorrectly vertically in the account settings menu
* Documentation update
* Changed the position of the ko_KR language
* Changed the ja_JP position in the languages file
* Fixed an issue where attempting to view media for a game that had no downloaded media paused the playback of all static theme videos
* Documentation update
* Added support for the de_DE locale
* Updated the fr_FR translations
* Documentation update
* Updated the de_DE translations
---------
Co-authored-by: Leon Styhre <leon@leonstyhre.com>
2024-09-18 00:23:26 +00:00
|
|
|
|
Settings::getInstance()->getString("ScraperUsernameScreenScraper") != "") {
|
|
|
|
|
if (data.child("ssuser").child("niveau") != nullptr) {
|
|
|
|
|
const std::string userID {data.child("ssuser").child("id").text().get()};
|
|
|
|
|
const std::string userStatus {data.child("ssuser").child("niveau").text().get()};
|
|
|
|
|
if (userStatus != "0") {
|
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Scraping using account \""
|
|
|
|
|
<< userID << "\"";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
LOG(LogError) << "ScreenScraper: Couldn't authenticate user \""
|
|
|
|
|
<< Settings::getInstance()->getString("ScraperUsernameScreenScraper")
|
|
|
|
|
<< "\", wrong username or password?";
|
|
|
|
|
|
|
|
|
|
setError(_("ScreenScraper: Wrong username or password"), false, true);
|
|
|
|
|
return;
|
|
|
|
|
}
|
2020-11-14 14:30:49 +00:00
|
|
|
|
}
|
|
|
|
|
else {
|
feat/update 3.1.0 (#7)
* Added initial text shaping support
* Fixed some font issues
* (Windows) Added initial text shaping support
* (macOS) Added initial text shaping support
* Disabled building of HarfBuzz-subset on Windows and macOS
* (Android) Added initial text shaping support
* Added the nl_NL locale to locale/languages
* Changed the font VRAM usage calculation to actually only include texture data
* Moved the HarfBuzz segment building to a separate function
Also implemented segment caching and fixed an issue where missing glyphs were not handled correctly
* Moved the text shaping to a separate function
* Fixed a text shaping issue when there was a font change for the last character of a string
* Added support for the pl_PL locale
* Changed two font calculation functions to use shaped text
Also consolidated the HarfBuzz segment creation and shaping into a single function
* Added a hack to make shaped text wrap somehow correctly
* Changed the text shaping function to return the segment vector
* Text shaping segments are no longer created by space characters
* RTL text segments are now flagged as such
* Fixed an issue where text was not correctly centered after line breaks
* Reverted some font changes that were not needed after all
* Changed to having HarfBuzz set the horizontal glyph advance
* Fixed another failure mode for the wrapText shaped text hack
* Added a precaution to prevent crashes in case of broken fonts being used
* Made accurate text layout work correctly using HarfBuzz
* Removed the offensive wrapText hacks and added some optimizations
Also changed the three dots to an actual ellipsis Unicode character when abbreviating text
* Reverted a change in TextComponent as it caused unforeseen issues
* Changed Font::shapeText() to pass the segments vector by reference
* Removed a temporary member variable in Font and replaced it with proper argument passing
* Fixed a regression where text shaping stopped working
* Added sharing of glyph atlas entries between shaped glyph entries that need the same texture
* Added support for the ar_EG locale
* Some font-related code and comments cleanup
* Fixed a source file header typo
* Documentation update
* Removed a lot of unnecessary text processing
* Added the ICU library as a dependency
* (Android) Added the ICU library as a dependency
* (macOS) Added the ICU library as a dependency
* (Windows) Added the ICU library as a dependency
* (Windows) Fixed an MSVC compiler warning
* Replaced all built-in Unicode case conversion logic and lookup tables with facilities from the ICU library
* Documentation update
* Updated the pl_PL translations
* Added a menu title font size adjustment for the pl_PL translations
* Removed support for NetBSD and OpenBSD
* Changed a code comment that referred to BSD Unix
* Documentation update
* Silenced some Clang compiler warnings
* Added experimental support for building on Haiku
* (Haiku) Added a ScreenScraper platform identifier
* (Haiku) Added support for the Sony PlayStation Portable (psp) game system
* (Haiku) Added support for the ScummVM Game Engine (scummvm) game system
* Documentation update
* Updated the pl_PL translations
* Changed ScreenSaver to use TextComponent instead of using Font facilities directly
* Changed Window to use TextComponent instead of using Font facilities directly
* Changed ButtonComponent to use TextComponent instead of using Font facilities directly
* Changed SliderComponent to use TextComponent instead of using Font facilities directly
* Reverted ButtonComponent and SliderComponent to render the debug overlays themselves
* Changed DateTimeEditComponent to use TextComponent instead of using Font facilities directly
* Minor code cleanup
* Changed TextEditComponent to use TextComponent instead of using Font facilities directly
* Changed Font::buildTextCache() and Font::renderTextCache() to protected functions
* Changed a compiler silencing option to only apply to Clang
* (Haiku) Updated CMake configuration to make ES-DE build on Haiku Nightly (but no longer on R1/beta4)
* Documentation update
* (Haiku) Added find rule configuration for RetroArch
Also added a single core for testing purposes
* Removed direct use of Font::wrapText() from OptionListComponent, TextEditComponent and TextListComponent
* Removed direct use of Font::wrapText() from TextComponent
* Fixed an issue where ComponentList could generate elements with negative widths
* Added an assertion to GuiComponent::setSize() to check for negative mSize values
* DateTimeEditComponent no longer renders the debug overlay unless there is a string to display
* (FreeBSD) Added support for building with DEINIT_ON_LAUNCH
* (FreeBSD) Added the man page to the CPack configuration
* (FreeBSD) Added support for rebooting and powering off from inside ES-DE
* (FreeBSD) Added fallback method to locate binary
* Added layout and line wrapping support for shaped text and for mixing of LTR and RTL scripts
* Fixed a special line wrapping scenario where a trailing space should be removed
* (Windows) Fixed some MSVC compiler warnings
* Fixed some Clang compiler warnings
* Fixed an issue where theme names in the theme downloader could get abbreviated
* Added support for the ca_AD locale
* Documentation update
* (Android) Fonts and locales are now copied earlier than the other assets as HarfBuzz and libintl need them earlier in the startup process
* Documentation update
* Added support for the de_DE locale
* (Android) Added a new default find rule entry for Flycast as its application ID has been changed
* Documentation update
* Fixed an issue where text shaping could be permanently disabled after editing text
* Fixed a potential issue where globally disabling text shaping could cause space detection to fail
* Added a check for whether a text element has a width defined when the container property is set
* (Android) Changed ePSXe to use %ROM% instead of %ROMSAF%
* (Haiku) Added support for the PDF viewer
* Updated the el_GR.po, es_ES.po, fr_FR.po, it_IT.po, ja_JP.po, ru_RU.po and zh_CN.po locale files
* Documentation update
* (Haiku) Added correct installation directories to the CMake configuration
* (Haiku) Changed to correct installation directories
* (Haiku) Added support for the correct system resource directories
* (Haiku) Made sure es-pdf-convert is found under all circumstances
* Updated the fr_FR translations
* Updated the es_ES translations
* Updated the it_IT translations
* Added a menu title font size adjustment for the it_IT translations
* Updated the ja_JP translations
* Updated the zh_CN translations
* Fixed an issue where scraping using TheGamesDB would crash the application
* Added an extra check in OptionListComponent to avoid potential crashes
* Removed support for the ca_AD locale
* Added a code comment clarification in FileSystemUtil
* Updated the pl_PL translations
* Some minor code modernization in MameNames
* Fixed an issue where returning from a game would sometimes make the helpsystem use the dimmed theme properties
* (Haiku) Added a resource file
* Added a menu title font size adjustment for the de_DE translations
* (Haiku) Added support for some game systems
* (Haiku) Added a HaikuPorts recipe
* (Haiku) Fixed an URI issue in the HaikuPorts recipe
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Updated the it_IT translations
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Added basic configuration support and menu entries for theme localization
* Changed a theme loading debug message
* (linear-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* (modern-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* Updated the it_IT translations
* Added support for using language variables in the theme configuration
* Added localization support to DateTimeComponent
* Added translations for the automatic collection names when used as theme system variables
* Added localization support for the theme game counter
* Added theme contextual hinting to the custom collection summary text in CollectionSystemsManager
Also added translation support for a string that was previously missed
* Added localization support to the label entries in capabilities.xml
* Fixed a regression where horizontal text containers would sometimes not work correctly
* Fixed an issue where text elements defined as gamecount using the systemdata property could not scroll horizontally
* Added support for including theme files from within the colorScheme and fontSize tag pairs
* Added translations for the automatic collection names (short name versions) when used as theme system variables
* Fixed an incorrect code comment in CollectionSystemsManager
* Added translations for the name and fullname systemdata properties for the text element
* Added translation support for the metadata property for the text element
* Updated all locale (.po) files with the theme engine localization additions
* (linear-es-de) Added translations for en_US, en_GB and sv_SE
* Documentation update
* Updated the fr_FR translations
* (linear-es-de) Added translations for fr_FR
* Updated the ja_JP translations
* Updated the zh_CN translations
* (modern-es-de) Added translations for en_US, en_GB, fr_FR and sv_SE
* Updated the es_ES translations
* Updated the ro_RO translations
* (linear-es-de) Added translations for es_ES
* (linear-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for en_US, en_GB and sv_SE
* (linear-es-de) Updated the es_ES translations
* (modern-es-de) Updated the fr_FR translations
* (linear-es-de) Some minor translation changes
* (modern-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for ro_RO
* Updated the it_IT translations
* Updated the pt_BR translations
* (linear-es-de) Added translations for it_IT
* (modern-es-de) Decreased the helpsystem entry spacing
* (modern-es-de) Added translations for es_ES and it_IT
* (slate-es-de) Added translations for es_ES, fr_FR and it_IT
* (linear-es-de) Added translations for pt_BR
* (modern-es-de) Added translations for pt_BR
* (slate-es-de) Added translations for pt_BR
* (Haiku) Added support for the c64, plus4 and vic20 systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Updated SDL to 2.30.6 on Android, Windows, macOS and the Linux AppImage builds
* Added an ICU filter configuration file
* (macOS) Reduced the ICU library size via a data filter file
* (Windows) Reduced the ICU library size via a data filter file
* Updated the ru_RU translations
* (linear-es-de) Added translations for ru_RU
* (modern-es-de) Added translations for ru_RU
* (slate-es-de) Added translations for ru_RU
* Added a menu title font size adjustment for the ru_RU translations
* Removed an unnecessary element resize in ScrollableContainer
* Fixed a line breaking issue
* Added theme engine translations for 'unknown' metadata values for developer, publisher, genre and players
* Added theme engine translations for 'never' and 'unknown' date values
* (linear-es-de) Added translations for ja_JP and zh_CN
* (modern-es-de) Added translations for ja_JP and zh_CN
* (slate-es-de) Added translations for ja_JP and zh_CN
* Updated all locales with new theme engine translations
* Fixed an issue where the text element defaultValue property no longer worked correctly
* (modern-es-de) Added some capitalized default metadata values
* Documentation update
* pdated the el_GR translations
* (linear-es-de) Updated the system metadata
* (linear-es-de) Added sv_SE translations for all system hardware types
* Updated the de_DE translations
* Updated the pl_PL translations
* Bundled the July 2024 release of the Mozilla TLS/SSL certificates
* Updated the MAME index files to include ROMs up to MAME version 0.269
* (linear-es-de) Added translations for pl_PL
* Added the VirtualXT RetroArch core as an alternative emulator for the dos and pc systems
* Added the Stella 2023 RetroArch core as an alternative emulator for the atari2600 system
* Removed support for the ar_EG, de_DE, el_GR and nl_NL locales and moved their .po files to an archive directory
* Documentation update
* (modern-es-de) Added translations for pl_PL
* (slate-es-de) Added translations for pl_PL
* Updated SDL to 2.30.7 on Android, Windows, macOS and the Linux AppImage builds
* Updated the fr_FR translations
* Added support for the new Lime3DS binary names on Linux, macOS and Windows
* Added some missing find rules for Lime3DS
* (Windows) Added 'Shortcut' as an alternative emulator for the switch system
Also added the .lnk file extension
* Added jgenesis as an alternative emulator for the famicom, gamegear, gb, gbc, genesis, mastersystem, megacd, megacdjp, megadrive, megadrivejp, nes, segacd, sfc, snes and snesna systems on Linux and Windows
* Documentation update
* Added izapple2 standalone as an alternative emulator for the apple2 system on Linux and Windows
* (Android) Added support for the Microsoft Windows (windows) game system using the Winlator emulator
* (Android) Added Winlator PRoot Cmod standalone as an alternative emulator for the windows system
* Documentation update
* (Android) Added support for the PC Arcade Systems (pcarcade) and Taito Type X (type-x) game systems
* Bumped the version to 3.1.0
* (modern-es-de) Eliminated an annoying debug message
* (linear-es-de) Added some missing metadata files
* (linear-es-de) Added some missing sv_SE translations
* Updated the Winlator emulator names
* Documentation update
* Documentation update for the 3.1.0 release
* Updated latest_release.json for the 3.1.0 release
* Fixed a typo in the changelog
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Bumped the version to 3.1.1-alpha
* Video player resources are now completely freed up after finishing view transitions
* Changed a rounding in ScrollableContainer to slightly decrease the risk of glyphs getting cut off at the bottom of the container
* Added the Nanum Square Neo Korean font
* Added support for the ko_KR locale
* Fixed an issue where newly entered ScreenScraper username and password values were positioned incorrectly vertically in the account settings menu
* Documentation update
* Changed the position of the ko_KR language
* Changed the ja_JP position in the languages file
* Fixed an issue where attempting to view media for a game that had no downloaded media paused the playback of all static theme videos
* Documentation update
* Added support for the de_DE locale
* Updated the fr_FR translations
* Documentation update
* Updated the de_DE translations
---------
Co-authored-by: Leon Styhre <leon@leonstyhre.com>
2024-09-18 00:23:26 +00:00
|
|
|
|
LOG(LogWarning)
|
|
|
|
|
<< "ScreenScraperRequest::processGame(): Invalid server response, missing "
|
|
|
|
|
"\"niveau\" tag";
|
2020-11-14 14:30:49 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
feat/update 3.1.0 (#7)
* Added initial text shaping support
* Fixed some font issues
* (Windows) Added initial text shaping support
* (macOS) Added initial text shaping support
* Disabled building of HarfBuzz-subset on Windows and macOS
* (Android) Added initial text shaping support
* Added the nl_NL locale to locale/languages
* Changed the font VRAM usage calculation to actually only include texture data
* Moved the HarfBuzz segment building to a separate function
Also implemented segment caching and fixed an issue where missing glyphs were not handled correctly
* Moved the text shaping to a separate function
* Fixed a text shaping issue when there was a font change for the last character of a string
* Added support for the pl_PL locale
* Changed two font calculation functions to use shaped text
Also consolidated the HarfBuzz segment creation and shaping into a single function
* Added a hack to make shaped text wrap somehow correctly
* Changed the text shaping function to return the segment vector
* Text shaping segments are no longer created by space characters
* RTL text segments are now flagged as such
* Fixed an issue where text was not correctly centered after line breaks
* Reverted some font changes that were not needed after all
* Changed to having HarfBuzz set the horizontal glyph advance
* Fixed another failure mode for the wrapText shaped text hack
* Added a precaution to prevent crashes in case of broken fonts being used
* Made accurate text layout work correctly using HarfBuzz
* Removed the offensive wrapText hacks and added some optimizations
Also changed the three dots to an actual ellipsis Unicode character when abbreviating text
* Reverted a change in TextComponent as it caused unforeseen issues
* Changed Font::shapeText() to pass the segments vector by reference
* Removed a temporary member variable in Font and replaced it with proper argument passing
* Fixed a regression where text shaping stopped working
* Added sharing of glyph atlas entries between shaped glyph entries that need the same texture
* Added support for the ar_EG locale
* Some font-related code and comments cleanup
* Fixed a source file header typo
* Documentation update
* Removed a lot of unnecessary text processing
* Added the ICU library as a dependency
* (Android) Added the ICU library as a dependency
* (macOS) Added the ICU library as a dependency
* (Windows) Added the ICU library as a dependency
* (Windows) Fixed an MSVC compiler warning
* Replaced all built-in Unicode case conversion logic and lookup tables with facilities from the ICU library
* Documentation update
* Updated the pl_PL translations
* Added a menu title font size adjustment for the pl_PL translations
* Removed support for NetBSD and OpenBSD
* Changed a code comment that referred to BSD Unix
* Documentation update
* Silenced some Clang compiler warnings
* Added experimental support for building on Haiku
* (Haiku) Added a ScreenScraper platform identifier
* (Haiku) Added support for the Sony PlayStation Portable (psp) game system
* (Haiku) Added support for the ScummVM Game Engine (scummvm) game system
* Documentation update
* Updated the pl_PL translations
* Changed ScreenSaver to use TextComponent instead of using Font facilities directly
* Changed Window to use TextComponent instead of using Font facilities directly
* Changed ButtonComponent to use TextComponent instead of using Font facilities directly
* Changed SliderComponent to use TextComponent instead of using Font facilities directly
* Reverted ButtonComponent and SliderComponent to render the debug overlays themselves
* Changed DateTimeEditComponent to use TextComponent instead of using Font facilities directly
* Minor code cleanup
* Changed TextEditComponent to use TextComponent instead of using Font facilities directly
* Changed Font::buildTextCache() and Font::renderTextCache() to protected functions
* Changed a compiler silencing option to only apply to Clang
* (Haiku) Updated CMake configuration to make ES-DE build on Haiku Nightly (but no longer on R1/beta4)
* Documentation update
* (Haiku) Added find rule configuration for RetroArch
Also added a single core for testing purposes
* Removed direct use of Font::wrapText() from OptionListComponent, TextEditComponent and TextListComponent
* Removed direct use of Font::wrapText() from TextComponent
* Fixed an issue where ComponentList could generate elements with negative widths
* Added an assertion to GuiComponent::setSize() to check for negative mSize values
* DateTimeEditComponent no longer renders the debug overlay unless there is a string to display
* (FreeBSD) Added support for building with DEINIT_ON_LAUNCH
* (FreeBSD) Added the man page to the CPack configuration
* (FreeBSD) Added support for rebooting and powering off from inside ES-DE
* (FreeBSD) Added fallback method to locate binary
* Added layout and line wrapping support for shaped text and for mixing of LTR and RTL scripts
* Fixed a special line wrapping scenario where a trailing space should be removed
* (Windows) Fixed some MSVC compiler warnings
* Fixed some Clang compiler warnings
* Fixed an issue where theme names in the theme downloader could get abbreviated
* Added support for the ca_AD locale
* Documentation update
* (Android) Fonts and locales are now copied earlier than the other assets as HarfBuzz and libintl need them earlier in the startup process
* Documentation update
* Added support for the de_DE locale
* (Android) Added a new default find rule entry for Flycast as its application ID has been changed
* Documentation update
* Fixed an issue where text shaping could be permanently disabled after editing text
* Fixed a potential issue where globally disabling text shaping could cause space detection to fail
* Added a check for whether a text element has a width defined when the container property is set
* (Android) Changed ePSXe to use %ROM% instead of %ROMSAF%
* (Haiku) Added support for the PDF viewer
* Updated the el_GR.po, es_ES.po, fr_FR.po, it_IT.po, ja_JP.po, ru_RU.po and zh_CN.po locale files
* Documentation update
* (Haiku) Added correct installation directories to the CMake configuration
* (Haiku) Changed to correct installation directories
* (Haiku) Added support for the correct system resource directories
* (Haiku) Made sure es-pdf-convert is found under all circumstances
* Updated the fr_FR translations
* Updated the es_ES translations
* Updated the it_IT translations
* Added a menu title font size adjustment for the it_IT translations
* Updated the ja_JP translations
* Updated the zh_CN translations
* Fixed an issue where scraping using TheGamesDB would crash the application
* Added an extra check in OptionListComponent to avoid potential crashes
* Removed support for the ca_AD locale
* Added a code comment clarification in FileSystemUtil
* Updated the pl_PL translations
* Some minor code modernization in MameNames
* Fixed an issue where returning from a game would sometimes make the helpsystem use the dimmed theme properties
* (Haiku) Added a resource file
* Added a menu title font size adjustment for the de_DE translations
* (Haiku) Added support for some game systems
* (Haiku) Added a HaikuPorts recipe
* (Haiku) Fixed an URI issue in the HaikuPorts recipe
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Updated the it_IT translations
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Added configuration for a number of game systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Added basic configuration support and menu entries for theme localization
* Changed a theme loading debug message
* (linear-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* (modern-es-de) Fixed an issue where the system logo for saturnjp was incorrectly showing the western variant
* Updated the it_IT translations
* Added support for using language variables in the theme configuration
* Added localization support to DateTimeComponent
* Added translations for the automatic collection names when used as theme system variables
* Added localization support for the theme game counter
* Added theme contextual hinting to the custom collection summary text in CollectionSystemsManager
Also added translation support for a string that was previously missed
* Added localization support to the label entries in capabilities.xml
* Fixed a regression where horizontal text containers would sometimes not work correctly
* Fixed an issue where text elements defined as gamecount using the systemdata property could not scroll horizontally
* Added support for including theme files from within the colorScheme and fontSize tag pairs
* Added translations for the automatic collection names (short name versions) when used as theme system variables
* Fixed an incorrect code comment in CollectionSystemsManager
* Added translations for the name and fullname systemdata properties for the text element
* Added translation support for the metadata property for the text element
* Updated all locale (.po) files with the theme engine localization additions
* (linear-es-de) Added translations for en_US, en_GB and sv_SE
* Documentation update
* Updated the fr_FR translations
* (linear-es-de) Added translations for fr_FR
* Updated the ja_JP translations
* Updated the zh_CN translations
* (modern-es-de) Added translations for en_US, en_GB, fr_FR and sv_SE
* Updated the es_ES translations
* Updated the ro_RO translations
* (linear-es-de) Added translations for es_ES
* (linear-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for en_US, en_GB and sv_SE
* (linear-es-de) Updated the es_ES translations
* (modern-es-de) Updated the fr_FR translations
* (linear-es-de) Some minor translation changes
* (modern-es-de) Added translations for ro_RO
* (slate-es-de) Added translations for ro_RO
* Updated the it_IT translations
* Updated the pt_BR translations
* (linear-es-de) Added translations for it_IT
* (modern-es-de) Decreased the helpsystem entry spacing
* (modern-es-de) Added translations for es_ES and it_IT
* (slate-es-de) Added translations for es_ES, fr_FR and it_IT
* (linear-es-de) Added translations for pt_BR
* (modern-es-de) Added translations for pt_BR
* (slate-es-de) Added translations for pt_BR
* (Haiku) Added support for the c64, plus4 and vic20 systems
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Updated SDL to 2.30.6 on Android, Windows, macOS and the Linux AppImage builds
* Added an ICU filter configuration file
* (macOS) Reduced the ICU library size via a data filter file
* (Windows) Reduced the ICU library size via a data filter file
* Updated the ru_RU translations
* (linear-es-de) Added translations for ru_RU
* (modern-es-de) Added translations for ru_RU
* (slate-es-de) Added translations for ru_RU
* Added a menu title font size adjustment for the ru_RU translations
* Removed an unnecessary element resize in ScrollableContainer
* Fixed a line breaking issue
* Added theme engine translations for 'unknown' metadata values for developer, publisher, genre and players
* Added theme engine translations for 'never' and 'unknown' date values
* (linear-es-de) Added translations for ja_JP and zh_CN
* (modern-es-de) Added translations for ja_JP and zh_CN
* (slate-es-de) Added translations for ja_JP and zh_CN
* Updated all locales with new theme engine translations
* Fixed an issue where the text element defaultValue property no longer worked correctly
* (modern-es-de) Added some capitalized default metadata values
* Documentation update
* pdated the el_GR translations
* (linear-es-de) Updated the system metadata
* (linear-es-de) Added sv_SE translations for all system hardware types
* Updated the de_DE translations
* Updated the pl_PL translations
* Bundled the July 2024 release of the Mozilla TLS/SSL certificates
* Updated the MAME index files to include ROMs up to MAME version 0.269
* (linear-es-de) Added translations for pl_PL
* Added the VirtualXT RetroArch core as an alternative emulator for the dos and pc systems
* Added the Stella 2023 RetroArch core as an alternative emulator for the atari2600 system
* Removed support for the ar_EG, de_DE, el_GR and nl_NL locales and moved their .po files to an archive directory
* Documentation update
* (modern-es-de) Added translations for pl_PL
* (slate-es-de) Added translations for pl_PL
* Updated SDL to 2.30.7 on Android, Windows, macOS and the Linux AppImage builds
* Updated the fr_FR translations
* Added support for the new Lime3DS binary names on Linux, macOS and Windows
* Added some missing find rules for Lime3DS
* (Windows) Added 'Shortcut' as an alternative emulator for the switch system
Also added the .lnk file extension
* Added jgenesis as an alternative emulator for the famicom, gamegear, gb, gbc, genesis, mastersystem, megacd, megacdjp, megadrive, megadrivejp, nes, segacd, sfc, snes and snesna systems on Linux and Windows
* Documentation update
* Added izapple2 standalone as an alternative emulator for the apple2 system on Linux and Windows
* (Android) Added support for the Microsoft Windows (windows) game system using the Winlator emulator
* (Android) Added Winlator PRoot Cmod standalone as an alternative emulator for the windows system
* Documentation update
* (Android) Added support for the PC Arcade Systems (pcarcade) and Taito Type X (type-x) game systems
* Bumped the version to 3.1.0
* (modern-es-de) Eliminated an annoying debug message
* (linear-es-de) Added some missing metadata files
* (linear-es-de) Added some missing sv_SE translations
* Updated the Winlator emulator names
* Documentation update
* Documentation update for the 3.1.0 release
* Updated latest_release.json for the 3.1.0 release
* Fixed a typo in the changelog
* Documentation update
* (Haiku) Updated the srcGitRev value in the HaikuPorts recipe
* Bumped the version to 3.1.1-alpha
* Video player resources are now completely freed up after finishing view transitions
* Changed a rounding in ScrollableContainer to slightly decrease the risk of glyphs getting cut off at the bottom of the container
* Added the Nanum Square Neo Korean font
* Added support for the ko_KR locale
* Fixed an issue where newly entered ScreenScraper username and password values were positioned incorrectly vertically in the account settings menu
* Documentation update
* Changed the position of the ko_KR language
* Changed the ja_JP position in the languages file
* Fixed an issue where attempting to view media for a game that had no downloaded media paused the playback of all static theme videos
* Documentation update
* Added support for the de_DE locale
* Updated the fr_FR translations
* Documentation update
* Updated the de_DE translations
---------
Co-authored-by: Leon Styhre <leon@leonstyhre.com>
2024-09-18 00:23:26 +00:00
|
|
|
|
else {
|
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Scraping without a user account";
|
|
|
|
|
}
|
2020-11-14 14:30:49 +00:00
|
|
|
|
|
|
|
|
|
// Find how many more requests we can make before the scraper request
|
|
|
|
|
// allowance counter is reset. For some strange reason the ssuser information
|
|
|
|
|
// is not provided for all games even though the request looks identical apart
|
|
|
|
|
// from the game name.
|
2023-01-22 12:09:41 +00:00
|
|
|
|
unsigned requestsToday {data.child("ssuser").child("requeststoday").text().as_uint()};
|
|
|
|
|
unsigned maxRequestsPerDay {data.child("ssuser").child("maxrequestsperday").text().as_uint()};
|
|
|
|
|
unsigned int scraperRequestAllowance {maxRequestsPerDay - requestsToday};
|
2020-11-14 14:30:49 +00:00
|
|
|
|
|
|
|
|
|
// Scraping allowance.
|
|
|
|
|
if (maxRequestsPerDay > 0) {
|
2021-07-07 18:03:42 +00:00
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Daily scraping allowance: "
|
|
|
|
|
<< requestsToday << "/" << maxRequestsPerDay << " ("
|
|
|
|
|
<< scraperRequestAllowance << " remaining)";
|
2020-11-14 14:30:49 +00:00
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Daily scraping allowance: "
|
2021-07-07 18:03:42 +00:00
|
|
|
|
"No statistics were provided with the response";
|
2020-11-14 14:30:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (data.child("jeux"))
|
2021-07-07 18:03:42 +00:00
|
|
|
|
data = data.child("jeux");
|
2020-11-14 14:30:49 +00:00
|
|
|
|
|
2023-01-22 12:09:41 +00:00
|
|
|
|
for (pugi::xml_node game {data.child("jeu")}; game; game = game.next_sibling("jeu")) {
|
2020-06-21 12:25:28 +00:00
|
|
|
|
ScraperSearchResult result;
|
|
|
|
|
ScreenScraperRequest::ScreenScraperConfig ssConfig;
|
|
|
|
|
|
2020-11-14 14:30:49 +00:00
|
|
|
|
result.scraperRequestAllowance = scraperRequestAllowance;
|
2020-06-21 12:25:28 +00:00
|
|
|
|
result.gameID = game.attribute("id").as_string();
|
|
|
|
|
|
2023-01-22 12:09:41 +00:00
|
|
|
|
std::string region {
|
|
|
|
|
Utils::String::toLower(Settings::getInstance()->getString("ScraperRegion"))};
|
|
|
|
|
std::string language {
|
|
|
|
|
Utils::String::toLower(Settings::getInstance()->getString("ScraperLanguage"))};
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
2020-08-05 20:38:44 +00:00
|
|
|
|
// Name fallback: US, WOR(LD). (Xpath: Data/jeu[0]/noms/nom[*]).
|
2023-01-22 12:09:41 +00:00
|
|
|
|
std::string gameName {find_child_by_attribute_list(game.child("noms"), "nom", "region",
|
|
|
|
|
{region, "wor", "us", "ss", "eu", "jp"})
|
|
|
|
|
.text()
|
|
|
|
|
.get()};
|
2023-09-09 07:48:56 +00:00
|
|
|
|
|
|
|
|
|
// Translate some HTML character codes to UTF-8 characters for the game name.
|
|
|
|
|
gameName = Utils::String::replace(gameName, " ", " ");
|
2023-01-30 18:41:24 +00:00
|
|
|
|
gameName = Utils::String::replace(gameName, "&", "&");
|
2024-02-07 21:19:06 +00:00
|
|
|
|
gameName = Utils::String::replace(gameName, "'", "‘");
|
2023-09-09 07:48:56 +00:00
|
|
|
|
|
2023-01-22 12:09:41 +00:00
|
|
|
|
// In some very rare cases game names contain newline characters that we need to remove.
|
|
|
|
|
result.mdl.set("name", Utils::String::replace(gameName, "\n", ""));
|
2020-08-02 12:19:51 +00:00
|
|
|
|
|
2023-09-09 07:48:56 +00:00
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Name: " << result.mdl.get("name");
|
2023-08-03 20:28:13 +00:00
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Game ID: " << result.gameID;
|
|
|
|
|
|
2023-08-04 15:56:50 +00:00
|
|
|
|
pugi::xml_node system {game.child("systeme")};
|
|
|
|
|
int platformID {system.attribute("id").as_int()};
|
|
|
|
|
int parentPlatformID {system.attribute("parentid").as_int()};
|
|
|
|
|
|
|
|
|
|
// Platform IDs.
|
|
|
|
|
for (auto& platform : screenscraper_platformid_map) {
|
|
|
|
|
if (platform.second == platformID || platform.second == parentPlatformID)
|
|
|
|
|
result.platformIDs.emplace_back(platform.first);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (result.platformIDs.empty())
|
|
|
|
|
result.platformIDs.emplace_back(PlatformId::PLATFORM_UNKNOWN);
|
|
|
|
|
|
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Platform ID: " << platformID;
|
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Parent platform ID: "
|
2023-10-10 15:16:55 +00:00
|
|
|
|
<< (parentPlatformID == 0 ? "n/a" : std::to_string(parentPlatformID));
|
2023-08-04 15:56:50 +00:00
|
|
|
|
|
2020-08-02 12:19:51 +00:00
|
|
|
|
// Validate rating.
|
2020-12-16 18:03:05 +00:00
|
|
|
|
// Process the rating even if the setting to scrape ratings has been disabled.
|
|
|
|
|
// This is required so that the rating can still be shown in the scraper GUI.
|
|
|
|
|
// GuiScraperSearch::saveMetadata() will take care of skipping the rating saving
|
|
|
|
|
// if this option has been set as such.
|
|
|
|
|
if (game.child("note")) {
|
2023-01-22 12:09:41 +00:00
|
|
|
|
float ratingVal {game.child("note").text().as_float() / 20.0f};
|
2020-08-02 12:19:51 +00:00
|
|
|
|
// Round up to the closest .1 value, i.e. to the closest half-star.
|
2020-12-29 11:54:24 +00:00
|
|
|
|
ratingVal = ceilf(ratingVal / 0.1f) / 10;
|
2020-08-02 12:19:51 +00:00
|
|
|
|
std::stringstream ss;
|
|
|
|
|
ss << ratingVal;
|
|
|
|
|
if (ratingVal > 0) {
|
|
|
|
|
result.mdl.set("rating", ss.str());
|
2021-07-07 18:03:42 +00:00
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Rating: "
|
|
|
|
|
<< result.mdl.get("rating");
|
2020-08-02 12:19:51 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
|
|
|
|
// Description fallback language: EN, WOR(LD).
|
2023-01-22 12:09:41 +00:00
|
|
|
|
std::string description {find_child_by_attribute_list(game.child("synopsis"), "synopsis",
|
|
|
|
|
"langue", {language, "en", "wor"})
|
|
|
|
|
.text()
|
|
|
|
|
.get()};
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
2023-09-09 07:48:56 +00:00
|
|
|
|
// Translate some HTML character codes to UTF-8 characters for the description.
|
|
|
|
|
// This does not capture all such characters in the ScreenScraper database but these
|
|
|
|
|
// are the most common ones.
|
2021-03-22 19:32:54 +00:00
|
|
|
|
if (!description.empty()) {
|
2023-09-09 07:48:56 +00:00
|
|
|
|
description = Utils::String::replace(description, " ", " ");
|
|
|
|
|
description = Utils::String::replace(description, """, "\"");
|
|
|
|
|
description = Utils::String::replace(description, "©", "©");
|
|
|
|
|
description = Utils::String::replace(description, "'", "'");
|
2024-02-07 21:19:06 +00:00
|
|
|
|
description = Utils::String::replace(description, "'", "'");
|
2023-09-09 07:48:56 +00:00
|
|
|
|
result.mdl.set("desc", description);
|
2021-03-22 19:32:54 +00:00
|
|
|
|
}
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
|
|
|
|
// Get the date proper. The API returns multiple 'date' children nodes to the 'dates'
|
2021-07-07 18:03:42 +00:00
|
|
|
|
// main child of 'jeu'. Date fallback: WOR(LD), US, SS, JP, EU.
|
2023-01-22 12:09:41 +00:00
|
|
|
|
std::string date {find_child_by_attribute_list(game.child("dates"), "date", "region",
|
|
|
|
|
{region, "wor", "us", "ss", "jp", "eu"})
|
|
|
|
|
.text()
|
|
|
|
|
.get()};
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
|
|
|
|
// Date can be YYYY-MM-DD or just YYYY.
|
2023-01-22 12:09:41 +00:00
|
|
|
|
if (date.length() > 4) {
|
2021-07-07 18:03:42 +00:00
|
|
|
|
result.mdl.set("releasedate",
|
2023-01-22 12:09:41 +00:00
|
|
|
|
Utils::Time::DateTime(Utils::Time::stringToTime(date, "%Y-%m-%d")));
|
2020-06-21 12:25:28 +00:00
|
|
|
|
}
|
2023-01-22 12:09:41 +00:00
|
|
|
|
else if (date.length() > 0) {
|
2021-07-07 18:03:42 +00:00
|
|
|
|
result.mdl.set("releasedate",
|
2023-01-22 12:09:41 +00:00
|
|
|
|
Utils::Time::DateTime(Utils::Time::stringToTime(date, "%Y")));
|
2020-06-21 12:25:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-22 12:09:41 +00:00
|
|
|
|
if (date.length() > 0) {
|
2021-07-07 18:03:42 +00:00
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Release Date (unparsed): "
|
2023-01-22 12:09:41 +00:00
|
|
|
|
<< date;
|
2021-07-07 18:03:42 +00:00
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Release Date (parsed): "
|
|
|
|
|
<< result.mdl.get("releasedate");
|
2020-08-02 12:19:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-11-14 14:30:49 +00:00
|
|
|
|
// Developer for the game (Xpath: Data/jeu[0]/developpeur).
|
2023-01-22 12:09:41 +00:00
|
|
|
|
std::string developer {game.child("developpeur").text().get()};
|
2020-08-02 12:19:51 +00:00
|
|
|
|
if (!developer.empty()) {
|
2020-06-21 12:25:28 +00:00
|
|
|
|
result.mdl.set("developer", Utils::String::replace(developer, " ", " "));
|
2021-07-07 18:03:42 +00:00
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Developer: "
|
|
|
|
|
<< result.mdl.get("developer");
|
2020-08-02 12:19:51 +00:00
|
|
|
|
}
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
2020-11-14 14:30:49 +00:00
|
|
|
|
// Publisher for the game (Xpath: Data/jeu[0]/editeur).
|
2023-01-22 12:09:41 +00:00
|
|
|
|
std::string publisher {game.child("editeur").text().get()};
|
2020-08-02 12:19:51 +00:00
|
|
|
|
if (!publisher.empty()) {
|
2020-06-21 12:25:28 +00:00
|
|
|
|
result.mdl.set("publisher", Utils::String::replace(publisher, " ", " "));
|
2021-07-07 18:03:42 +00:00
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Publisher: "
|
|
|
|
|
<< result.mdl.get("publisher");
|
2020-08-02 12:19:51 +00:00
|
|
|
|
}
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
2020-11-14 14:30:49 +00:00
|
|
|
|
// Genre fallback language: EN. (Xpath: Data/jeu[0]/genres/genre[*]).
|
2023-01-22 12:09:41 +00:00
|
|
|
|
std::string genre {
|
2021-08-17 16:41:45 +00:00
|
|
|
|
find_child_by_attribute_list(game.child("genres"), "genre", "langue", {language, "en"})
|
|
|
|
|
.text()
|
2023-01-22 12:09:41 +00:00
|
|
|
|
.get()};
|
2020-08-02 12:19:51 +00:00
|
|
|
|
if (!genre.empty()) {
|
|
|
|
|
result.mdl.set("genre", genre);
|
2021-07-07 18:03:42 +00:00
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Genre: "
|
|
|
|
|
<< result.mdl.get("genre");
|
2020-06-21 12:25:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-02 12:19:51 +00:00
|
|
|
|
// Players.
|
2023-01-22 12:09:41 +00:00
|
|
|
|
std::string players {game.child("joueurs").text().get()};
|
2020-08-02 12:19:51 +00:00
|
|
|
|
if (!players.empty()) {
|
|
|
|
|
result.mdl.set("players", players);
|
2021-07-07 18:03:42 +00:00
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Players: "
|
|
|
|
|
<< result.mdl.get("players");
|
2020-08-02 12:19:51 +00:00
|
|
|
|
}
|
2020-07-08 15:01:47 +00:00
|
|
|
|
|
2022-12-15 17:27:45 +00:00
|
|
|
|
// ScreenScraper controller scraping is currently broken, it's unclear if they will fix it.
|
|
|
|
|
// // Controller (only for the Arcade and SNK Neo Geo systems).
|
|
|
|
|
// if (parentPlatformID == 75 || parentPlatformID == 142) {
|
|
|
|
|
// std::string controller {Utils::String::toLower(game.child("controles").text().get())};
|
|
|
|
|
//
|
|
|
|
|
// LOG(LogError) << controller;
|
|
|
|
|
//
|
|
|
|
|
// if (!controller.empty()) {
|
2023-01-22 12:09:41 +00:00
|
|
|
|
// std::string controllerDescription {"Other"};
|
2022-12-15 17:27:45 +00:00
|
|
|
|
// // Place the steering wheel entry first as some games support both joysticks and
|
|
|
|
|
// // and steering wheels and it's likely more interesting to capture the steering
|
|
|
|
|
// // wheel option in this case.
|
|
|
|
|
// if (controller.find("steering wheel") != std::string::npos ||
|
|
|
|
|
// controller.find("paddle") != std::string::npos ||
|
|
|
|
|
// controller.find("pedal") != std::string::npos) {
|
|
|
|
|
// result.mdl.set("controller", "steering_wheel_generic");
|
|
|
|
|
// controllerDescription = "Steering wheel";
|
|
|
|
|
// }
|
|
|
|
|
// else if (controller.find("control type=\"joy") != std::string::npos ||
|
|
|
|
|
// controller.find("joystick") != std::string::npos) {
|
|
|
|
|
// std::string buttonEntry;
|
|
|
|
|
// std::string buttonCount;
|
|
|
|
|
// if (controller.find("p1numbuttons=") != std::string::npos)
|
|
|
|
|
// buttonEntry = controller.substr(controller.find("p1numbuttons=") + 13, 4);
|
|
|
|
|
// else if (controller.find("buttons=") != std::string::npos)
|
|
|
|
|
// buttonEntry = controller.substr(controller.find("buttons=") + 8, 5);
|
|
|
|
|
//
|
2023-01-22 12:09:41 +00:00
|
|
|
|
// bool foundDigit {false};
|
2022-12-15 17:27:45 +00:00
|
|
|
|
// for (unsigned char character : buttonEntry) {
|
|
|
|
|
// if (std::isdigit(character)) {
|
2023-01-22 12:09:41 +00:00
|
|
|
|
// buttonCount.emplace_back(character);
|
2022-12-15 17:27:45 +00:00
|
|
|
|
// foundDigit = true;
|
|
|
|
|
// }
|
|
|
|
|
// else if (foundDigit == true) {
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// if (buttonCount == "0") {
|
|
|
|
|
// result.mdl.set("controller", "joystick_arcade_no_buttons");
|
|
|
|
|
// controllerDescription = "Joystick (no buttons)";
|
|
|
|
|
// }
|
|
|
|
|
// else if (buttonCount == "1") {
|
|
|
|
|
// result.mdl.set("controller", "joystick_arcade_1_button");
|
|
|
|
|
// controllerDescription = "Joystick (1 button)";
|
|
|
|
|
// }
|
|
|
|
|
// else if (buttonCount == "2") {
|
|
|
|
|
// result.mdl.set("controller", "joystick_arcade_2_buttons");
|
|
|
|
|
// controllerDescription = "Joystick (2 buttons)";
|
|
|
|
|
// }
|
|
|
|
|
// else if (buttonCount == "3") {
|
|
|
|
|
// result.mdl.set("controller", "joystick_arcade_3_buttons");
|
|
|
|
|
// controllerDescription = "Joystick (3 buttons)";
|
|
|
|
|
// }
|
|
|
|
|
// else if (buttonCount == "4") {
|
|
|
|
|
// result.mdl.set("controller", "joystick_arcade_4_buttons");
|
|
|
|
|
// controllerDescription = "Joystick (4 buttons)";
|
|
|
|
|
// }
|
|
|
|
|
// else if (buttonCount == "5") {
|
|
|
|
|
// result.mdl.set("controller", "joystick_arcade_5_buttons");
|
|
|
|
|
// controllerDescription = "Joystick (5 buttons)";
|
|
|
|
|
// }
|
|
|
|
|
// else if (buttonCount == "6") {
|
|
|
|
|
// result.mdl.set("controller", "joystick_arcade_6_buttons");
|
|
|
|
|
// controllerDescription = "Joystick (6 buttons)";
|
|
|
|
|
// }
|
|
|
|
|
// else {
|
|
|
|
|
// controllerDescription = "Joystick (other)";
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// else if (controller.find("spinner") != std::string::npos) {
|
|
|
|
|
// result.mdl.set("controller", "spinner_generic");
|
|
|
|
|
// controllerDescription = "Spinner";
|
|
|
|
|
// }
|
|
|
|
|
// else if (controller.find("trackball") != std::string::npos) {
|
|
|
|
|
// result.mdl.set("controller", "trackball_generic");
|
|
|
|
|
// controllerDescription = "Trackball";
|
|
|
|
|
// }
|
|
|
|
|
// else if (controller.find("gun") != std::string::npos) {
|
|
|
|
|
// result.mdl.set("controller", "lightgun_generic");
|
|
|
|
|
// controllerDescription = "Lightgun";
|
|
|
|
|
// }
|
|
|
|
|
// else if (controller.find("stick") != std::string::npos) {
|
|
|
|
|
// result.mdl.set("controller", "flight_stick_generic");
|
|
|
|
|
// controllerDescription = "Flight stick";
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// LOG(LogDebug) << "ScreenScraperRequest::processGame(): Controller: "
|
|
|
|
|
// << controllerDescription;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
2021-10-27 17:23:57 +00:00
|
|
|
|
|
2023-08-03 20:28:13 +00:00
|
|
|
|
const pugi::xml_node rom {game.child("rom")};
|
|
|
|
|
result.md5Hash = Utils::String::toLower(rom.child("rommd5").text().as_string());
|
|
|
|
|
|
2020-06-21 12:25:28 +00:00
|
|
|
|
// Media super-node.
|
2023-01-22 12:09:41 +00:00
|
|
|
|
pugi::xml_node media_list {game.child("medias")};
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
|
|
|
|
if (media_list) {
|
2021-07-07 18:03:42 +00:00
|
|
|
|
// 3D box.
|
|
|
|
|
processMedia(result, media_list, ssConfig.media_3dbox, result.box3DUrl,
|
|
|
|
|
result.box3DFormat, region);
|
2021-10-28 19:00:23 +00:00
|
|
|
|
// Box back cover.
|
|
|
|
|
processMedia(result, media_list, ssConfig.media_backcover, result.backcoverUrl,
|
|
|
|
|
result.backcoverFormat, region);
|
|
|
|
|
// Box cover.
|
2021-07-07 18:03:42 +00:00
|
|
|
|
processMedia(result, media_list, ssConfig.media_cover, result.coverUrl,
|
|
|
|
|
result.coverFormat, region);
|
2022-01-15 12:16:23 +00:00
|
|
|
|
// Fan art.
|
|
|
|
|
processMedia(result, media_list, ssConfig.media_fanart, result.fanartUrl,
|
|
|
|
|
result.fanartFormat, region);
|
2021-07-07 18:03:42 +00:00
|
|
|
|
// Marquee (wheel).
|
2024-02-08 20:03:06 +00:00
|
|
|
|
// There are two media types for the marquee named "wheel" and "wheel"-hd that should
|
|
|
|
|
// be considered equivalent, i.e. the most closely matching region should be considered
|
|
|
|
|
// across both media types. This is a logical error, but as it's caused by an issue on
|
|
|
|
|
// the server side this workaround is still required.
|
|
|
|
|
int regionPosWheel {0};
|
|
|
|
|
std::string fileURLWheel;
|
|
|
|
|
std::string fileFormatWheel;
|
|
|
|
|
regionPosWheel = processMedia(result, media_list, ssConfig.media_marquee, fileURLWheel,
|
|
|
|
|
fileFormatWheel, region);
|
|
|
|
|
int regionPosWheelHD {0};
|
|
|
|
|
std::string fileURLWheelHD;
|
|
|
|
|
std::string fileFormatWheelHD;
|
|
|
|
|
regionPosWheelHD = processMedia(result, media_list, ssConfig.media_marquee_hd,
|
|
|
|
|
fileURLWheelHD, fileFormatWheelHD, region);
|
|
|
|
|
if ((regionPosWheelHD != 0 && regionPosWheelHD <= regionPosWheel) ||
|
|
|
|
|
regionPosWheel == 0) {
|
|
|
|
|
result.marqueeUrl = fileURLWheelHD;
|
|
|
|
|
result.marqueeFormat = fileFormatWheelHD;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
result.marqueeUrl = fileURLWheel;
|
|
|
|
|
result.marqueeFormat = fileFormatWheel;
|
2022-08-26 16:00:46 +00:00
|
|
|
|
}
|
2021-10-28 19:00:23 +00:00
|
|
|
|
// Physical media.
|
|
|
|
|
processMedia(result, media_list, ssConfig.media_physicalmedia, result.physicalmediaUrl,
|
|
|
|
|
result.physicalmediaFormat, region);
|
2021-07-07 18:03:42 +00:00
|
|
|
|
// Screenshot.
|
|
|
|
|
processMedia(result, media_list, ssConfig.media_screenshot, result.screenshotUrl,
|
|
|
|
|
result.screenshotFormat, region);
|
2021-10-28 19:00:23 +00:00
|
|
|
|
// Title screen.
|
|
|
|
|
processMedia(result, media_list, ssConfig.media_titlescreen, result.titlescreenUrl,
|
|
|
|
|
result.titlescreenFormat, region);
|
2021-07-07 18:03:42 +00:00
|
|
|
|
// Video.
|
|
|
|
|
processMedia(result, media_list, ssConfig.media_video, result.videoUrl,
|
|
|
|
|
result.videoFormat, region);
|
2022-05-01 07:16:15 +00:00
|
|
|
|
// Fallback to normalized video if no regular video was found.
|
|
|
|
|
if (result.videoUrl == "")
|
|
|
|
|
processMedia(result, media_list, ssConfig.media_video_normalized, result.videoUrl,
|
|
|
|
|
result.videoFormat, region);
|
2023-05-08 15:14:52 +00:00
|
|
|
|
// Game manuals.
|
|
|
|
|
processMedia(result, media_list, ssConfig.media_manual, result.manualUrl,
|
|
|
|
|
result.manualFormat, region);
|
2020-06-21 12:25:28 +00:00
|
|
|
|
}
|
|
|
|
|
result.mediaURLFetch = COMPLETED;
|
2023-01-22 12:09:41 +00:00
|
|
|
|
out_results.emplace_back(result);
|
2020-06-21 12:25:28 +00:00
|
|
|
|
} // Game.
|
2020-11-14 14:30:49 +00:00
|
|
|
|
|
|
|
|
|
if (out_results.size() == 0) {
|
2021-01-26 16:28:54 +00:00
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processGame(): No games found";
|
2020-11-14 14:30:49 +00:00
|
|
|
|
}
|
2020-06-06 11:10:33 +00:00
|
|
|
|
}
|
2019-01-11 19:51:05 +00:00
|
|
|
|
|
2024-02-08 20:03:06 +00:00
|
|
|
|
int ScreenScraperRequest::processMedia(ScraperSearchResult& result,
|
|
|
|
|
const pugi::xml_node& media_list,
|
|
|
|
|
std::string& mediaType,
|
|
|
|
|
std::string& fileURL,
|
|
|
|
|
std::string& fileFormat,
|
|
|
|
|
const std::string& region)
|
2020-06-06 11:10:33 +00:00
|
|
|
|
{
|
2022-06-16 17:56:41 +00:00
|
|
|
|
pugi::xml_node art {pugi::xml_node(nullptr)};
|
2024-02-08 20:03:06 +00:00
|
|
|
|
int regionPos {0};
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
|
|
|
|
// Do an XPath query for media[type='$media_type'], then filter by region.
|
|
|
|
|
// We need to do this because any child of 'medias' has the form
|
|
|
|
|
// <media type="..." region="..." format="...">
|
|
|
|
|
// and we need to find the right media for the region.
|
2022-06-16 17:56:41 +00:00
|
|
|
|
pugi::xpath_node_set results {media_list.select_nodes(
|
|
|
|
|
(static_cast<std::string>("media[@type='") + mediaType + "']").c_str())};
|
2021-07-07 18:03:42 +00:00
|
|
|
|
|
|
|
|
|
if (results.size()) {
|
2022-01-15 17:14:11 +00:00
|
|
|
|
// Videos and fan art don't have any region attributes, so just take the first entry
|
2021-07-07 18:03:42 +00:00
|
|
|
|
// (which should be the only entry as well).
|
2022-01-15 17:14:11 +00:00
|
|
|
|
if (mediaType == "video" || mediaType == "video-normalized" || mediaType == "fanart") {
|
2021-07-07 18:03:42 +00:00
|
|
|
|
art = results.first().node();
|
|
|
|
|
}
|
|
|
|
|
else {
|
2022-06-16 17:56:41 +00:00
|
|
|
|
std::string otherRegion;
|
|
|
|
|
if (Settings::getInstance()->getBool("ScraperRegionFallback")) {
|
|
|
|
|
// In case none of the regular fallback regions are found, try whatever is the
|
|
|
|
|
// first region in the returned results. This should capture games only released
|
|
|
|
|
// for specific countries and such as well as invalid database entries where the
|
|
|
|
|
// wrong region was defined. This fallback also includes the ss/ScreenScraper
|
|
|
|
|
// region which adds media for unofficial games (e.g. for OpenBOR and PICO-8).
|
|
|
|
|
otherRegion = results.first().node().attribute("region").as_string();
|
|
|
|
|
}
|
|
|
|
|
// Region fallback: world, USA, Japan, EU and custom.
|
|
|
|
|
for (auto regionEntry :
|
|
|
|
|
std::vector<std::string> {region, "wor", "us", "jp", "eu", "cus", otherRegion}) {
|
2021-07-07 18:03:42 +00:00
|
|
|
|
if (art)
|
|
|
|
|
break;
|
|
|
|
|
|
2024-02-08 20:03:06 +00:00
|
|
|
|
++regionPos;
|
|
|
|
|
|
2021-07-07 18:03:42 +00:00
|
|
|
|
for (auto node : results) {
|
2022-06-16 17:56:41 +00:00
|
|
|
|
if (node.node().attribute("region").value() == regionEntry) {
|
2021-07-07 18:03:42 +00:00
|
|
|
|
art = node.node();
|
2020-06-21 12:25:28 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-07-07 18:03:42 +00:00
|
|
|
|
}
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
2021-07-07 18:03:42 +00:00
|
|
|
|
if (art) {
|
|
|
|
|
// Sending a 'softname' containing space will make the media URLs returned
|
|
|
|
|
// by the API also contain the space. Escape any spaces in the URL here.
|
|
|
|
|
fileURL = Utils::String::replace(art.text().get(), " ", "%20");
|
2020-06-21 12:25:28 +00:00
|
|
|
|
|
2021-07-07 18:03:42 +00:00
|
|
|
|
// Get the media type returned by ScreenScraper.
|
2023-01-22 12:09:41 +00:00
|
|
|
|
std::string media_type {art.attribute("format").value()};
|
2021-07-07 18:03:42 +00:00
|
|
|
|
if (!media_type.empty())
|
|
|
|
|
fileFormat = "." + media_type;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
LOG(LogDebug) << "ScreenScraperRequest::processMedia(): "
|
2023-05-11 17:30:21 +00:00
|
|
|
|
"Failed to find media XML node with name \""
|
|
|
|
|
<< mediaType << "\"";
|
2021-07-07 18:03:42 +00:00
|
|
|
|
}
|
2022-08-26 16:00:46 +00:00
|
|
|
|
|
2024-02-08 20:03:06 +00:00
|
|
|
|
return regionPos;
|
2019-01-11 19:51:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-08-03 18:48:54 +00:00
|
|
|
|
std::string ScreenScraperRequest::ScreenScraperConfig::getGameSearchUrl(const std::string& gameName,
|
|
|
|
|
const std::string& md5Hash,
|
|
|
|
|
const long fileSize) const
|
2019-01-11 19:51:05 +00:00
|
|
|
|
{
|
2023-08-03 18:48:54 +00:00
|
|
|
|
if (md5Hash != "") {
|
|
|
|
|
LOG(LogDebug)
|
2023-08-04 15:56:50 +00:00
|
|
|
|
<< "ScreenScraperRequest::getGameSearchUrl(): Performing MD5 file hash search "
|
|
|
|
|
"using digest \""
|
2023-08-03 18:48:54 +00:00
|
|
|
|
<< md5Hash << "\"";
|
2020-06-25 17:52:38 +00:00
|
|
|
|
}
|
2023-08-04 15:56:50 +00:00
|
|
|
|
else if (md5Hash == "" && Settings::getInstance()->getBool("ScraperSearchFileHash") &&
|
|
|
|
|
fileSize >
|
|
|
|
|
Settings::getInstance()->getInt("ScraperSearchFileHashMaxSize") * 1024 * 1024) {
|
|
|
|
|
LOG(LogDebug)
|
|
|
|
|
<< "ScreenScraperRequest::getGameSearchUrl(): Skipping MD5 file hash search as game "
|
|
|
|
|
"file is larger than size limit of "
|
|
|
|
|
<< Settings::getInstance()->getInt("ScraperSearchFileHashMaxSize") << " MiB";
|
|
|
|
|
}
|
2019-01-11 19:51:05 +00:00
|
|
|
|
|
2022-09-20 20:45:32 +00:00
|
|
|
|
std::string searchName {gameName};
|
|
|
|
|
bool singleSearch {false};
|
2020-11-14 14:30:49 +00:00
|
|
|
|
|
2021-02-01 18:00:38 +00:00
|
|
|
|
// Trim leading and trailing whitespaces.
|
2021-09-25 16:01:41 +00:00
|
|
|
|
searchName = Utils::String::trim(searchName);
|
2021-02-01 18:00:38 +00:00
|
|
|
|
|
2022-04-09 13:14:48 +00:00
|
|
|
|
if (Settings::getInstance()->getBool("ScraperConvertUnderscores"))
|
|
|
|
|
searchName = Utils::String::replace(searchName, "_", " ");
|
|
|
|
|
|
2021-02-01 18:00:38 +00:00
|
|
|
|
// If only whitespaces were entered as the search string, then search using a random string
|
|
|
|
|
// that will not return any results. This is a quick and dirty way to avoid french error
|
|
|
|
|
// messages about malformed URLs that would surely confuse the user.
|
|
|
|
|
if (searchName == "")
|
|
|
|
|
searchName = "zzzzzz";
|
|
|
|
|
|
2021-01-08 19:34:11 +00:00
|
|
|
|
// If the game is an arcade game and we're not searching using the metadata name, then
|
|
|
|
|
// search using the individual ROM name rather than running a wider text matching search.
|
|
|
|
|
// Also run this search mode if the game name is shorter than four characters, as
|
|
|
|
|
// screenscraper.fr will otherwise throw an error that the necessary search parameters
|
|
|
|
|
// were not provided with the search. Possibly this is because a search using less than
|
|
|
|
|
// four characters would return too many results. But there are some games with really
|
|
|
|
|
// short names, so it's annoying that they can't be searched using this method.
|
2021-01-26 16:31:27 +00:00
|
|
|
|
if (isArcadeSystem && !Settings::getInstance()->getBool("ScraperSearchMetadataName")) {
|
|
|
|
|
singleSearch = true;
|
|
|
|
|
}
|
2021-02-01 18:00:38 +00:00
|
|
|
|
else if (searchName.size() < 4) {
|
2021-01-26 16:31:27 +00:00
|
|
|
|
singleSearch = true;
|
|
|
|
|
}
|
2021-02-01 18:00:38 +00:00
|
|
|
|
else if (searchName.back() == '+') {
|
2021-01-26 16:31:27 +00:00
|
|
|
|
// Special case where ScreenScraper will apparently strip trailing plus characters
|
|
|
|
|
// from the search strings, and if we don't handle this we could end up with less
|
|
|
|
|
// than four characters which would break the wide search.
|
2023-01-22 12:09:41 +00:00
|
|
|
|
std::string trimTrailingPluses {searchName};
|
2021-02-01 18:00:38 +00:00
|
|
|
|
trimTrailingPluses.erase(std::find_if(trimTrailingPluses.rbegin(),
|
2021-07-07 18:03:42 +00:00
|
|
|
|
trimTrailingPluses.rend(),
|
|
|
|
|
[](char c) { return c != '+'; })
|
|
|
|
|
.base(),
|
|
|
|
|
trimTrailingPluses.end());
|
2021-02-01 18:00:38 +00:00
|
|
|
|
|
2021-01-26 16:31:27 +00:00
|
|
|
|
if (trimTrailingPluses.size() < 4)
|
|
|
|
|
singleSearch = true;
|
|
|
|
|
}
|
2021-02-01 18:00:38 +00:00
|
|
|
|
// Another issue is that ScreenScraper removes the word "the" from the search string, which
|
|
|
|
|
// could also lead to an error for short game names.
|
|
|
|
|
if (!singleSearch) {
|
2022-09-20 20:45:32 +00:00
|
|
|
|
std::string removeThe {
|
|
|
|
|
Utils::String::replace(Utils::String::toUpper(searchName), "THE ", "")};
|
2021-02-01 18:00:38 +00:00
|
|
|
|
// Any additional spaces must also be removed.
|
|
|
|
|
removeThe.erase(removeThe.begin(),
|
2021-07-07 18:03:42 +00:00
|
|
|
|
std::find_if(removeThe.begin(), removeThe.end(), [](char c) {
|
|
|
|
|
return !std::isspace(static_cast<unsigned char>(c));
|
|
|
|
|
}));
|
2021-02-01 18:00:38 +00:00
|
|
|
|
// If "the" is placed at the end of the search string, ScreenScraper also removes it.
|
|
|
|
|
if (removeThe.size() > 4) {
|
|
|
|
|
if (removeThe.substr(removeThe.size() - 4, 4) == " THE")
|
|
|
|
|
removeThe = removeThe.substr(0, removeThe.size() - 4);
|
|
|
|
|
}
|
|
|
|
|
if (removeThe.size() < 4)
|
|
|
|
|
singleSearch = true;
|
|
|
|
|
}
|
2021-01-26 16:31:27 +00:00
|
|
|
|
|
2023-01-22 12:09:41 +00:00
|
|
|
|
std::string screenScraperURL;
|
|
|
|
|
|
2022-04-05 15:48:47 +00:00
|
|
|
|
if (automaticMode || singleSearch) {
|
2022-09-20 20:45:32 +00:00
|
|
|
|
if (Settings::getInstance()->getBool("ScraperAutomaticRemoveDots"))
|
|
|
|
|
searchName = Utils::String::replace(searchName, ".", "");
|
2023-01-22 12:09:41 +00:00
|
|
|
|
screenScraperURL.append(API_URL_BASE)
|
|
|
|
|
.append("/jeuInfos.php?devid=")
|
|
|
|
|
.append(Utils::String::scramble(API_DEV_U, API_DEV_KEY))
|
|
|
|
|
.append("&devpassword=")
|
|
|
|
|
.append(Utils::String::scramble(API_DEV_P, API_DEV_KEY))
|
|
|
|
|
.append("&softname=")
|
|
|
|
|
.append(HttpReq::urlEncode(API_SOFT_NAME))
|
|
|
|
|
.append("&output=xml")
|
|
|
|
|
.append("&romnom=")
|
|
|
|
|
.append(HttpReq::urlEncode(searchName));
|
2023-08-03 18:48:54 +00:00
|
|
|
|
if (md5Hash != "") {
|
|
|
|
|
screenScraperURL.append("&md5=")
|
|
|
|
|
.append(md5Hash)
|
|
|
|
|
.append("&romtaille=")
|
|
|
|
|
.append(std::to_string(fileSize));
|
|
|
|
|
}
|
2020-11-14 14:30:49 +00:00
|
|
|
|
}
|
|
|
|
|
else {
|
2023-01-22 12:09:41 +00:00
|
|
|
|
screenScraperURL.append(API_URL_BASE)
|
|
|
|
|
.append("/jeuRecherche.php?devid=")
|
|
|
|
|
.append(Utils::String::scramble(API_DEV_U, API_DEV_KEY))
|
|
|
|
|
.append("&devpassword=")
|
|
|
|
|
.append(Utils::String::scramble(API_DEV_P, API_DEV_KEY))
|
|
|
|
|
.append("&softname=")
|
|
|
|
|
.append(HttpReq::urlEncode(API_SOFT_NAME))
|
|
|
|
|
.append("&output=xml")
|
|
|
|
|
.append("&recherche=")
|
|
|
|
|
.append(HttpReq::urlEncode(searchName));
|
2020-11-14 14:30:49 +00:00
|
|
|
|
}
|
2020-11-07 14:34:15 +00:00
|
|
|
|
|
|
|
|
|
// Username / password, if this has been setup and activated.
|
|
|
|
|
if (Settings::getInstance()->getBool("ScraperUseAccountScreenScraper")) {
|
2023-01-22 12:09:41 +00:00
|
|
|
|
const std::string username {
|
|
|
|
|
Settings::getInstance()->getString("ScraperUsernameScreenScraper")};
|
|
|
|
|
const std::string password {
|
|
|
|
|
Settings::getInstance()->getString("ScraperPasswordScreenScraper")};
|
|
|
|
|
if (!username.empty() && !password.empty()) {
|
|
|
|
|
screenScraperURL.append("&ssid=")
|
|
|
|
|
.append(HttpReq::urlEncode(username))
|
|
|
|
|
.append("&sspassword=")
|
|
|
|
|
.append(HttpReq::urlEncode(password));
|
|
|
|
|
}
|
2020-11-07 14:34:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return screenScraperURL;
|
2019-01-11 19:51:05 +00:00
|
|
|
|
}
|