GNOME Bugzilla – Bug 348073
Automatically pick relevant name for new smart playlists
Last modified: 2020-03-17 08:30:43 UTC
If the user hasn't entered a name for a new smart playlist, we could put a good guess for one based on the parameters they have set for the smart playlist so far. For example, if they've choosen 'Artist like Dave' and '> 5 stars' we could put '>5 Star Dave' in the name entry box. Gnome-lovers, please find info on getting the source at http://banshee-project.org/PluginRepository - the Smart Playlists plugin is in the banshee-official-plugins SVN module. Feel free to contact me or e-mail the list for help.
Just so people know, Khusro Jaleel has contacted me and I am helping him solve this bug.
Gabriel: I've added target milestones for 0.11.x. If you can pick one, that'd be great in helping organize things.
I just tested this on SVN and this appears to have not made it into the listed milestone 0.11.2 or SVN.
Yes, that's the bug is still open.
Created attachment 84367 [details] [review] TEST patch 1 OK, this is a TEST patch. It includes name generation code as well as facilitatory code to test the name generation code on existing smart playlists. When you're patched in, start Banshee by typing "banshee --debug" into a terminal. When Banshee launches, press CTRL+SHIFT+S to open BooBuddy. Enter "test_gen_names()" into the interpreter and press enter. The name generator will run on all of your smart playlists and output the result as "<PlaylistName>: <GeneratedName>". You can then edit smart playlists and run test_gen_names() again. Please test this patch! The more tests, the better. If an aberrational name is generated, or if no name is generated when you think one ought to be, then run "test_gen_names_v()" and copy the output of the relevant playlist into a comment on this bug. Be sure to include what you think the name ought to be. Be aware that all artist, album, genre &c. names will appear totally lower-case. This is a technical limitation which will not be a problem in the final patch.
First of all, the output: >>> test_gen_names() Jump & Hard: jump Hip-Hop: hip-hop Singles: (singles) Essential Mix: the essential mix Recently Added: New >>> test_gen_names_v() Jump & Hard: jump (lower(Genre) = 'jump') Hip-Hop: hip-hop (lower(Genre) = 'hip-hop') Singles: (singles) (lower(AlbumTitle) = '(singles)') Essential Mix: the essential mix (lower(AlbumTitle) LIKE '%the essential mix%') Recently Added: New ((strftime("%s", current_timestamp) - DateAddedStamp + 3600) < 604800) >>> Although verbose, I'd like to propose to dress these results up a bit (note that I don't have the most complex smart playlists on earth). Add a touch of human readable description. A genre = Rock playlist could be named "Rock Songs". My "Recently Added" could be named "New Songs" (which it already does, almost). That said, my playlists aren't exactly exciting and I noticed there is *a lot* of code to make these names. I should probably retest them with some more funky examples. I'm going to mark this patch as needs-work, as it's not commit ready (as you said yourself). Good start though, let's see where we can get.
I agree that the names could be less curt. Perhaps "Music" or "Songs" could be appended to the name if it's below a certain number of characters and it's grammatically sensible to do so. I'll do my best to make sure nothing like "Audiobooks Songs" never happens, but fear of that stuff keeps me up at night ;)
Please specify the latest version of banshee you have been able to test this against or let us know that this is no longer a problem. Thank you for helping us keep track of your bug.
It would be trivial to guess a name for a not-smart playlist too: When I select songs from an album, right click and choose to add them to a new playlist, an album name could be used. IIRC Banshee 0.x did that, but 1.x series has a regression on the issue.
(In reply to comment #9) > It would be trivial to guess a name for a not-smart playlist too: > When I select songs from an album, right click and choose to add them to a new > playlist, an album name could be used. ...only if all the tracks are on one album. Not the case for me at all; I use playlists to collect all sorts of music.
> Not the case for me at all I'm pretty sure I'm not the only one user who searches for some artist/album (which should be used later as a name), hits Control-A and creates a playlist :) I know this could be done by creating a smart playlist. But for me (and maybe some other people) the track list is a better way to create playlists, even if they contain only one performer or album, as I can actually see the track list first.
(In reply to comment #11) > > Not the case for me at all > I'm pretty sure I'm not the only one user who searches for some artist/album > (which should be used later as a name), hits Control-A and creates a playlist > :) Right, my point is that a full solution to this will have to work across multiple cases, and is thus rather complex. That said, I imagine that the developers would accept a patch that would account for just one case, like yours with the single-album playlist.
Bulk changing the assignee to banshee-maint@gnome.bugs to make it easier for people to get updated on all banshee bugs by following that address. It's usually quite apparent who is working on a given bug by the comments and/or patches attached.
I just filed bug 602787, which is quite similar, except for dumb playlists (aka not-smart ones). I'd think that whomever decides to tackle this bug could easily port their code to tackle that one...or (maybe) vice versa.
Isn't this one solved, or nofix?
Shouldn't the status of this one be changed to NOTFIX?
(In reply to comment #16) > Shouldn't the status of this one be changed to NOTFIX? Why? As far as I know, this hasn't yet been implemented, but Banshee wouldn't reject a patch providing this functionality. "Low priority enhancement" seems like a fairly accurate status for this bug, unless I'm missing something...
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the responsibility for active development again. See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.