GNOME Bugzilla – Bug 374332
Automatic Playlists should have 'Playlist' predicate
Last modified: 2006-11-13 07:50:58 UTC
When creating an Automatic Playlists, one can select based on track name, length, play count, etc. In Apple's iTunes you have the ability to select based on other automatic playlists. It would be cool to have this on Rhythmbox. I recommend having "Song is in Playlist X" or "Song is not in Playlist X" predicates, where X is a playlist (automatic or otherwise). What makes this hard is that there is the possibilty for cycles in automatic playlists. ie. playlist A could have a predicate "Song is in Playlist B", and playlist B could have a predicate "Song is in Playlist A". Cycles should be prohibited in automatic playlists, they cause trouble and I can't think of a good reason why you'd want them. One way to implement this is as follows: When creating/editing an automatic play list check for cycles. If there are any cycles, don't save the playlist and tell the user to choose again. When calculating the contents of automatic playlists, the playlists will have to be ordered. They should be ordered so that if A depends on B, then B should be before A in the ordering. No cycles will guarantee we could do this. You'd then go through each playlist in order and calculate if a track is in it. By ordering the playlists you'd only have to go through all the playlists once. The algorithms for these are well understood graph traversal algorithms, I don't know them offhand, but any introduction to computer sciece text book should have them. I have no idea how automatic playlists are implemented in Rhythmbox, so I'm not sure how to go about this or how easy this would be.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 153286 ***