-
Notifications
You must be signed in to change notification settings - Fork 0
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
feature request: for intelligent play list #4
Comments
This sounds like a niche usecase, and I'm not particularly interested in implementing it myself. However, if someone else wants to implement it I'll gladly accept a pull request. |
If this is something you won't do very often, you can run code such as the following in the IPython Console plugin: import random
import xl.playlist
playlists = ["Playlist A", "Playlist B", "Playlist C"]
take_from_playlists = [4, 3, 3]
playlists = map(exaile.playlists.get_playlist, playlists) # Get the named playlists
playlists = map(list, playlists) # Copy as lists
playlists = map(random.shuffle, playlists) # Shuffle each list
combined = xl.playlist.Playlist("Combined")
combined_set = set() # To check for duplicates
for pl, wanted in zip(playlists, take_from_playlists):
while wanted:
t = pl.pop()
if t not in combined_set:
combined.append(t)
combined_set.add(t)
wanted -= 1
exaile.playlists.save_playlist(combined, True) I haven't tested this code, but it should do what you describe and save the result in a new playlist named "Combined". |
Thanks, but this is something I'll like to do every days! :D |
Sorry if I don't put this feature request in the right place.
I would like new feature for intelligent play list.
Consider for example 3 play list (list A, B, C)
I would like to make a intelligent play list like that:
-max 10 tracks
-4 random tracks from plalist A
-3 random tracks from plalist B
-3 random tracks from plalist C
-and never twice same track
Thank you for this great soft!
The text was updated successfully, but these errors were encountered: