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

feat: GetFreeSpaceonDisk #26

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

feat: GetFreeSpaceonDisk #26

wants to merge 4 commits into from

Conversation

martylukyy
Copy link

@martylukyy martylukyy commented May 16, 2024

This PR adds the ability to get the free space left on the default qbittorrent save path.

Not sure if return 0 on L1301 and L1306 is the way to go here?

Also check if should make this more generic or should add other things in this call again.
Only implemented the bare minimum i needed to make this work.

@martylukyy martylukyy requested a review from zze0s May 16, 2024 17:22
methods.go Outdated

defer resp.Body.Close()

body, err := io.ReadAll(resp.Body)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not needed, you can fed it directly into the unmarshaller.

Copy link
Author

Choose a reason for hiding this comment

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

should be done now.

Copy link
Contributor

@zze0s zze0s left a comment

Choose a reason for hiding this comment

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

I think this should be the full MainData method instead of just the serverstate freespace field.

If you get the full JSON from qbit you can generate a struct from JSON in Goland easily by just pasting from clipboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

3 participants