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

Show a warning before adding a duplicate video to a playlist #4186

Closed
AnonymousSeal opened this issue Aug 25, 2020 · 38 comments · Fixed by #9538
Closed

Show a warning before adding a duplicate video to a playlist #4186

AnonymousSeal opened this issue Aug 25, 2020 · 38 comments · Fixed by #9538
Assignees
Labels
feature request Issue is related to a feature in the app playlist Anything to do with playlists in the app

Comments

@AnonymousSeal
Copy link

AnonymousSeal commented Aug 25, 2020

Describe the feature you want

It would be nice to be alerted when trying to add a video to a playlist that the playlist already contains.

Is your feature request related to a problem? Please describe it

Additional context

How will you/everyone benefit from this feature?

It prevents you from accidentally adding a video to a playlist twice. Especially helpful for long playlists.

Edit: adding keywords for searching: duplicate/entry/entries/playlist/playlists/videos

@AnonymousSeal AnonymousSeal added the feature request Issue is related to a feature in the app label Aug 25, 2020
@opusforlife2
Copy link
Collaborator

Closing #1473 in favour of this. Alerting the user seems more useful than removing after the fact.

@ahmad-abdelbaset
Copy link

ahmad-abdelbaset commented Nov 4, 2020

Hi, I would like to work on this issue as a part of my project for Master Degree course (Software Construction), I discussed it with my instructor @atamrawi

@Stypox
Copy link
Member

Stypox commented Nov 4, 2020

@ahmad-abdelbaset great! Go for it, nobody else has taken it up so far. Thank you :-)

@ShareASmile
Copy link
Collaborator

@Stypox I think there should { or would be great } to have an option to Both

  1. {disallow adding twice the same video to a list}
  2. and {to batch remove all previous duplicates} from video playlists.

As Batch remove duplicates from playlist would greatly help in eliminating duplicates from prevously made playlists by users (especially longer ones) from which manual removal is most difficult.
.. discussion from #1473

@Stypox
Copy link
Member

Stypox commented Nov 5, 2020

@ShareASmile @ahmad-abdelbaset yeah, I agree, there should be:

  • a new "Remove duplicates" button in the local playlist page's three-dot menu (i.e. in the same place as "Remove watched")
  • a small indicator next to each local playlist in the "Add to playlist" dialog meaning that the stream being added is already in there
  • a confim dialog that opens when a user tries to add a stream to a local playlist that already contains it

@ahmad-abdelbaset
Copy link

Thank you @Stypox and @ShareASmile, it is really good idea, I will own this one.
@atamrawi

@ahmad-abdelbaset
Copy link

