Changeset 452
- Timestamp:
- 22-05-11 13:12:16 (2 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
morituri/rip/cd.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r451 r452 1 2011-05-22 Thomas Vander Stichele <thomas at apestaart dot org> 2 3 * morituri/rip/cd.py: 4 Factor out function to write .m3u lines. 5 1 6 2011-05-22 Thomas Vander Stichele <thomas at apestaart dot org> 2 7 -
trunk/morituri/rip/cd.py
r451 r452 275 275 handle = open(m3uPath, 'w') 276 276 handle.write(u'#EXTM3U\n') 277 278 def writeFile(handle, path, length): 279 u = u'#EXTINF:%d,%s\n' % (length, os.path.basename(path)) 280 handle.write(u.encode('utf-8')) 281 u = '%s\n' % os.path.basename(path) 282 handle.write(u.encode('utf-8')) 283 284 277 285 if htoapath: 278 u = u'#EXTINF:%d,%s\n' % ( 279 itable.getTrackStart(1) / common.FRAMES_PER_SECOND, 280 os.path.basename(htoapath)) 281 handle.write(u.encode('utf-8')) 282 u = '%s\n' % os.path.basename(htoapath) 283 handle.write(u.encode('utf-8')) 286 writeFile(handle, htoapath, 287 itable.getTrackStart(1) / common.FRAMES_PER_SECOND) 284 288 285 289 for i, track in enumerate(itable.tracks): … … 289 293 path = prog.getPath(prog.outdir, self.options.track_template, 290 294 mbdiscid, i + 1) + '.' + profile.extension 291 u = u'#EXTINF:%d,%s\n' % ( 292 itable.getTrackLength(i + 1) / common.FRAMES_PER_SECOND, 293 os.path.basename(path)) 294 handle.write(u.encode('utf-8')) 295 u = '%s\n' % os.path.basename(path) 296 handle.write(u.encode('utf-8')) 295 writeFile(handle, path, 296 itable.getTrackLength(i + 1) / common.FRAMES_PER_SECOND) 297 297 298 handle.close() 298 299
Note: See TracChangeset
for help on using the changeset viewer.
