CL.py: adapted to newest version of CL library.
cdplayer.py: It is now also possible to give the CD's TOC as argument
to init(). The TOC is a string consisting of 2 digits giving the
number of tracks and then for each track the length of the track as
number of minutes and number of seconds (2 digits each).
cddb.py: Interface to the .cddb directory. Usage is the same as for
cdplayer.py.
diff --git a/Lib/irix5/cdplayer.py b/Lib/irix5/cdplayer.py
index 2839021..deec996 100755
--- a/Lib/irix5/cdplayer.py
+++ b/Lib/irix5/cdplayer.py
@@ -21,6 +21,13 @@
import string
self.artist = ''
self.title = ''
+ if type(tracklist) == type(''):
+ t = []
+ for i in range(2, len(tracklist), 4):
+ t.append((None, \
+ (string.atoi(tracklist[i:i+2]), \
+ string.atoi(tracklist[i+2:i+4]))))
+ tracklist = t
self.track = [None] + [''] * len(tracklist)
self.id = 'd' + string.zfill(len(tracklist), 2)
for track in tracklist: