Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check local files for custom boxart/sound. #50

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

pivotiiii
Copy link
Contributor

Hi,
I have added in a few features for the generator.py. This is the first of a few smaller pull requests and adds the ability to use local files if they are available. This would streamline creating and testing new banners but may be less useful for the regular user as described in #27. There is currently no user prompt, since I would imagine that if a user actually uses local assets, they know what they are doing and don't want to be asked if they really want to use local files.

The general way assets are chosen is the same as with the downloads from Github. Missing files still get downloaded.
The folder that gets checked is called "assets" and currently has to be in the same directory as the generator.exe file. I thought about having it a level up but since you only use the generator folder on windows and not bootstrap or forwarder, I feel like this is more straightforward.

There are also two small other changes in here:

  1. Use the member var for the boxart instead of hardcoding "data/banner.png", this way local files don't need to be copied.
  2. Change the output for the .cia files to the output folder, I always thought it was weird that they just get dropped next to the executable, which gets quite messy if you add a lot of roms.

before checking Github/gametdb
@lifehackerhansol
Copy link
Collaborator

Nice stuff! I'll admit I haven't really paid attention to this project in a while as it more or less worked.

Going to have to NACK the output change. Someone could put a full directory path there and this would break it.

  • Instead, consider doing it in main(), where I check for args.output, and if they don't provide any, set the default to output/args.output[0], etc.

Confirm that change, and I'll check again if I'm not still crippling in midterm studies.

@pivotiiii
Copy link
Contributor Author

You are right, I completely missed the -o argument 🙃. It works with full paths now.

@lifehackerhansol lifehackerhansol merged commit 2ac29b0 into YANBForwarder:main Feb 20, 2023
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.

2 participants