Commit Graph

49 Commits

Author SHA1 Message Date
Thomas Vander Stichele
2f384d32cd * morituri/image/toc.py:
Add some debugging.
2009-05-15 08:09:04 +00:00
Thomas Vander Stichele
5cae5cf60f * morituri/image/table.py:
Update .cue writing:
	  - customise program name
	  - add DISCID
	  - use counter for FILE lines
	  - put FILE line before TRACK if track does not have INDEX 00
	  Take counter into account for setFile
	* examples/readdisc.py:
	  Add --track-template.
	  Pass counter to setFile.
2009-05-15 08:08:22 +00:00
Thomas Vander Stichele
0c5373851f * morituri/image/table.py:
Add CDText writing to .cue() method.
	* morituri/image/toc.py:
	  Add CDText parsing.
	* morituri/test/test_image_toc.py:
	* morituri/test/breeders.cue (added):
	  Add a test for cue'ing the breeders' toc.
2009-05-14 08:55:08 +00:00
Thomas Vander Stichele
82db5d3b1d * morituri/image/table.py:
* morituri/image/toc.py:
	  Add parsing of ISRC codes.
	  Add first part of CDTEXT stuff.
	* morituri/test/test_image_toc.py:
	  Add test for converting .toc to .cue
	* morituri/test/cure.cue
	  Add reference for converted cure.toc
2009-05-14 08:21:28 +00:00
Thomas Vander Stichele
54d4cecd34 * morituri/image/table.py:
* morituri/test/test_image_table.py:
	  Correctly calculate MusicBrainz disc id for enhanced cd's.
2009-05-07 15:06:37 +00:00
Thomas Vander Stichele
e5ad3bde58 * morituri/common/task.py:
* morituri/image/image.py:
	  Remove prints.  Describe tasks.
2009-05-07 11:11:22 +00:00
Thomas Vander Stichele
9b1fc33003 * morituri/image/table.py:
* morituri/image/toc.py:
	  Delete old code.
2009-05-06 08:55:28 +00:00
Thomas Vander Stichele
049496a8b1 * morituri/image/toc.py:
* morituri/test/test_image_toc.py:
	* morituri/test/test_program_cdrdao.py:
	  After careful vetting, fix up the expected values after toc parsing.
	  Fix (untested) INDEX handling.  Fix handling of START.
2009-05-05 22:40:26 +00:00
Thomas Vander Stichele
9992fb267f * morituri/image/table.py:
* morituri/test/test_image_table.py:
	  Implement MusicBrainz disc id.  Works for audio-only discs,
	  have to figure out why it fails for an Enhanced CD like the
	  Ladyhawke one.
2009-05-05 18:46:11 +00:00
Thomas Vander Stichele
2f464207db * morituri/image/table.py:
Add logging.
	  Add methods to clear a table of files, and to absolutize indexes
	  as long as the source is the same file, and to set a File on a
	  given index, adjusting all following indexes that match the
	  duration, and check if the IndexTable has all information for a TOC.
	* morituri/image/toc.py:
	  Add logging.
	  Use a counter for the source.
	  Fix up index offset calculation.
	* morituri/program/cdrdao.py:
	  Use a real IndexTable as the result, instead of a TocFile.
	* morituri/image/cue.py:
	  Use a real IndexTable to store tracks.
	* morituri/test/test_image_toc.py:
	  The toc file now has a table which has the tracks.
	  Fix the tests to adjust for wrong index calculations.
	* morituri/test/test_image_cue.py:
	* morituri/test/test_image_image.py:
	* morituri/image/image.py:
	  The cue file now has a table which has the tracks.
	* morituri/test/test_image_table.py:
	  Add assertions to make sure when the table can serve as a TOC.
	* examples/readdisc.py:
	  Adjust for changes.  Fix up to include AccurateRip results.
	  First time we can do a complete normal rip including verifying
	  against AccurateRip results!
2009-05-05 10:01:41 +00:00
Thomas Vander Stichele
a5d70dd317 * examples/readdisc.py:
* morituri/image/table.py:
	* morituri/test/test_image_table.py:
	  Fix up and deprecate stuff.
2009-05-04 23:10:39 +00:00
Thomas Vander Stichele
c17a28d7ae * examples/movecue.py:
* examples/readcue.py:
	* morituri/image/cue.py:
	* morituri/image/image.py:
	* morituri/image/toc.py:
	* morituri/program/cdrdao.py:
	* morituri/test/test_image_cue.py:
	* morituri/test/test_image_toc.py:
	  Cue -> CueFile
	  TOC -> TocFile
