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

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

Merged

Conversation

absidue
Copy link
Member

@absidue absidue commented Jun 20, 2022


Fix removing the meta files when navigating to a new video (development 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: 72b4e17

@absidue absidue added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 20, 2022
@PrestonN PrestonN enabled auto-merge (squash) June 20, 2022 21:03
@PrestonN PrestonN merged commit 35dcdba into FreeTubeApp:development 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-dev branch June 21, 2022 06:09
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Jun 23, 2022
…uilds/build-more-versions

* commit '4f4f727ae1af304ce3131f03b29383ce4fdbb724': (104 commits)
  Translated using Weblate (Italian)
  Translated using Weblate (Chinese (Traditional))
  Translated using Weblate (Arabic)
  Translated using Weblate (Polish)
  Translated using Weblate (Ukrainian)
  Translated using Weblate (French)
  Translated using Weblate (French)
  Translated using Weblate (Turkish)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Icelandic)
  Translated using Weblate (Chinese (Simplified))
  Translated using Weblate (Turkish)
  Translated using Weblate (French)
  Add Parental Controls (FreeTubeApp#1456)
  Translated using Weblate (Chinese (Traditional))
  Translated using Weblate (Chinese (Simplified))
  Make installation method and API method mandatory in bug issue template (FreeTubeApp#2342)
  Fix removing the meta files when navigating to a new video (FreeTubeApp#2344)
  * Update app menu to add item for new window (FreeTubeApp#2306)
  Update electron-builder version to ^23.0.2 (FreeTubeApp#2305)
  ...
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.

Video meta file removal is unreliable
5 participants