Created
June 3, 2016 18:03
-
-
Save rain0r/4703db1768f58ef8aef26bb9b4385317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/xl/trax/trackdb.py b/xl/trax/trackdb.py | |
index b666c22..59270a3 100644 | |
--- a/xl/trax/trackdb.py | |
+++ b/xl/trax/trackdb.py | |
@@ -322,6 +322,10 @@ class TrackDB(object): | |
""" | |
return [self.get_track_by_loc(loc) for loc in locs] | |
+ def get_random_track(self): | |
+ import random | |
+ return self.tracks[random.choice(list(self.tracks))]._track | |
+ | |
def loc_is_member(self, loc): | |
""" | |
Returns True if loc is a track in this collection, False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment