Commit Graph

72 Commits

Author SHA1 Message Date
Thomas Vander Stichele
0d4971b301 whitespace 2012-11-10 21:41:35 +00:00
Thomas Vander Stichele
2282a39f2b log checksums 2012-11-10 21:30:53 +00:00
Thomas Vander Stichele
f1b827d6c5 add debug 2012-01-23 21:11:03 +00:00
Thomas Vander Stichele
2c27b73d09 * morituri/common/common.py:
Add shrinkPath to write shorter path names.
	* morituri/test/test_common_common.py (added):
	  Add test.
	* morituri/program/cdparanoia.py:
	  Catch ENAMETOOLONG and shrink path.
	* morituri/common/program.py:
	  Update track result's filename if it was shrunk.
	* morituri/rip/cd.py:
	  set the possibly shrunk path on the result.
2011-09-18 15:19:45 +00:00
Thomas Vander Stichele
4fdfb7f58c * morituri/program/cdparanoia.py:
Log properly again.
	  Properly set exception when we can't rename the file.
2011-09-18 09:18:47 +00:00
Thomas Vander Stichele
a8dddb9d70 * morituri/program/cdparanoia.py:
Make sure exceptions don't prevent the task from chaining up
	  to the parent stop() implementation, giving the runner a chance
	  to actually stop.
2011-08-07 17:57:24 +00:00
Thomas Vander Stichele
798a209195 * morituri/extern/task (added):
* morituri/extern/task/taskgtk.py (added):
	* morituri/extern/task/gstreamer.py (added):
	* morituri/extern/task/task.py (added):
	* morituri/common/taskgtk.py (deleted):
	* morituri/common/gstreamer.py (deleted):
	* morituri/common/task.py (deleted):
	  Move task-related modules into an extern directory so other
	  projects can use them.
	* morituri/common/checksum.py:
	* morituri/common/encode.py:
	* morituri/image/image.py:
	* morituri/program/cdparanoia.py:
	* morituri/program/cdrdao.py:
	* morituri/rip/cd.py:
	* morituri/rip/debug.py:
	* morituri/rip/image.py:
	* morituri/rip/main.py:
	* morituri/rip/offset.py:
	* morituri/test/test_common_checksum.py:
	* morituri/test/test_common_encode.py:
	* morituri/test/test_image_image.py:
	  Adapt.  Tests work.
2011-08-05 18:50:51 +00:00
Thomas Vander Stichele
b3bbf55ca2 * morituri/program/cdrdao.py:
Avoid floating point error.
2011-07-20 02:37:00 +00:00
Thomas Vander Stichele
5071034dfb * morituri/program/cdrdao.py:
Fix log output.
	  Do progress output while scanning TOC.
2011-07-09 10:04:59 +00:00
Thomas Vander Stichele
8bc5eff73c * morituri/common/task.py:
add task argument to TaskRunner.schedule so we can get exceptions.
	  Add .schedule method to Task to pass self.
	* morituri/common/checksum.py:
	* morituri/common/encode.py:
	* morituri/common/gstreamer.py:
	* morituri/program/cdparanoia.py:
	* morituri/program/cdrdao.py:
	  Adapt.
2011-05-24 12:51:40 +00:00
Thomas Vander Stichele
b32a534a82 * morituri/program/cdparanoia.py:
Since stop can be same as start, add + 1 to progress calculation.
	  Fiexes #37.
2011-05-22 15:16:00 +00:00
Thomas Vander Stichele
f70ba7cb32 * morituri/program/cdparanoia.py:
* morituri/common/encode.py:
	* morituri/common/program.py:
	* morituri/rip/cd.py:
	  Add action and what args to describe task better.
2011-05-19 00:28:36 +00:00
Thomas Vander Stichele
f8409b29e1 * morituri/program/cdparanoia.py:
cdparanoia can hang indefinitely on scsi read errors.
	  For example, on some drives, when trying negative offsets.
	  Notice them, count them, and fail after 100.
	* morituri/test/test_program_cdparanoia.py:
	* morituri/test/cdparanoia.progress.error (added):
	  Add a test for this output.
