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

Delete segments after upload if upload is enabled #405

Merged
merged 4 commits into from
Jul 3, 2023

Conversation

biglittlebigben
Copy link
Contributor

Is this safe to do?

@frostbyte73
Copy link
Member

*Uploader is the uploader base, it should clean up in uploader.go L61.
We'll also need to add a parameter to upload, because we don't want to delete the playlist after uploading but everything else should be ok

type baseUploader struct {
}

func (u *baseUploader) cleanupFile(localFilepath string) error {
Copy link
Member

Choose a reason for hiding this comment

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

func (u *Uploader) cleanupFile(localFilepath string) error {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wouldn't the cause the file to be deleted as well in cases where there is no cloud upload (which I believe means that the noopUploader is selected)?

Copy link
Member

Choose a reason for hiding this comment

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

oh, true. In that case, better to kill *Uploader and change the uploader interface to be public.
Then the backup logic can move into baseUploader

@frostbyte73 frostbyte73 merged commit bff9c6e into main Jul 3, 2023
1 check passed
@frostbyte73 frostbyte73 deleted the benjamin/delete_segments_after_upload branch July 3, 2023 23:41
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