8000 feat(thunderx,pikpak): add offline download support for ThunderX; add ctx to specific PikPak functions by Nekohy · Pull Request #8491 · AlistGo/alist · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(thunderx,pikpak): add offline download support for ThunderX; add ctx to specific PikPak functions #8491

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Nekohy
Copy link
@Nekohy Nekohy commented May 6, 2025

Copy link

Walkthrough

This PR introduces offline download support for ThunderX and adds context (ctx) to specific PikPak functions. It involves significant changes to the ThunderX driver, including new functions for handling offline downloads, task management, and integration with existing systems.

Changes

Files Summary
drivers/pikpak/driver.go Added context (ctx) to various PikPak functions for better request handling.
drivers/thunderx/driver.go, drivers/thunderx/types.go, drivers/thunderx/util.go Implemented offline download support for ThunderX, including new functions and types for managing tasks and responses.
internal/conf/const.go Added new constant for ThunderX temporary directory.
internal/offline_download/all.go, internal/offline_download/thunderx/thunderx.go, internal/offline_download/thunderx/utils.go Integrated ThunderX into the offline download system with new utilities and initialization logic.
internal/offline_download/tool/add.go, internal/offline_download/tool/download.go Updated tool logic to support ThunderX.
server/handles/offline_download.go, server/router.go Added new API endpoints and handlers for ThunderX configuration and management.

}
filtersJSON, err := json.Marshal(filters)
if err != nil {
return nil, fmt.Errorf("failed to marshal filters: %w", err)

Choose a reason for hiding this comment

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

The error handling here should ensure that filtersJSON is properly marshaled before being used in the params map. If the marshaling fails, it could lead to unexpected behavior or security vulnerabilities if the error isn't handled correctly.

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