Skip to content

Fix removing the meta files when navigating to a new video#2345

Merged
PrestonN merged 1 commit intoFreeTubeApp:v0.17.0-RCfrom
absidue:fix-meta-files-removal-rc
Jun 21, 2022
Merged

Fix removing the meta files when navigating to a new video#2345
PrestonN merged 1 commit intoFreeTubeApp:v0.17.0-RCfrom
absidue:fix-meta-files-removal-rc

Conversation

@absidue
Copy link
Member

@absidue absidue commented Jun 20, 2022


Fix removing the meta files when navigating to a new video (RC branch)

Pull Request Type

  • Bugfix

Related issue
closes #1562

Description
If you are watching a video and go to the next video the videoId property on the component (this.videoId) changes before the ipc call for the userdata directory returns, so previously that would mean that the old dash and storyboard files wouldn't get deleted and potentially also deleting the ones for the new video, if they are already created at that point. This pull request changes it so that the videoId value is passed in as a function parameter, this means that it isn't affected by this.videoId changing while the function is running asyncronously.

This pull request also removes the redundant existence checks for the directories as the file existence check already covers that.

Testing (for code that is not small enough to be easily understandable)
Watch a video and then click a video in the recommended list or open a playlist and go to the next video, the dash and storyboards for the previous video should be deleted.

Desktop (please complete the following information):

  • OS: Windows
  • OS Version: 10
  • FreeTube version: c687043

@PrestonN PrestonN enabled auto-merge (squash) June 20, 2022 21:04
@absidue absidue added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 20, 2022
Copy link
Member

Choose a reason for hiding this comment

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

Seems to be fixed now, lgtm!

@PrestonN PrestonN merged commit dd879b6 into FreeTubeApp:v0.17.0-RC Jun 21, 2022
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 21, 2022
@absidue absidue deleted the fix-meta-files-removal-rc branch June 21, 2022 06:09
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.

5 participants