summaryrefslogtreecommitdiffstats
path: root/Lib/plat-irix5/cdplayer.py
diff options
context:
space:
mode:
authorSjoerd Mullender <sjoerd@acm.org>1992-12-14 13:16:55 (GMT)
committerSjoerd Mullender <sjoerd@acm.org>1992-12-14 13:16:55 (GMT)
commit4fff13faca3a62c439e193331dff4050afcd932d (patch)
tree0b0e5c204b8871b2af25ed58af710493a4075e5e /Lib/plat-irix5/cdplayer.py
parent23bafde01d7a6828d6ce20384b0803f3000b2a30 (diff)
downloadcpython-4fff13faca3a62c439e193331dff4050afcd932d.zip
cpython-4fff13faca3a62c439e193331dff4050afcd932d.tar.gz
cpython-4fff13faca3a62c439e193331dff4050afcd932d.tar.bz2
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.
Diffstat (limited to 'Lib/plat-irix5/cdplayer.py')
-rwxr-xr-xLib/plat-irix5/cdplayer.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/plat-irix5/cdplayer.py b/Lib/plat-irix5/cdplayer.py
index 2839021..deec996 100755
--- a/Lib/plat-irix5/cdplayer.py
+++ b/Lib/plat-irix5/cdplayer.py
@@ -21,6 +21,13 @@ class Cdplayer():
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: