-
Notifications
You must be signed in to change notification settings - Fork 895
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
Update playlist import to only add duplicate playlist items sometimes #5783
Merged
FreeTubeBot
merged 5 commits into
FreeTubeApp:development
from
PikachuEXE:feature/playlist-smart-merge
Oct 10, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
26684b4
$ Use early return within `#forEach`
PikachuEXE f3c6291
* Update playlist import to only add duplicate playlist items sometimes
PikachuEXE 60a839f
Merge branch 'development' into feature/playlist-smart-merge
PikachuEXE baf4b45
~ Update comment
PikachuEXE edd3ea5
Update src/renderer/components/data-settings/data-settings.js
PikachuEXE File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably makes sense to try to match by
_id
first, because if you rename the playlist on one computer you still want it to be the same when you import it on the other computer instead of being treated as a completely separate playlist.That being said I've just realised that the
_id
is considered an ignored key, so there is no way that a renamed playlist could ever match, because the import will make sure that the_id
won't match, but that problem already existed before this pull request. Also interesting that we don't save thelastPlayedAt
field when it's a new playlist.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree but no way this belongs to this PR (plus need test cases)
I can make another PR to make it find by
_id
first laterlastPlayedAt
not saved for new/existing playlist intentionallyObvious for existing playlist but for new playlist it's never played locally and I consider it as a "local property" (e.g. importing other people's playlist)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to say I personally never use the playlists, but the way I use the other export and import options is for backup purposes, which means I only ever import my own stuff in my FreeTube install (dev mode is an exception because there I only use it to test stuff and that data is saved in a separate location), I would expect everything possible to be imported.
Importing someone else's files is probably a pretty rare use case, that is only really becoming possible because of the open PR to export single playlists.