10000 Close a bunch of issues by wizzomafizzo · Pull Request #211 · ZaparooProject/zaparoo-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Close a bunch of issues #211

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

Merged
merged 22 commits into from
Apr 22, 2025
Merged

Close a bunch of issues #211

merged 22 commits into from
Apr 22, 2025

Conversation

wizzomafizzo
Copy link
Member
@wizzomafizzo wizzomafizzo commented Apr 21, 2025
  • Add option for optical_reader driver to use uuid, label or both
  • Support "all" systems search in launch.random command
  • Set app version from environment during build
  • Add a "user" config dir to store data if it exists
  • Allow subdirectories in mappings folder
  • Fix uppercase zap links not working
  • Fix mister tracker sending incorrect arcade notifications
  • Add new flag to run API methods to mark scripts as unsafe
  • Add new API method to reload config and mappings from disk
  • Added arm batocera build
  • Include license, docs and extra files in distribution zips
  • Refactor build scripts and docker files (removes pcsc and extra driver support in libnfc)
  • Update dev docs
  • Chmod workaround in batocera service file

@wizzomafizzo wizzomafizzo requested a review from Copilot April 21, 2025 11:08
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request closes several issues by adding new features and fixing bugs across different modules. Key changes include:

  • Adding support for optical_reader driver identifier options and an "all" systems search in the launch.random command.
  • Introducing a new API method to reload config and mappings, and allowing subdirectories in the mappings folder.
  • Updating platform methods to prioritize a user config directory and embedding the app version from the environment during build.

Reviewed Changes

Copilot reviewed 45 out of 45 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/platforms/mister/tracker.go Updated LookupCoreName to return a pointer; modified lookup logic and logging behavior.
pkg/platforms/mister/platform.go Added user directory checks to DataDir and ConfigDir.
pkg/platforms/mac/platform.go Removed temporary directory management in StartPre and Stop methods.
pkg/platforms/linux/platform.go Removed temporary directory management in StartPre and Stop methods.
pkg/platforms/libreelec/platform.go Removed temporary directory management in StartPre and Stop methods.
pkg/platforms/chimeraos/platform.go Removed temporary directory management in StartPre and Stop methods.
pkg/platforms/bazzite/platform.go Removed temporary directory management in StartPre and Stop methods.
pkg/platforms/batocera/platform.go Removed explicit creation of directories in StartPre and added user dir check in getters.
pkg/configui/widgets/widgets.go Updated PickerUIBuilder to construct and marshal new RunScriptParams.
pkg/configui/widgets/models/models.go Changed from a Trusted pointer flag to an Unsafe boolean flag in PickerArgs.
pkg/config/config.go Added an IDSource field and a ConnectionString helper; refactored mapping file discovery.
pkg/config/app.go Updated app version handling and added a user dir constant.
pkg/cli/cli.go Added a Reload flag and corresponding handling to trigger settings reload.
pkg/api/server.go Modified method lookup to use lower-case for method names and added the reload method.
pkg/api/models/params.go Extended RunParams and added a new RunScriptParams to include an Unsafe flag.
pkg/api/models/models.go Added a new constant for the settings.reload method.
pkg/api/methods/settings.go Implemented HandleSettingsReload to reload config and mappings.
pkg/api/methods/run.go Modified run method logic to integrate the Unsafe flag and updated RunScript unmarshalling.
Taskfile.dist.yml Updated the build commands to inject the app version from the environment.
.github/workflows/build.yml Updated the build job to pass the APP_VERSION environment variable to the Taskfile command.

@wizzomafizzo wizzomafizzo marked this pull request as ready for review April 21, 2025 12:48
@wizzomafizzo wizzomafizzo requested a review from Copilot April 21, 2025 12:48
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a range of new features and fixes. The changes include:

  • Adding options for the optical_reader driver and support for “all” systems search in the launch.random command.
  • Setting the app version dynamically from the environment during build, improving configuration by adding a user config directory, and allowing subdirectories in the mappings folder.
  • Fixing issues with uppercase zap links, correcting mister tracker notifications, and adding a new API method to reload configuration.

Reviewed Changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/platforms/mister/tracker.go Update to lookup function to return pointers for consistency.
pkg/platforms/* (various) Refactor platform directory functions to use user config dir.
pkg/config/config.go Update mapping file search to support subdirectories.
pkg/cli/cli.go Added a new CLI flag for reloading config and mappings.
pkg/api/* Introduced new API methods and adjusted method lookup logic.
Taskfile.dist.yml, workflows/build.yml Updated build commands to embed dynamic app version.

@wizzomafizzo wizzomafizzo requested a review from Copilot April 22, 2025 11:12
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements several new features and fixes including API enhancements, improved configuration handling with subdirectory support, build script refactoring, and updated documentation.

  • Introduces new API methods (e.g. settings reload and unsafe flag in run scripts)
  • Refactors platform startup and configuration mapping logic to support user directories and subdirectories
  • Updates build scripts and documentation to reflect recent changes

Reviewed Changes

Copilot reviewed 64 out of 65 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/platforms/batocera/platform.go Removed pre-start directory creation and updated device identifier casing
pkg/configui/widgets/widgets.go Updated run script parameter marshaling to use a new struct
pkg/config/ui/models/models.go Replaced Trusted field with Unsafe in picker args
pkg/config/config.go Enhanced mapping file discovery via WalkDir and added new ReadersConnect field
pkg/config/app.go Updated application version management and added a new user directory constant
pkg/cli/cli.go Introduced a new Reload flag to trigger config reload operations
pkg/api/* Added new API methods for settings reload and updated request method lookup
docs/* Removed outdated documentation and added new scan behavior guidelines
Taskfile.dist.yml Refactored build commands and environment variable handling
README.md Updated links and messaging to match current project structure
.github/workflows/build.yml Adjusted build steps, adding APP_VERSION injection and new platform configurations
Files not reviewed (1)
  • cmd/batocera/conf/zaparoo_service: Language not supported
Comments suppressed due to low confidence (3)

pkg/platforms/batocera/platform.go:60

  • The directory creation loop in StartPre was removed; please confirm that these directories are being created elsewhere to avoid runtime issues accessing required file paths.
for _, dir := range []string{ ... }

pkg/config/config.go:455

  • The usage of 'strings.ToLower' requires the 'strings' package to be imported; add the missing import to avoid compilation errors.
if strings.ToLower(filepath.Ext(d.Name())) != ".toml" {

pkg/api/server.go:66

  • The call to 'strings.ToLower' requires importing the 'strings' package; please add the missing import in this file.
fn, ok := methodMap[strings.ToLower(req.Method)]

@wizzomafizzo wizzomafizzo merged commit 398cf2a into main Apr 22, 2025
@wizzomafizzo wizzomafizzo deleted the wizzo/issues-1 branch April 22, 2025 11:14
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.

1 participant
0