Hey,
I made a pull request (#5334 ) which is showing a message tells the user if it was any duplicated video/s before and asking him if he like to add it once again. If the user accept, the video will be added. if he reject the video will not be added. @atamrawi

I didn't have time to add the feature of "Remove Duplicated", sorry.

@infinitewaveparticle
Copy link

Any updates on implementing this?

@SameenAhnaf
Copy link
Collaborator

@infinitewaveparticle PR #5334 is in progress.

@infinitewaveparticle
Copy link

@SameenAhnaf I can see that, but it's been 6 months since anything has been posted about it. The contributor @ahmad-abdelbaset was doing this for a course in school which would have in all likelihood ended in May or June at the latest. If he doesn't reply to this it may be safe to assume that it's abandoned.

@litetex litetex changed the title Video already in playlist (duplicate entry) Show a warning before adding a duplicate video to a playlist Jan 25, 2022
@SameenAhnaf SameenAhnaf added the playlist Anything to do with playlists in the app label Dec 1, 2022
@Jared234
Copy link
Contributor

Jared234 commented Dec 3, 2022

I would like to start working on this. I don't intend to reuse the implementation of @ahmad-abdelbaset, but I will take all of the feedback into account that he received in his PR. I hope this is ok.

@atamrawi
Copy link

atamrawi commented Dec 5, 2022

Yes Please, go ahead. Ahmad was working on it as part of his course work project and no longer working on it. I guess there is a lot of improvements can be made - What we proposed was something with a limited scope.

@Jared234
Copy link
Contributor

Jared234 commented Dec 10, 2022

I am almost done with the implementation, but still have some questions regarding this issue.
The confirm dialog is already done, so I am focusing on the "small indicator next to each local playlist" that shows you whether an item is already in a playlist or not.

Here is an image of my current solution. The design is obviously just a placeholder:
Screenshot_20221210-154414

I would like to get some input regarding the design of this feature. Is a checkmark the symbol we want to use to indicate that the stream is already in the playlist, or would you choose something different? And what would be the ideal position for an icon?

@opusforlife2
Copy link
Collaborator

I would say that if an item is already in a playlist, that playlist should be greyed out/not selectable, with a simple "(contains video)" added after the playlist name.

But then it's possible that users who want to put a video multiple times in a playlist for some reason will complain. So maybe just the text in brackets and greying out, but not preventing selection of such a playlist.

@Jared234
Copy link
Contributor

I agree with you that graying out is a good option for indicating that a video has already been added to a playlist. However, I'm not sure about the necessity of using brackets in this case. I feel like just graying it out would be a good enough indicator already. What do you think?

@opusforlife2
Copy link
Collaborator

It won't be intuitive enough by itself for a lot of users, I'm afraid.

Also, "(already added)"? Seems better than the first option. It's inclusive of audios from SC, BC, etc.

Or... an explainer text in its own section under the New Playlist button that literally states: "The greyed out playlists already contain this item." That way playlists with long names won't cause issues.

@Jared234
Copy link
Contributor

I really like the idea of an extra section that explains this feature to the user.
I'll create a PR within the next few days.

@atamrawi
Copy link

Note that we you may need to perform a check on already created playlist as they may have already contain duplicate videos.

@Jared234
Copy link
Contributor

I have now created a pull request.
As for the solution proposed by @Stypox, I have added an indicator to the "Add to playlist" dialog to alert users if they are attempting to add a duplicate stream. I have also created a dialog that opens if a user tries to add the same stream item multiple times, allowing them to confirm or cancel their action.
I didn't add the option to remove the duplicated items because it was already done in the closed PR #7703.

@maverick74
Copy link

I didn't add the option to remove the duplicated items because it was already done in the closed PR #7703.

I'm not sure if that landed...

@Jared234
Copy link
Contributor

This comment explains why the PR got closed. However, we may come back to this implementation in the future if we need it.

@ShareASmile
Copy link
Collaborator

That PR had issues main concern was this in this comment
#7703 (comment)

I don't think it's a good idea to compare thumbnails to determine if a video is a duplicate
I think running the de-duplication on database level and then refreshing/reloading the UI would be the most performant solution here.

@SameenAhnaf
Copy link
Collaborator

SameenAhnaf commented Dec 13, 2022

Guys, wdyt about this layout in screenshot? I prefer, showing only checkboxes instead of thumbnails. If you still think thumbnails are important, they should be greyed out and a tick mark should be placed in the middle. Unchecking any playlist should remove that video entirely from that playlist.

+ icon on the right of playlist names to to add duplicate into them.

Icon Meaning
+ Video is added with no duplicate . Click to start adding duplicates.
+1 1 duplicate is already added. The video is already added 2 places in total.
+2 2 duplicates are already added. The video is already added 3 places in total.

This round icon should always follow these gestures.
Short Press: Add a new duplicate at the bottom of the playlist.
Long Press: Remove only the duplicates and keep the one placed in uppermost position.

IMG_20221214_012409

@maverick74
Copy link

This round icon should always follow these gestures. Short Press: Add a new duplicate at the bottom of the playlist. Long Press: Remove only the duplicates and keep the one placed in uppermost position.

I have just one question: When does this land???? (i know it's just an idea, but it's a great one. I vote for it!)

@SameenAhnaf
Copy link
Collaborator

@maverick74 On the right of each playlist name, a screenshot was added in #4186 (comment)

@Jared234
Copy link
Contributor

@ShareASmile Yes, there were some problems with the implementation. But imo the conclusion was that we should wait for #4186 to be implemented to see if this would be really needed. However, if you think I should give it a try, I will gladly implement this as well.

@SameenAhnaf I believe that this is an interesting design decision. However, I believe this would be out of scope for this issue, because it would entail a redesign of the entire dialog. I think it is worth having some discussions in a separate issue. If you plan to implement this soon, I can put this PR on hold for now.

@ShareASmile
Copy link
Collaborator

However, if you think I should give it a try, I will gladly implement this as well.

Yes, that would be awesome if you also implement that. please go ahead.

However, I believe this would be out of scope for this issue, because it would entail a redesign of the entire dialog

@Jared234 agree with you, let us keep it Simple here.

@maverick74
Copy link

@maverick74 On the right of each playlist name, a screenshot was added in #4186 (comment)

I surely expressed myself in a bad way. What i really mean is to ask when does your idea get implemented and delivered to us, users? (i understand it's just an idea for now. My expression is just with the intention to say that i loved it and that i would like to get my hands on something similar right away)

@SameenAhnaf
Copy link
Collaborator

@maverick74 I read Where instead of When, I'm dumb🤦

@Jared234 Many users have been complaining that Newpipe UI is changing too frequently. However, I'd leave the decision to other team members how your PR should be handled. I'm not a dev. So, I can't open a PR at this moment. Btw, do you have any plan to implement #7973? Not an order or instruction, I'm just curious to know.

@ShareASmile
Copy link
Collaborator

@SameenAhnaf Jared has already said that in 7973 last comment

I will take a look at it and write another comment if I am interested.

That explains mostly everything he has intended to say.

@Jared234
Copy link
Contributor

@ShareASmile Sure, I can do that. I'll create an additional PR on issue #5558 instead of adding it to this PR. I think this is the best solution. Do you agree?

@SameenAhnaf Ok, good to know.
Regarding 7973, @ShareASmile is right. If I'm interested in working on it, I'll just leave another comment. However, I haven't had time to really look into it yet. Before I possibly start working on it, I will let you know.

@ShareASmile
Copy link
Collaborator

ShareASmile commented Dec 15, 2022

I'll create an additional PR on issue #5558 instead of adding it to this PR. I think this is the best solution. Do you agree?

Yes, agree. It would be best to separately deal with 2 PR's for each of these 2 issues. Take your time, Let PR's land one by one, i will be ready to test👍

@Jared234
Copy link
Contributor

After discussing this feature with @opusforlife2 in the PR, we decided to omit the "Duplicate Video Found" dialog and just use the grayed out playlists to indicate duplicates. However, we want to display a short toast after a user adds a duplicate to one of the playlists. It should say either "Duplicate added" or "Duplicate added x times". Do you think it is important for the user to know how many times this video is already in the playlist? Or do you think this information is unnecessary?

Here is a short poll:
👍 - Duplicated added
👎 - Duplicate added x time(s)

@SameenAhnaf
Copy link
Collaborator

SameenAhnaf commented Dec 23, 2022

There's no need to add any of those texts in the toast.

Video added to any playlist: Only grey out the thumbnail.
Duplicate found in any playlist: Grey out that/those thumbnails and show text 2 duplicates found text under the playlist name in italic font.

IMG_20221223_074212

@opusforlife2
Copy link
Collaborator

Depending on translations, that might not be a one-line text. A toast can run on to a 2nd line without causing any layout issues.

@SameenAhnaf
Copy link
Collaborator

@opusforlife2 @Jared234 The toast should have DEDUPLICATE and REMOVE buttons. They are meant to to remove duplicates at the bottom and delete the video entirely from any playlist respectively.

#1473 is already closed in favor of this issue. So, there should be an easy way to remove duplicates.

@Jared234
Copy link
Contributor

I agree that we should allow the user to deduplicate their playlist. However, I don't think this is the right place to do it. For example, if you implement the deduplicate feature as a button only in the toast, you would have to add the video another time to be able to press this button.
As discussed with @ShareASmile, I will implement this in another issue.
@opusforlife2 Maybe we should open the issue #1473 again?

@opusforlife2
Copy link
Collaborator

Right, makes sense. Sameen reopened it. So it is also available for someone else to take up if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue is related to a feature in the app playlist Anything to do with playlists in the app
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants