Support for youtube playlist imports in cvs
Main Change: Support for youtube playlist imports in cvs
Others: moved some code to parseCsv added updatePlaylistVideo for update single playlist video on database added preference.js to get unique dataset results using the preferred api
Title
Pull Request Type
- [ ] Bugfix
- [x] Feature Implementation
- [ ] Documentation
- [ ] Other
Related issue
Description
Screenshots
Testing
Desktop
- OS:
- OS Version:
- FreeTube version:
Additional context
I have not reviewed the code or tested this pull request yet, however I have noticed that you haven't filled in the pull request template properly including the rather important testing section which for something like this should also include example files that reviewers can use to test the pull request.
This could potentially close #5057
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
I have not tested this but looking at the code alone this pull request looks like it'll require an overhaul before it could be merged.
- The
playlists.csvfile contains all the metadata about the playlists, from what I can tell this pull request doesn't have any logic for that. It would probably be better to create a separate button for the YouTube playlists import, then prompt the user to selected the metadata file first and then afterwards prompt them to select the csv files for the playlists they want to import. - You should avoid making requests to YouTube as much as possible, during an import like this you'll likely be sending hundreds if not thousands of requests in rapid succession, which will most certainly get you ratelimited or worse (the subscriptions import already has that problem and that only makes one request per channel, which is why in the long term we want to refactor the subscriptions import to not make any requests at all). Before doing any requests you should be checking every possible cache and store (e.g. watch history, existing playlists, subscriptions cache, search cache, trending cache, popular cache etc), making requests to YouTube or Invidious should be the last resort.
- While your preferences.js idea sounds great on paper, in practice it means that with the local API for example you'll be making about 6 requests per video (more in the future once we add support for YouTube's poToken stuff). For the import you only need one request per video because you only need a few metadata fields, whereas the watch page needs to create a real session on YouTube, make extra requests to get playable streaming URLs, fetch the full description and recommended videos, as well as attempt to bypass age-restrictions. For the local API you should be creating a dedicated function that calls YouTube.js' getBasicInfo function).
This pull request has conflicts, please resolve those before we can evaluate the pull request.
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.
This PR was closed because it has been stalled for 14 days with no activity.