2011-03-23 19:40:47 +00:00
Thomas Vander Stichele
b2a74e14c6 * morituri/program/cdparanoia.py:
Extend FileSizeError with an extra message.
	* morituri/rip/offset.py:
	  Print a reasonable warning when we cannot rip with a certain offset.
	  See #57.
2011-03-20 18:32:02 +00:00
Thomas Vander Stichele
322ec7f5e5 add errors properly 2011-01-01 11:29:40 +00:00
Thomas Vander Stichele
4fafb7d148 * morituri/program/cdrdao.py:
Add logCategory to CDRDAO tasks.
	  Remove errors from parser, set them publically on task.
	  Properly raise exceptions on data cd's with correct stack origin.
2010-11-08 20:00:43 +00:00
Thomas Vander Stichele
941db66398 * morituri/program/cdparanoia.py:
Warn about missing cdparanoia too.
2010-06-18 22:28:13 +00:00
Thomas Vander Stichele
0c5e13ce0f * morituri/common/common.py:
Add MissingDependencyException.
	* morituri/program/cdrdao.py:
	* morituri/rip/main.py:
	  Use it to warn about missing cdrdao.
2010-06-18 22:02:53 +00:00
Thomas Vander Stichele
61193a4398 BaseException.message is deprecated so avoid it 2010-04-16 20:59:35 +00:00
Thomas Vander Stichele
710a9ebb35 patch by: Peter Oliver
* morituri/program/cdparanoia.py:
	  Respect umask for encoded files.  Fixes #17.
2010-04-14 22:01:16 +00:00
Thomas Vander Stichele
c34546d70a * morituri/image/table.py:
* morituri/program/cdparanoia.py:
	  Do some 80 character cleanups.
2010-04-09 16:20:41 +00:00
Thomas Vander Stichele
e124c79c64 * morituri/program/cdparanoia.py:
Add some debug.
	* morituri/common/encode.py:
	  Add more debug.
	  Handle the case where peak is full scale, and peakdB thus 0,
	  which triggered not setting self.peak.
2010-04-08 21:06:52 +00:00
Thomas Vander Stichele
22a3554381 * morituri/common/encode.py:
* morituri/common/program.py:
	* morituri/image/image.py:
	* morituri/program/cdparanoia.py:
	* morituri/rip/cd.py:
	* morituri/rip/image.py:
	* morituri/rip/offset.py:
	  Move all gst-using imports inside functions and classes
	  to avoid 'import gst' eating our options.
	  Fixes #12.
2010-04-04 19:29:49 +00:00
Thomas Vander Stichele
5cf823a640 * morituri/program/cdparanoia.py:
explicitize keyword args.
	  Break some 80+ lines.
2009-09-19 11:58:33 +00:00
Thomas Vander Stichele
ce7b5762f7 * morituri/program/cdparanoia.py:
* morituri/rip/offset.py:
	  Another unicode fix.
2009-09-12 17:23:39 +00:00
Thomas Vander Stichele
f3bf6220fb remove code.interact
fix another unicode oversight
2009-09-11 15:50:45 +00:00
Thomas Vander Stichele
d30eb59a66 * morituri/program/cdrdao.py:
Wrap read in an exception handler.
	* morituri/common/task.py:
	  Debug exceptions more.
2009-09-11 15:41:51 +00:00
Thomas Vander Stichele
e6f13ccf84 * HACKING:
Note unicode handling.
	* morituri/test/test_image_image.py:
	* morituri/image/table.py:
	* morituri/program/cdparanoia.py:
	* morituri/common/checksum.py:
	  Use unicode for paths.
	  Use repr for path representation.
	* morituri/test/test_common_checksum.py:
	  Add test for unicode audio file name.
2009-09-11 15:40:44 +00:00
Thomas Vander Stichele
6df7313dc4 * morituri/program/cdrdao.py:
Parse version number.
	* morituri/rip/cd.py:
	  Warn about cdrdao versions with a bug.
	* morituri/test/test_program_cdrdao.py:
	  Test that we can parse the version.
