After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728331 - Multiple playlist with the same name is allowed
Multiple playlist with the same name is allowed
Status: RESOLVED OBSOLETE
Product: gnome-music
Classification: Applications
Component: general
3.12.x
Other Linux
: Normal normal
: 3.18
Assigned To: gnome-music-maint
gnome-music-maint
: 769866 (view as bug list)
Depends on:
Blocks: 778870
 
 
Reported: 2014-04-16 10:38 UTC by Arnel Borja
Modified: 2018-01-10 14:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
widgets: Select playlist if already exists (1.94 KB, patch)
2014-04-16 11:06 UTC, Arnel Borja
none Details | Review
prevent user from making duplicate playlists (i.e. playlists with the same name) (2.42 KB, patch)
2015-02-17 23:22 UTC, Maia
none Details | Review
Prevent adding playlist with same name - 1 (1.58 KB, patch)
2017-01-11 08:39 UTC, Abhinav Singh
none Details | Review
Prevent adding playlist with same name - 1 (1.58 KB, patch)
2017-01-11 08:40 UTC, Abhinav Singh
none Details | Review
Prevent adding playlist with same name - 2 (1.80 KB, patch)
2017-01-11 08:43 UTC, Abhinav Singh
none Details | Review
Prevent adding playlist with same name (1.61 KB, patch)
2017-02-04 21:38 UTC, Abhinav Singh
reviewed Details | Review
Fix referencing of the playlist variable (1.52 KB, patch)
2017-02-14 20:00 UTC, Soumit Bose
none Details | Review

Description Arnel Borja 2014-04-16 10:38:08 UTC
If we use the name of an existing playlist to create a new playlist, the original playlist gets cleared because it is overwritten.

We shouldn't allow creating a new playlist if the name already exists.

According to Allan Day, we should just select the row for the original playlist if it already exists.
Comment 1 Arnel Borja 2014-04-16 11:06:06 UTC
Created attachment 274446 [details] [review]
widgets: Select playlist if already exists

In Add to Playlist dialog, select the existing playlist if the name for the new playlist already exists.
Comment 2 Vadim Rutkovsky 2014-04-16 13:50:42 UTC
Review of attachment 274446 [details] [review]:

Looks good, but I'd prefer not to commit it before bug 728330 is resolved (as we operate on names here)
Comment 3 Arnel Borja 2014-06-10 15:11:26 UTC
Creating a playlist no longer clears the old one, but we should still prevent creation of a new playlist with name already used since it is confusing.
Comment 4 Arnel Borja 2014-06-10 15:16:19 UTC
Comment on attachment 274446 [details] [review]
widgets: Select playlist if already exists

New patch is in search-playlists branch in GitHub.
Comment 5 Maia 2015-02-17 23:22:27 UTC
Created attachment 297069 [details] [review]
prevent user from making duplicate playlists (i.e. playlists with the same name)
Comment 6 Allan Day 2016-01-06 13:11:27 UTC
Bulk removing the 3.18 target.
Comment 7 Marinus Schraal 2016-10-05 11:34:02 UTC
*** Bug 769866 has been marked as a duplicate of this bug. ***
Comment 8 Marinus Schraal 2016-10-05 19:34:28 UTC
Apologies, this has been lying around for too long. This patch has however bitrotten, so it would be awesome if you could find the time to update it to current git.

I don't think however a notification is what we want to let users know that a name is already taken. We might have to think of another solution there.
Comment 9 Rithvik Patibandla 2016-10-27 12:28:02 UTC
(In reply to Marinus Schraal from comment #8)
> Apologies, this has been lying around for too long. This patch has however
> bitrotten, so it would be awesome if you could find the time to update it to
> current git.
> 
> I don't think however a notification is what we want to let users know that
> a name is already taken. We might have to think of another solution there.

Hi, I am a newcomer and I want to work on this bug. Is anyone else working on it or is it open? And what other solution are you suggesting?
Comment 10 Abhinav Singh 2017-01-11 08:39:04 UTC
Created attachment 343284 [details] [review]
Prevent adding playlist with same name - 1

When creating a repeated playlist, the dialog will highlight the existing playlist and simply disable the create playlist button.

This is can be a good solution to this problem, the users will not allowed to create the playlist with same name, and then they will use the dialog-titlebar- button to add the tracks to the existing playlist.

No need to create the notifications either.
Comment 11 Abhinav Singh 2017-01-11 08:40:29 UTC
Created attachment 343285 [details] [review]
Prevent adding playlist with same name - 1
Comment 12 Abhinav Singh 2017-01-11 08:43:40 UTC
Created attachment 343286 [details] [review]
Prevent adding playlist with same name - 2

When creating a repeated playlist, the dialog will highlight the existing playlist.
If the add playlist button is pressed one more time, then the tracks will be added to existing playlist.

This can work silently, the users will be shown the existing playlist, but for the ease of the users(they won't need to move to the button on above), they can press "Add"(the one on bottom which creates playlist) again to in fact add the tracks to the existing playlist.

This is not necessarily an upgrade to my above patch.
Comment 13 Abhinav Singh 2017-02-04 21:38:24 UTC
Created attachment 344950 [details] [review]
Prevent adding playlist with same name

If creating a repeated playlist, the dialog will highlight the existing playlist and simply disable the create playlist button.
Comment 14 Marinus Schraal 2017-02-13 16:51:16 UTC
Review of attachment 344950 [details] [review]:

The code is fine, thanks.

I'm just not content with the interaction here: enter a name, you get to see the name in the list (selected) and the add button on top is highlighted. It is not obvious if this playlist has just been created or if it is something you are adding to.

Maybe this entrybox should more act like a search while you type kind of thing. Also it should not be possible to create playlists with the names we already have reserved (the static & on-disk playlist). Maybe indicate them by a lock symbol and dimmed or something?

The solution is incomplete I feel and we need some design input here.

That being said, it could be a temporary solution. I'm still a bit on the fence about it.
Comment 15 Soumit Bose 2017-02-14 20:00:34 UTC
Created attachment 345753 [details] [review]
Fix referencing of the playlist variable

In the code submitted by Abhinav Singh, the referencing of the playlist for creating a new playlist was wrong. 

Instead of self.playlist.create_playlist....

It would be self._playlist.create_playlist
Comment 16 Soumit Bose 2017-02-14 20:02:56 UTC
Also I think the bug https://bugzilla.gnome.org/show_bug.cgi?id=778623 affects solving this bug.
Comment 17 GNOME Infrastructure Team 2018-01-10 14:40:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-music/issues/19.