2009-05-04 16:01:19 +00:00
Thomas Vander Stichele
2dbd307096 docs and repr fixes 2009-05-04 15:58:12 +00:00
Thomas Vander Stichele
22e81b4665 * morituri/image/cue.py:
* morituri/image/image.py:
	* morituri/image/table.py:
	* morituri/program/cdparanoia.py:
	* morituri/test/test_image_cue.py:
	  Move to using a shared IndexTable for everything.
	  Sadly mixed with a MultiTask rename.
2009-05-04 08:40:42 +00:00
Thomas Vander Stichele
6e2e58a373 * morituri/image/cue.py:
* morituri/test/test_image_cue.py:
	  Add dumping of .cue files.
2009-05-03 19:18:26 +00:00
Thomas Vander Stichele
c592e00425 add repr 2009-05-03 12:57:44 +00:00
Thomas Vander Stichele
d85dc31e12 doc fix 2009-05-03 09:53:44 +00:00
Thomas Vander Stichele
881019b844 debug fix 2009-05-03 09:53:36 +00:00
Thomas Vander Stichele
076644b879 * morituri/common/task.py:
* morituri/image/image.py:
	  Add some debugging.
2009-05-02 09:27:14 +00:00
Thomas Vander Stichele
d76e0a3495 * morituri/common/common.py:
Create some common functions to parse MSF and back.
	* morituri/image/toc.py:
	  Use it here.
2009-05-01 18:29:39 +00:00
Thomas Vander Stichele
beb45e4546 * morituri/image/toc.py:
* morituri/test/test_image_toc.py:
	* morituri/test/bloc.toc (added):
	  Fix up .toc parsing to correct index 0 behaviour.
	  Add Bloc Party's Silent Alarm .toc file to test HTOA.
2009-05-01 12:29:48 +00:00
Thomas Vander Stichele
f2b6991dbe * morituri/test/test_image_toc.py (added):
* morituri/image/toc.py (added):
	  Add first stab at .toc parsing.
2009-04-27 22:18:03 +00:00
Thomas Vander Stichele
4982f588c7 * morituri/image/image.py:
* morituri/image/table.py:
	* morituri/test/test_image_image.py:
	* morituri/test/test_image_table.py:
	  Rename toc.TOC to table.Table
2009-04-27 22:15:51 +00:00
Thomas Vander Stichele
5df66ce231 * morituri/test/test_image_table.py (added):
* morituri/image/table.py (added):
	* morituri/test/test_image_toc.py (deleted):
	* morituri/image/toc.py (deleted):
	  Move files around in preparation for the .toc file parsing.
2009-04-27 22:02:07 +00:00
Thomas Vander Stichele
c4f22acda5 * morituri/test/kanye.cue (added):
Add a cue test with mixed mode.
	* morituri/image/cue.py:
	* morituri/test/test_image_cue.py:
	  Handle it properly.
2009-04-26 11:19:03 +00:00
Thomas Vander Stichele
03ef79ec84 * morituri/image/cue.py:
getRealPath should be here, it doesn't need anything outside
	  the .cue file
	* morituri/image/image.py:
	  Proxy it here.
2009-04-25 16:06:23 +00:00
Thomas Vander Stichele
18fcc1b813 * morituri/common/task.py:
* morituri/image/image.py:
	  Move MultiTask to the task module.
2009-04-20 21:34:51 +00:00
Thomas Vander Stichele
68b6db9e10 * morituri/image/cue.py:
Use names for matches in regexps.
2009-04-19 21:47:18 +00:00
Thomas Vander Stichele
587f1a45dd * examples/ARcue.py:
* morituri/common/checksum.py:
	* morituri/image/image.py:
	* morituri/image/toc.py:
	* examples/gtkchecksum.py (added):
	* examples/gtkcrc.py (deleted):
	  More crc->checksum changes.
2009-04-15 13:39:16 +00:00
Thomas Vander Stichele
b63ef021a7 * examples/ARcue.py:
* morituri/common/checksum.py:
	* morituri/image/image.py:
	* morituri/test/test_image_image.py:
	  Change crc to checksum everywhere.
2009-04-15 13:31:35 +00:00
Thomas Vander Stichele
9b5050d221 * morituri/image/image.py:
* morituri/image/toc.py:
	* morituri/common/checksum.py (added):
	* morituri/common/crc.py (deleted):
	  Rename crc to checksum, because AccurateRip checksums are not CRC's.
