Skip to content

Feat: Add RoMM naming scheme#71

Merged
RikudouSage merged 2 commits intomainfrom
feat/romm-naming-scheme
Mar 27, 2025
Merged

Feat: Add RoMM naming scheme#71
RikudouSage merged 2 commits intomainfrom
feat/romm-naming-scheme

Conversation

@RikudouSage
Copy link
Copy Markdown
Owner

fixes #48

@RikudouSage
Copy link
Copy Markdown
Owner Author

RikudouSage commented Mar 2, 2025

@DynaM1ke Any chance you could check whether it works for you like this?

I don't know how exactly you use GOG Downloader, so here are all the options:

  • Windows setup (you must be logged in to GitHub)
  • PHP binary (you must be logged in to GitHub)
  • Docker image: rikudousage/gog-downloader@sha256:0eca460dda040cce3b803981918640ea58c9ae6dcdc56a28acd5c310add2a3cb

You first need to configure the GOG Downloader with the correct naming scheme:

  • gog-downloader config naming-convention rom-manager

@DynaM1ke
Copy link
Copy Markdown

DynaM1ke commented Mar 2, 2025

Hi,
thanks.

I try later this week, i'm on a business travel.
First i try the windows version and then docker image

@DynaM1ke
Copy link
Copy Markdown

DynaM1ke commented Mar 7, 2025

Hi my frist try was not successful,

i try a parallel installation (stable release and dev) and get an error.
Next:

  1. uninstall all GOG with appwiz.cpl
  2. install the DEV Version
  3. login
  4. update database
  5. download -> Error

`C:\Users\sirug>gog-downloader download --language de --language en --language-fallback-english --os windows --os linux -vv D:\DEV\RomManager\library\roms
[critical] Error thrown while running command "download --language de --language en --language-fallback-english --os windows --os linux -vv "D:\DEV\RomManager\library\roms"". Message: "Typed property App\DTO\GameDetail::$slug must not be accessed before initialization"

In FilteredGamesResolverTrait.php line 153:

[Error]
Typed property App\DTO\GameDetail::$slug must not be accessed before initialization`

### Full Output from console