2009-09-05 22:06:02 +00:00
Thomas Vander Stichele
e61a10266d * morituri/program/cdrdao.py:
Handle errors.  Tested by not having a CD in the drive.
2009-07-02 20:36:35 +00:00
Thomas Vander Stichele
0e07a721d1 declare sessions var 2009-06-16 20:50:15 +00:00
Thomas Vander Stichele
d75066d1bb pychecker cleanup 2009-06-07 13:46:26 +00:00
Thomas Vander Stichele
8ef93523e4 * morituri/test/cdparanoia.progress:
Add a shorter test file, 23 seconds.
	* morituri/test/test_program_cdparanoia.py:
	  Update the test to adapt.  Check for track quality.
	* morituri/program/cdparanoia.py:
	  Add a measure of track quality based on the number of reads.
	  Use the [wrote] output for progress updates, a bit more
	  jittery in its output.
	* morituri/rip/cd.py:
	  Set track quality on RipResult.
2009-06-06 11:16:41 +00:00
Thomas Vander Stichele
2b17b8e912 * morituri/program/cdparanoia.py:
* morituri/rip/cd.py:
	  Handle another off-by-one error in the m3u handling.
	  Add a getTagList function.
	  Use it to encode tags.
2009-06-01 12:53:14 +00:00
Thomas Vander Stichele
2f3c0fdcaf * morituri/common/encode.py:
* morituri/program/cdparanoia.py:
	* morituri/rip/cd.py:
	  Clean up the temporary unencoded file.
	  Pass profile as objects to tasks, so that temp files have the right
	  extension.
2009-06-01 09:45:30 +00:00
Thomas Vander Stichele
f33c50cead * morituri/common/encode.py:
* morituri/program/cdparanoia.py:
	  Add encoding profiles, kept simple for now as a class and
	  subclasses.  Use them to encode.  Calculate peak level while
	  encoding, compared to EAC and replaygain's value.
	* morituri/rip/cd.py:
	  Use the encoding profiles, ripping with the right extension.
	  Add a --profile parameter for it.
2009-05-31 23:04:58 +00:00
Thomas Vander Stichele
262801e554 * morituri/rip/cd.py:
Add asserts for comparing id's between the simple toc and
	  the full table.
	  Create the output directory before ripping the htoa.
	  Ignore data tracks for now.
	  Don't fail if we have no AccurateRip responses.
	* morituri/image/table.py:
	  Add a session ivar to Track.
	  Factor in session leadin when calculating track length
	  of last track in a session.
	  add getMusicBrainzSubmitURL()
	  add _getSessionGap() because the session gap size is different
	  for session 2 and all following.
	  Use it in merge() to get offsets right.
	  Fix getAccurateRipURL by only using the audio tracks for the
	  'length in tracks' number
	  Temporarily disable writing out data tracks to a .cue file,
	  since it's not implemented yet.
	  Add canCue to see if we can write a .cue file from the given table,
	  and debug why not if not.
	* morituri/program/cdrdao.py:
	  Rework to rip each session separately instead of using session 9.
	  This fixes session 9 read-toc missing the pregap.
	  Add a simple LineParser for handling output from disk-info.
	  Count tracks relatively for the session, because the output for
	  session 2 for track numbers picks up where session 1 left off.
	  Don't set leadout from TOC printing since for the same reason
	  session 2's leadout is absolute, not relative to start of session.
	  Add a DiscInfoTask.
	  Convert Table and Toc reading tasks to multitasks, first getting the
	  number of sessions, then reading table/toc for each session.
	* morituri/test/test_image_table.py:
	  Fix up MusicBrainz disc id for my Ladyhawke disc.
	  Add AccurateRip URL verification, compared against EAC's.
	* morituri/test/test_image_toc.py:
	  Use two separate session read-toc output files to verify
	  the case of Das Capital.
	  Verify musicbrainz URL.
2009-05-25 14:59:45 +00:00
Thomas Vander Stichele
631b1478b8 * morituri/program/cdparanoia.py:
* morituri/image/image.py:
	  Correctly chain up to parent __init__ for MultiTasks
