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

Update playlist import to only add duplicate playlist items sometimes #5783

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

PikachuEXE
Copy link
Collaborator

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

closes #5038

Description

Updates the behaviour of importing playlists when existing playlist found

Before:

  • Add playlist item unique by playlistItemId

After:

  • If both existing & incoming playlists have unique videos only (i.e. unique videoId values)
    Only add playlist items from incoming playlist with videoId absent in existing playlist
  • If either existing or incoming playlist has duplicate videos, add videos unique by playlistItemId (old behaviour)

Screenshots

Testing

(A) Both existing & incoming playlists have unique videos only

(B) Only incoming playlist has "duplicate" videos

  • import PC1, import PC2

(C) Only existing playlist has "duplicate" videos

  • import PC2, import PC1

(D) Only existing playlist has "duplicate" videos

  • import PC2 twice (should still have 4 items coz unique by playlistItemId)

Desktop

  • OS:
  • OS Version:
  • FreeTube version:

Additional context

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 3, 2024 02:07
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Oct 3, 2024
Copy link
Member

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

Choose a reason for hiding this comment

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

(A) Both existing & incoming playlists have unique videos only

Expected behavior: Not seeing any duplicates (This is the testcase from the issue)

(B) Only incoming playlist has "duplicate" videos

Expected behavior: You will see the duplicate because PC2 got it in its db

(C) Only existing playlist has "duplicate" videos

Expected behavior: You will see the duplicate because PC2 got it in its db

(D) Only existing playlist has "duplicate" videos

Expected behavior: You will see the duplicate because PC2 got it in its db

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: waiting for review For PRs that are complete, tested, and ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Videos duplicate themselves when importing playlists
2 participants