Commit Graph

51 Commits

Author SHA1 Message Date
Thomas Vander Stichele
114fb827cc * morituri/common/task.py:
Document and change name of a method.
2011-05-24 10:39:02 +00:00
Thomas Vander Stichele
c5593a4070 add exception to debug 2011-05-23 18:26:56 +00:00
Thomas Vander Stichele
0da5dd0aa1 * morituri/common/checksum.py:
Actually raise the exception.
	* morituri/common/task.py:
	  Document interface more clearly.
	* morituri/test/test_common_checksum.py:
	  Use tcommon for test.common
2011-05-21 11:22:04 +00:00
Thomas Vander Stichele
9fe80e238e * morituri/common/task.py:
Add more debug.
2011-05-19 00:27:20 +00:00
Thomas Vander Stichele
d0c87c3861 add doc 2011-03-15 22:41:08 +00:00
Thomas Vander Stichele
babf47ec1d * morituri/common/task.py:
Add exception traceback for easier debugging.
2010-06-18 21:52:20 +00:00
Thomas Vander Stichele
7515cf9e73 * morituri/common/checksum.py:
Style fixes.
	* morituri/common/common.py:
	  Add functions to convert a gst.TagList to a dict and compare them.
	* morituri/common/task.py:
	  Add setAndRaiseException which gives us an appropriate
	  exceptionMessage as if we raised where we called this new function.
2010-04-13 21:53:43 +00:00
Thomas Vander Stichele
f978907fcf * morituri/common/task.py:
* morituri/image/cue.py:
	  Add logCategory.
	* morituri/image/image.py:
	  If subtasks had an exception, retrigger the exception and stop.
2010-04-05 23:31:34 +00:00
Thomas Vander Stichele
8ea1dc025d * morituri/image/image.py:
Fix AudioLengthTask for the case where we don't have the decoder,
	  by instead of doing get_state, waiting for an ASYNC_DONE or ERROR
	  message.  Properly raise a gst.GError in that case.
	* morituri/common/task.py:
	  Add some debug.
	* morituri/test/test_image_image.py:
	  After this fix, we now catch the TYPE_NOT_FOUND because of an
	  empty stream instead of the later gst.QueryError.
	* morituri/test/test_common_encode.py:
	  Let us know what it is if not a gst.QueryError.
2010-04-05 23:20:40 +00:00
Thomas Vander Stichele
6ae35a7a08 * morituri/common/task.py:
Wrap exceptions during tasks in a TaskException, storing the
	  message, for improved error reporting later on.
2010-04-04 23:10:44 +00:00
Thomas Vander Stichele
757c3aba15 * morituri/common/task.py:
Add exceptionMessage on Task to store the result of
	  log.getExceptionMessage when the stack is still valid.
2009-10-16 21:39:19 +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
ac9d8f194d * morituri/common/task.py:
Make SyncRunner wrap start() so we correctly handle any
	  exception being thrown.
2009-09-11 12:08:02 +00:00
Thomas Vander Stichele
b9bc3ba154 * morituri/common/task.py:
Document better.
	  Create an ITaskListener interface where we can document.
	  Log some more.
2009-07-02 20:34:50 +00:00
Thomas Vander Stichele
05dfeaa3a2 * morituri/common/task.py:
Add debug.
	* morituri/rip/drive.py:
	  Show all drives, not just the ones that happen to have an Audio CD
	  inserted.
2009-05-26 21:30:49 +00:00
Thomas Vander Stichele
ed7d5cedad * morituri/common/task.py:
Add documentation.
	  Use a _task counter instead of duplicating tasks to
	  __tasks; this allows us to add tasks after starting.
	  Catch Exceptions during next() so that we don't get
	  stuck in a main loop that doesn't exit.
	  Raise it later when we're done.
2009-05-25 14:51:00 +00:00
Thomas Vander Stichele
0431cbe148 add a debug line 2009-05-16 07:31:57 +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
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
c06814e139 * morituri/common/task.py:
Add an exception ivar for tasks to set an exception on while
	  running.  Make SyncRunner raise it during done()
	* morituri/program/cdparanoia.py:
	  Set an exception if the ripped file doesn't match the expected size
	  (for example when disc is full)
2009-05-07 09:19:41 +00:00
Thomas Vander Stichele
d7f1f0a87a * morituri/common/task.py:
Distinguish more clearly between MultiSeparateTask and
	  MultiCombinedTask.
2009-05-03 20:25:28 +00:00
Thomas Vander Stichele
836a3beea1 * morituri/common/task.py:
Make SyncRunner clear previous description/progress task by
	  tracking longest output given up to now.
2009-05-03 18:07:22 +00:00
Thomas Vander Stichele
d1c3bb3def * morituri/program/cdparanoia.py:
Add a task to read and verify a track.
	* examples/readtrack.py:
	  Use it to clean up code.
	* morituri/common/task.py:
	  describe a MultiTask better.
2009-05-03 17:44:23 +00:00
Thomas Vander Stichele
fc907f1953 * morituri/common/task.py:
* morituri/common/taskgtk.py:
	  Split off GtkProgressRunner in separate module to not import gtk
	  everywhere.
	* examples/ARcalibrate.py:
	* examples/ARcue.py:
	* examples/gtkchecksum.py:
	* examples/trm.py:
	  Adapt.
2009-05-03 10:20:22 +00:00
Thomas Vander Stichele
1529c2a082 change progress notify to log 2009-05-03 09:54:21 +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
4367038f6c * morituri/common/task.py:
Make task subclass log.Log
2009-05-01 08:13:51 +00:00
Thomas Vander Stichele
837005d565 * morituri/common/task.py:
Allow a SyncRunner to be constructed with verbose too.
	  Separate a 'running' verbose mode from that.
	  Fixes unwanted test output.
	* morituri/test/test_image_image.py:
	  Run without verbosity.
2009-04-25 10:02:51 +00:00
Thomas Vander Stichele
a9ec95e56d * morituri/common/task.py:
Add a 'described' method so listeners can get proper notification
	  of description changes, and update their description in between
	  progress changes.
	  Add a MultiCombinedTask that reports on progress over all tasks
	  combined.
	* examples/trm.py:
	  Add a playlist option to the example.  Still needs to store results
	  to pickles, preferably after each completed task.
	* morituri/common/checksum.py:
	  Add audioconvert to make sure we can trm ogg files.
2009-04-20 22:20:07 +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
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
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
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