2009-05-25 14:47:07 +00:00
Thomas Vander Stichele
85e9058594 * morituri/program/cdparanoia.py:
Add copy and test CRC's to object.
2009-05-23 19:47:58 +00:00
Thomas Vander Stichele
3f1ace2ce2 * morituri/program/cdparanoia.py:
* morituri/program/cdrdao.py:
	* morituri/rip/cd.py:
	* morituri/rip/offset.py:
	  Add device argument to ripping/scanning tasks.
2009-05-23 18:14:31 +00:00
Thomas Vander Stichele
41c92fcda4 pychecker fixes 2009-05-22 20:44:10 +00:00
Thomas Vander Stichele
bd17f96022 * RELEASE:
* misc/pycheckerrc:
	* misc/show-coverage.py:
	* morituri/image/Makefile.am:
	* morituri/program/Makefile.am:
	* RELEASE (added):
	* morituri/image/Makefile.am (added):
	* morituri/program/Makefile.am (added):
	* misc/show-coverage.py (added):
	* misc/pycheckerrc (added):
	  more additions
2009-05-22 20:19:55 +00:00
Thomas Vander Stichele
b08c054be9 fix bug caught by pychecker 2009-05-22 20:09:35 +00:00
Thomas Vander Stichele
bedd5d1fc1 use constants 2009-05-22 20:08:36 +00:00
Thomas Vander Stichele
483c7b8a0c * morituri/program/cdrdao.py:
read all sessions by reading session 9.
	* morituri/image/toc.py:
	  Parse ZERO statements properly.
	  Also set absolute offsets when we know them from the .toc file.
	  Properly set audio flag on tracks.
	  FIXME: probably doesn't work if the .toc does not have lengths.
	* morituri/image/table.py:
	  Add some debug to cddb disc id calculation.
	  Fix absolutize function, it was going one index too far.
	  raise ValueError when overriding .absolute with a wrong value.
	* examples/readdisc.py:
	  Show CDDB disc id at the start.
	  Assert when toc and table have different disc id's (to be fixed)
	* morituri/test/test_image_cue.py:
	  Update for having the table already with absolute values.
	* morituri/test/test_image_toc.py:
	  Add Ladyhawke CDDB test, it has a data track.
2009-05-16 19:09:27 +00:00
Thomas Vander Stichele
0a56fc129e * morituri/image/cue.py:
* morituri/image/image.py:
	* morituri/image/table.py:
	* morituri/image/toc.py:
	* morituri/program/cdparanoia.py:
	* morituri/program/cdrdao.py:
	* morituri/test/test_image_cue.py:
	* morituri/test/test_image_table.py:
	  Rename IndexTable to Table.
2009-05-16 09:31:38 +00:00
Thomas Vander Stichele
09fe46ee99 * morituri/image/cue.py:
* morituri/image/image.py:
	* morituri/image/table.py:
	* morituri/image/toc.py:
	* morituri/program/cdrdao.py:
	* morituri/test/test_image_cue.py:
	* morituri/test/test_image_table.py:
	  Rename ITTrack to Track.
2009-05-16 09:29:01 +00:00
Thomas Vander Stichele
59cb5d0dcb * morituri/common/checksum.py:
* morituri/common/common.py:
	* morituri/image/image.py:
	* morituri/image/table.py:
	* morituri/program/cdparanoia.py:
	  Move constants to common
2009-05-16 09:21:55 +00:00
Thomas Vander Stichele
e0ed33b1da * morituri/program/cdparanoia.py:
Fix up track counting so HTOA can be ripped again.
	* examples/readhtoa.py:
	  Fix up example so it works again, tested on Silent Alarm.
2009-05-15 19:42:08 +00:00
Thomas Vander Stichele
36729a4bef * morituri/common/task.py:
Log on runners too.
	* morituri/program/cdrdao.py:
	  Abort if output has ERROR by killing and setting an exception.
2009-05-07 15:05:14 +00:00