` [OK] Logged in successfully.

C:\Users\sirug>gog-downloader config naming-convention rom-manager

[OK] Setting 'naming-convention' successfully set.

C:\Users\sirug>gog-downloader download --no-verify --language de --language en --language-fallback-english --os windows --os linux -vv D:\DEV\RomManager\library\roms
[critical] Error thrown while running command "download --no-verify --language de --language en --language-fallback-english --os windows --os linux -vv "D:\DEV\RomManager\library\roms"". Message: "Typed property App\DTO\GameDetail::$slug must not be accessed before initialization"

In FilteredGamesResolverTrait.php line 153:

[Error]
Typed property App\DTO\GameDetail::$slug must not be accessed before initialization

Exception trace:
at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\src\Trait\FilteredGamesResolverTrait.php:153
App\Command\DownloadCommand->{closure:App\Trait\FilteredGamesResolverTrait::getGames():125}() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\rikudou\iterables\src\Iterables.php:59
Rikudou\Iterables\Iterables::map() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\rikudou\iterables\src\Iterables.php:461
Rikudou\Iterables\Iterables::toGenerator() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\rikudou\iterables\src\Iterables.php:50
Rikudou\Iterables\Iterables::map() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\rikudou\iterables\src\Iterables.php:77
Rikudou\Iterables\Iterables::filter() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\src\Command\DownloadCommand.php:160
App\Command\DownloadCommand->execute() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Command\Command.php:326
Symfony\Component\Console\Command\Command->run() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Application.php:1096
Symfony\Component\Console\Application->doRunCommand() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Application.php:324
Symfony\Component\Console\Application->doRun() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Application.php:175
Symfony\Component\Console\Application->run() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\php-bin\app.php:22

download [--no-verify] [-o|--os OS] [-l|--language LANGUAGE] [--language-fallback-english] [-u|--update] [--exclude-game-with-language EXCLUDE-GAME-WITH-LANGUAGE] [--retry RETRY] [--retry-delay RETRY-DELAY] [--skip-errors] [--idle-timeout IDLE-TIMEOUT] [--chunk-size CHUNK-SIZE] [--only ONLY] [--without WITHOUT] [-b|--bandwidth BANDWIDTH] [-e|--extras] [--skip-existing-extras] [--no-games] [--skip-download SKIP-DOWNLOAD] [--] []

C:\Users\sirug>gog-downloader update-database
239/239 [============================] 100% - Yes, Your Grace

[OK] Local data successfully updated

C:\Users\sirug>gog-downloader download --no-verify --language de --language en --language-fallback-english --os windows --os linux -vv D:\DEV\RomManager\library\roms
[critical] Error thrown while running command "download --no-verify --language de --language en --language-fallback-english --os windows --os linux -vv "D:\DEV\RomManager\library\roms"". Message: "Typed property App\DTO\GameDetail::$slug must not be accessed before initialization"

In FilteredGamesResolverTrait.php line 153:

[Error]
Typed property App\DTO\GameDetail::$slug must not be accessed before initialization

Exception trace:
at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\src\Trait\FilteredGamesResolverTrait.php:153
App\Command\DownloadCommand->{closure:App\Trait\FilteredGamesResolverTrait::getGames():125}() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\rikudou\iterables\src\Iterables.php:59
Rikudou\Iterables\Iterables::map() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\rikudou\iterables\src\Iterables.php:461
Rikudou\Iterables\Iterables::toGenerator() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\rikudou\iterables\src\Iterables.php:50
Rikudou\Iterables\Iterables::map() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\rikudou\iterables\src\Iterables.php:77
Rikudou\Iterables\Iterables::filter() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\src\Command\DownloadCommand.php:160
App\Command\DownloadCommand->execute() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Command\Command.php:326
Symfony\Component\Console\Command\Command->run() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Application.php:1096
Symfony\Component\Console\Application->doRunCommand() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Application.php:324
Symfony\Component\Console\Application->doRun() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Application.php:175
Symfony\Component\Console\Application->run() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\php-bin\app.php:22

download [--no-verify] [-o|--os OS] [-l|--language LANGUAGE] [--language-fallback-english] [-u|--update] [--exclude-game-with-language EXCLUDE-GAME-WITH-LANGUAGE] [--retry RETRY] [--retry-delay RETRY-DELAY] [--skip-errors] [--idle-timeout IDLE-TIMEOUT] [--chunk-size CHUNK-SIZE] [--only ONLY] [--without WITHOUT] [-b|--bandwidth BANDWIDTH] [-e|--extras] [--skip-existing-extras] [--no-games] [--skip-download SKIP-DOWNLOAD] [--] []

C:\Users\sirug>gog-downloader download --language de --language en --language-fallback-english --os windows --os linux -vv D:\DEV\RomManager\library\roms
[critical] Error thrown while running command "download --language de --language en --language-fallback-english --os windows --os linux -vv "D:\DEV\RomManager\library\roms"". Message: "Typed property App\DTO\GameDetail::$slug must not be accessed before initialization"

In FilteredGamesResolverTrait.php line 153:

[Error]
Typed property App\DTO\GameDetail::$slug must not be accessed before initialization

Exception trace:
at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\src\Trait\FilteredGamesResolverTrait.php:153
App\Command\DownloadCommand->{closure:App\Trait\FilteredGamesResolverTrait::getGames():125}() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\rikudou\iterables\src\Iterables.php:59
Rikudou\Iterables\Iterables::map() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\rikudou\iterables\src\Iterables.php:461
Rikudou\Iterables\Iterables::toGenerator() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\rikudou\iterables\src\Iterables.php:50
Rikudou\Iterables\Iterables::map() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\rikudou\iterables\src\Iterables.php:77
Rikudou\Iterables\Iterables::filter() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\src\Command\DownloadCommand.php:160
App\Command\DownloadCommand->execute() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Command\Command.php:326
Symfony\Component\Console\Command\Command->run() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Application.php:1096
Symfony\Component\Console\Application->doRunCommand() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Application.php:324
Symfony\Component\Console\Application->doRun() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Application.php:175
Symfony\Component\Console\Application->run() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\php-bin\app.php:22

download [--no-verify] [-o|--os OS] [-l|--language LANGUAGE] [--language-fallback-english] [-u|--update] [--exclude-game-with-language EXCLUDE-GAME-WITH-LANGUAGE] [--retry RETRY] [--retry-delay RETRY-DELAY] [--skip-errors] [--idle-timeout IDLE-TIMEOUT] [--chunk-size CHUNK-SIZE] [--only ONLY] [--without WITHOUT] [-b|--bandwidth BANDWIDTH] [-e|--extras] [--skip-existing-extras] [--no-games] [--skip-download SKIP-DOWNLOAD] [--] []`

@RikudouSage
Copy link
Copy Markdown
Owner Author

Here's the updated Windows setup, can you try again?

GogDownloaderSetup.exe.zip

