Tue, 03 Dec 2024 18:50:00 UTC
tl;dr set the environment variable LUTRIS_SERVICE_ENABLED=1
i use Lutris to manage my games on linux and today i set out to catalog all my games in one place. it made sense to do this within lutris so i connected all my accounts and imported all my lists of games. cool, fantastic. but there was one thing missing: the ability to search every source all at once. i looked into it and determined the way that worked best for me was to add all my games to my lutris.net library and just search that from within lutris. when i was done everything was searchable on lutris.net but not from within lutris because lutris was missing from the sources list on the left. no problem, ill just go enable it. you cant. its just missing. i dug into the git repo and they seem to have hidden it by default in a commit with no context on february 21st. commit c0231ff if you care. for some reason they hid the option behind an environment variable. sure enough setting LUTRIS_SERVICE_ENABLED=1 when launching lutris brought the option and sidebar source entry back like nothing ever happened. well, almost, its at the bottom now instead of the top like it used to be. whatever. i can search my games now and thats pretty neat.
i did kinda mention i added everything to my lutris.net library as if that was a quick task but i assure you it was not. i have 685 games cataloged there now and adding them one by one would have been an absolute pain. lutris.net has an option to sync your steam library but i couldnt get that to work for whatever reason. even if it did that would only have been 140 games. when you add your accounts to lutris and it pulls up all your games its storing them in a separate database table than the main games list and that table doesnt get pulled when syncing your local library to lutris.net. what i ended up doing was taking each entry from the service_games table and adding an entry to the games table with just the name and slug from the service_games entry. lutris handles the rest of the fields being empty (not null!) just fine. i did all this conversion in the python repl then deduplicated the result by hand. i tried to do the deduplication in python but i missed the part where you deduplicate the entries youre adding, instead only checking that they werent already listed in the games table. which also didnt work right lol. one pitfall i will warn anyone attempting this about is that games from humble bundle dont have correct slugs. i only had 44 games there so that was easy enough to sort out by hand.