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

Import from YouTube history using JSON export #2958

Merged
merged 10 commits into from
Mar 30, 2023

Conversation

arlm
Copy link
Contributor

@arlm arlm commented Dec 13, 2022

Import from YouTube history using JSON export

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

closes #1623

Description

Imports the history of YouTube watched videos from Google Takeout when using the JSON format.

Screenshots

Added a button to import from YouTube History

Before
image

After
image

Testing

  1. Go to YouTube
  2. Click on your profile picture
  3. Click on "Your data in YouTube" image
  4. Click on "More" image
  5. Click on "Download YouTube Data" image
  6. Click on "All YouTube data included" image
  7. Ensure that you have "history" option checked image
  8. Click on OK
  9. Click on "HTML format" image
  10. Change the type of the history to JSON image
  11. Click OK
  12. Click on "Next Step"
  13. Choose your option to transfer and lick "Create export"
  14. Wait the export to finish, download the package and unzip it
  15. Open FreeTube
  16. Go to "Settings"
  17. Click on "Data Settings"
  18. Click on "Import YouTube History"
  19. Select the JSON file from the Google Takeout export
  20. Enjoy your imported history

Desktop

  • OS: macOS
  • OS Version: Ventura 13.0.1 (22A400)
  • FreeTube version: v0.18.0 Beta (from development branch)

Additional context

  • It seems that it takes a while to process all data after the Toast message appears when you have a bigger history (mine has a little above 18,300 valid videos and around 4,000 ads)
  • I filter out non-YouTube items (for sanity), as well as searches and Google Ads views

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) December 13, 2022 21:30
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 13, 2022
auto-merge was automatically disabled December 13, 2022 21:37

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) December 13, 2022 21:38
@ChunkyProgrammer
Copy link
Member

Here's an example French file that you can do some testing with :) (just change the extension from .txt to .json
historique-vidéos.txt

@ChunkyProgrammer ChunkyProgrammer added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Dec 20, 2022
@github-actions
Copy link
Contributor

This PR is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@ChunkyProgrammer
Copy link
Member

@arlm will you be updating this PR or would you like our team to take over? 😄

@github-actions
Copy link
Contributor

This PR is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@ChunkyProgrammer ChunkyProgrammer added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested PR: WIP labels Feb 28, 2023
Copy link
Member

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

Choose a reason for hiding this comment

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

I think this shouldn't be implemented with the Import YouTube History button. U should just be able to import your yt history by clicking the already present import history button, just like it is done for subscriptions. Otherwise u will get allot of separate buttons for importing yt stuff and we could also potentially confuse users

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Mar 12, 2023
@ChunkyProgrammer ChunkyProgrammer added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: WIP labels Mar 14, 2023
Copy link
Member

Choose a reason for hiding this comment

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

The commits to the yaml files can be removed right?

Copy link
Member

Choose a reason for hiding this comment

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

VirtualBoxVM_mX26Bad0Vf.mp4

Umm is this something that needs to be addressed here? It retrieves the correct video info after the users interacted with the video.

@ChunkyProgrammer
Copy link
Member

Umm is this something that needs to be addressed here? It retrieves the correct video info after the users interacted with the video.

I'll try not including views and videolength (the date is correct as it's supposed to be date watched not published date)

Copy link
Member

Choose a reason for hiding this comment

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

lgtm

@PikachuEXE
Copy link
Collaborator

Should the doc be updated (at least have a draft PR) before we merge this?

@efb4f5ff-1298-471a-8973-3d47447115dc

Should the doc be updated (at least have a draft PR) before we merge this?

@PikachuEXE FreeTubeApp/FreeTube-Docs#93

@PikachuEXE
Copy link
Collaborator

Import works fine, only doc needs updates

@efb4f5ff-1298-471a-8973-3d47447115dc

@absidue this pr needs u ✨✨

@efb4f5ff-1298-471a-8973-3d47447115dc

@absidue see #2958 (comment) for test file

@FreeTubeBot FreeTubeBot merged commit 7a991cd into FreeTubeApp:development Mar 30, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Mar 30, 2023
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Apr 4, 2023
…tom-builds/current

* feature/watch-page/playlist-scroll-to-current: (25 commits)
  ! Fix window being scrolled when playlist is out of initial view
  * Update watch view playlist component to auto scroll to current video
  Bump @babel/preset-env from 7.20.2 to 7.21.4 (FreeTubeApp#3389)
  Fix trending & search result list rendered items not updated without workaround (FreeTubeApp#3342)
  Translated using Weblate (Italian)
  Translated using Weblate (Japanese)
  Fix adaptive format picked by video JS sometimes not showing up in quality selector (FreeTubeApp#3350)
  Translated using Weblate (Italian)
  Remove empty translation strings at build time (FreeTubeApp#3361)
  Prevent `channelInstance` from being `null` in community tab fallback (FreeTubeApp#3346)
  Translated using Weblate (Odia)
  Translated using Weblate (Odia)
  Translated using Weblate (Odia)
  Translated using Weblate (Odia)
  Translated using Weblate (Tigrinya)
  Translated using Weblate (Odia)
  Added translation using Weblate (Tigrinya)
  Added translation using Weblate (Tigre)
  Import from YouTube history using JSON export (FreeTubeApp#2958)
  Translated using Weblate (Odia)
  ...

# Conflicts:
#	src/renderer/views/Watch/Watch.js
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.

Import History from google takeout
6 participants