2009-04-15 13:23:45 +00:00
Thomas Vander Stichele
1abeac8dcf * examples/ARcue.py:
* morituri/image/image.py:
	* morituri/test/test_image_image.py:
	  Make everything use TOC for the id's.
2009-04-15 13:20:56 +00:00
Thomas Vander Stichele
065754d5d1 * morituri/image/image.py:
Refactor to use TOC class.
	* morituri/image/toc.py:
	  Fully document.
2009-04-15 12:45:22 +00:00
Thomas Vander Stichele
02edffa629 * morituri/test/test_image_toc.py (added):
* morituri/image/toc.py (added):
	  Add an abstraction for a TOC.
	  Take data tracks into account correctly for CDDB and AccurateRip
	  disc ID's.
2009-04-15 12:32:10 +00:00
Thomas Vander Stichele
f865e91526 * morituri/image/image.py:
* morituri/test/test_image_image.py:
	  AccurateRip binary files actually contain multiple responses, so
	  parse all of them.
	* examples/ARcue.py:
	  Handle case of not having a response, and having multiple responses.
2009-04-15 09:35:58 +00:00
Thomas Vander Stichele
bce17ff3a2 * morituri/image/image.py:
Also look for audio file basename relative to cue file.
2009-04-13 20:35:36 +00:00
Thomas Vander Stichele
362d835829 * morituri/image/image.py:
Add an object to parse the response of AccurateRip.
	* morituri/test/test_image_image.py:
	* morituri/test/dBAR-011-0010e284-009228a3-9809ff0b.bin (added):
	  Add a test for it, based on my Kings Of Leon CD.
2009-04-13 18:13:32 +00:00
Thomas Vander Stichele
a8da8d8fa2 * morituri/image/image.py:
Add the 150 frames for the leadin only to the CDDB calculation.
	  Add methods to calculate AccurateRip id's and URL.
	* morituri/test/test_image_image.py:
	  Add tests for it.
	* examples/ARcue.py:
	  Show AccurateRip URL.
2009-04-13 17:27:52 +00:00
Thomas Vander Stichele
ac880acdf1 * examples/ARcue.py:
* morituri/common/crc.py:
	* morituri/image/image.py:
	* morituri/test/test_image_image.py:
	  Calculate CDDB disc id.
	  Tested on my Kings Of Leon CD.
2009-04-12 19:30:57 +00:00
Thomas Vander Stichele
56da05a31c doc and cleanup, add getIndex 2009-04-12 19:30:23 +00:00
Thomas Vander Stichele
919ae5b8e3 * examples/ARcue.py:
* morituri/image/image.py:
	* morituri/test/test_image_image.py:
	  Add a task to verify a disk image, which also calculates
	  track lengths for tracks the cue file doesn't know the length of.
2009-04-12 18:04:30 +00:00
Thomas Vander Stichele
d49b4fbaec * morituri/image/image.py:
Create a MultiTask base class, and make AudioRipCRCTask
	  use it.
2009-04-12 11:06:23 +00:00
Thomas Vander Stichele
27fd2f16e6 * morituri/image/image.py:
* morituri/test/test_image_image.py:
	  Add a task for calculating frame length of an audio file.
	  Add a test for it.
2009-04-12 10:20:14 +00:00
Thomas Vander Stichele
f1d75142da * examples/gtkcrc.py:
* morituri/common/crc.py:
	* morituri/common/task.py:
	* morituri/image/image.py:
	  Add a 'schedule' call to the TaskRunner class, so that we can
	  abstract things like gobject.timeout_add and reactor.callLater
	  Pass the runner to the task in Task.start() so a task can call
	  schedule.
2009-04-12 08:51:13 +00:00
Thomas Vander Stichele
59ebcc85ad * morituri/image/image.py:
If paths are relative, make them relative to cue file.
2009-04-11 21:57:45 +00:00
Thomas Vander Stichele
51851cc67e * examples/ARcue.py:
* morituri/common/task.py:
	* morituri/image/image.py (added):
	  Add an object for handling an Image based on a .cue file.
	  Create a Task for CRC'ing the whole Image.
	  Make the example use this new task instead.
2009-04-11 17:01:40 +00:00
Thomas Vander Stichele
4c2b6e4c74 * morituri/image/cue.py:
publicize CueFile.tracks
	  Add a method to get track lengths
	* examples/readcue.py:
	  Use it.
2009-02-28 13:43:44 +00:00
Thomas Vander Stichele
0daad73e0e add code to read cue files 2009-01-06 11:45:05 +00:00
Thomas Vander Stichele
fcd9b22e5d add inits 2009-01-06 11:44:40 +00:00