@DynaM1ke
Copy link
Copy Markdown

DynaM1ke commented Mar 12, 2025

I got an another Error:
`In TargetDirectoryTrait.php line 43:

[App\Exception\InvalidValueException]
GOG Downloader is configured to use the GOG slug naming scheme, but the game '9 Years of Shadows' does not have a s
lug. If you migrated from the previous naming scheme, please run the update command first.`

I uninstall and install the new dev version.

Run the gog-downloader command to view usage instructions or to start using it. Note that if you get an error about the command not being recognized, you might need to reboot your PC.

C:\Users\sirug>gog-downloader update-database
239/239 [============================] 100% - Yes, Your Grace

[OK] Local data successfully updated

C:\Users\sirug>gog-downloader config naming-convention rom-manager

[OK] Setting 'naming-convention' successfully set.

C:\Users\sirug>gog-downloader download --language de --language en --language-fallback-english --os windows --os linux -vv D:\DEV\RomManager\library\roms
[critical] Error thrown while running command "download --language de --language en --language-fallback-english --os windows --os linux -vv "D:\DEV\RomManager\library\roms"". Message: "GOG Downloader is configured to use the GOG slug naming scheme, but the game '9 Years of Shadows' does not have a slug. If you migrated from the previous naming scheme, please run the update command first."

In TargetDirectoryTrait.php line 43:

[App\Exception\InvalidValueException]
GOG Downloader is configured to use the GOG slug naming scheme, but the game '9 Years of Shadows' does not have a s
lug. If you migrated from the previous naming scheme, please run the update command first.

Exception trace:
at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\src\Trait\TargetDirectoryTrait.php:43
App\Command\DownloadCommand->getTargetDir() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\src\Command\DownloadCommand.php:232
App\Command\DownloadCommand->{closure:App\Command\DownloadCommand::execute():182}() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\src\Service\RetryService.php:27
App\Service\RetryService->retry() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\src\Command\DownloadCommand.php:182
App\Command\DownloadCommand->execute() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Command\Command.php:326
Symfony\Component\Console\Command\Command->run() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Application.php:1096
Symfony\Component\Console\Application->doRunCommand() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Application.php:324
Symfony\Component\Console\Application->doRun() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\vendor\symfony\console\Application.php:175
Symfony\Component\Console\Application->run() at C:\Users\sirug\AppData\Local\Programs\GOG Downloader\php-bin\app.php:22

download [--no-verify] [-o|--os OS] [-l|--language LANGUAGE] [--language-fallback-english] [-u|--update] [--exclude-game-with-language EXCLUDE-GAME-WITH-LANGUAGE] [--retry RETRY] [--retry-delay RETRY-DELAY] [--skip-errors] [--idle-timeout IDLE-TIMEOUT] [--chunk-size CHUNK-SIZE] [--only ONLY] [--without WITHOUT] [-b|--bandwidth BANDWIDTH] [-e|--extras] [--skip-existing-extras] [--no-games] [--skip-download SKIP-DOWNLOAD] [--remove-invalid] [--] []

C:\Users\sirug>

@RikudouSage
Copy link
Copy Markdown
Owner Author

Any chance you could send over your games.db file? It looks like the update-database command is not updating the data correctly and I have no idea how that might happen.

@DynaM1ke
Copy link
Copy Markdown

Yes of course.
Can i send this file to you direct or paste here?

@RikudouSage
Copy link
Copy Markdown
Owner Author

It should be safe to send here as well, but feel free to send it to [email protected], if you don't want to post it publicly.

It should contain data about the games you own and their download URLs, no sensitive information.

@DynaM1ke
Copy link
Copy Markdown

meanwhile, i delete the games.db and via update a new is created.
The first try looks good, a seperate OS folder is created.

@DynaM1ke
Copy link
Copy Markdown

Works great. I tested download, cancel and resume.
The Rom Manager has released a new Version and the folder structure can be more detailed [dlc, hack, manual, patch, update, mod, demo, translation, and prototype].
https://github.com/rommapp/romm?tab=readme-ov-file#folder-structure
Provide GOG also this in his extras?

@RikudouSage
Copy link
Copy Markdown
Owner Author

It does, but I'd rather do it in a separate PR at a later date, not sure it can be done without a significant rewrite.

@RikudouSage RikudouSage merged commit 8511732 into main Mar 27, 2025
2 checks passed
@RikudouSage RikudouSage deleted the feat/romm-naming-scheme branch March 27, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Folder Structure compatibility with RomM (ROM Manager)

2 participants