Commit Graph

30 Commits

Author SHA1 Message Date
Thomas Vander Stichele
9905dbad75 * morituri/common/task.py:
Add a __main__ example using DummyTask.
2009-04-19 22:01:39 +00:00
Thomas Vander Stichele
cfeedbca3c * morituri/common/task.py:
Make sure we also show progress when it's 0%, at the start.
2009-04-19 21:48:23 +00:00
Thomas Vander Stichele
26bfe85631 * examples/gtkchecksum.py:
* morituri/common/checksum.py:
	  Final crc->checksum fixes.
2009-04-15 13:41:15 +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
1dffa8ec42 add comment 2009-04-15 13:32:10 +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
13a9f81550 * morituri/common/crc.py:
Actually return the CRC when checking frame 5.
	* morituri/test/test_image_image.py:
	  Update test for this fix.
2009-04-14 20:19:27 +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
b7eb47325e * morituri/common/task.py:
Schedule the start from the main loop, otherwise the
	  task might complete before we're in the main loop,
	  and then the loop.quit() doesn't work.
2009-04-12 10:18:56 +00:00
Thomas Vander Stichele
d47402af60 * examples/gtkcrc.py:
* morituri/common/task.py:
	  Move the gtk-based progress bar to task.
2009-04-12 08:58:36 +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
10647d18a1 * morituri/common/task.py:
Update the docs.
2009-04-12 08:34:44 +00:00
Thomas Vander Stichele
6804df4b73 * morituri/common/task.py:
clear with whitespace.
2009-04-11 21:57:25 +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
eda9968703 * examples/gtkcrc.py:
* morituri/common/task.py:
	  Add task object to listener interface methods.
2009-04-11 16:42:04 +00:00
Thomas Vander Stichele
6234b08a2f * morituri/common/task.py:
Move methods around.
2009-04-11 16:38:41 +00:00
Thomas Vander Stichele
8345938584 * examples/ARcue.py:
* examples/gtkcrc.py:
	* morituri/common/crc.py:
	* morituri/common/task.py:
	  Split out generic task/runner from CRC tasks.
2009-04-11 15:40:03 +00:00
Thomas Vander Stichele
2e93bfb988 * morituri/common/crc.py (added):
Copy from task.py before splitting.
2009-04-11 15:36:02 +00:00
Thomas Vander Stichele
1a02c32fc1 * examples/gtkcrc.py:
* morituri/common/task.py:
	  Don't block the main loop by infinitely scheduling
	  set_state.
2009-04-11 14:58:42 +00:00
Thomas Vander Stichele
8486ee782b * examples/ARcue.py:
* examples/gtkcrc.py:
	* morituri/common/task.py:
	  Make a real Task interface and use it.
	  Make runners reusable for multiple tasks.
	  gtkcrc.py seems to be blocking updates however.
2009-04-11 14:46:19 +00:00
Thomas Vander Stichele
7860fe275b * examples/ARcue.py:
Error out when the file doesn't exist.
	* morituri/common/task.py:
	  Drag the lake.
	  Clean up prints.
2009-04-11 12:54:45 +00:00
Thomas Vander Stichele
43acc5b6f5 * morituri/common/task.py:
Remove queue to avoid race.
	  Remove prints.
	  Clean up debug.
	  Update progress after handling buffers.
2009-04-11 11:17:47 +00:00
Thomas Vander Stichele
fcfd128431 remove debugging output 2009-04-10 14:20:31 +00:00
Thomas Vander Stichele
9488415ce7 * morituri/common/task.py:
Introduce constants for FRAMES_PER_DISC_FRAME
	* examples/ARcue.py:
	  Use the constant.
	  Get the CRC right for the last track too.
2009-04-05 16:17:31 +00:00
Thomas Vander Stichele
18631a0fb6 * examples/ARcue.py:
* morituri/common/task.py:
	  Use an adapter to assemble CD frames.
	  Take into account special rules for first and last track.
	  Mention some bugs.
	  Remember to drag the lake from the task.
2009-03-26 14:23:25 +00:00
Thomas Vander Stichele
271bca108f * examples/ARcue.py:
* morituri/common/task.py:
	  First version that seems to get some AccurateRip checksums right.
2009-03-22 15:07:42 +00:00
Thomas Vander Stichele
370b48c659 add sync runner.
add error check for not getting all samples.
2009-03-02 08:42:43 +00:00
Thomas Vander Stichele
7e1c8aac31 * morituri/common/task.py (added):
Add a task abstraction.
2009-02-28 13:43:04 +00:00
Thomas Vander Stichele
fcd9b22e5d add inits 2009-01-06 11:44:40 +00:00