We can now rip CDs without gstreamer.
This is not the most clean attempt, but I have tried to remove most of the
code that depends on gstreamer. I hope there is not a lot of code left that
depends on code that I have removed - I can at least rip a CD fully.
* Add encoding using Xiph.org 'flac' program.
This adds a FlacEncodeTask that encodes wave files to flac files.
This commit also replaces morituri's EncodeTask with FlacEncodeTask, however, in
morituri, EncodeTask also does the tagging.
FlacEncodeTask will not perform the tagging.
So we will need an extra task for the tagging - this will be added soon.
Meanwhile, do not merge this commit to master yet.
* Add tagging using mutagen.
Replace the gstreamer tagging code with mutagen tagging code.
getTagList is rewritten to return a dictionary of tags, which are then simply
passed to mutagen.
The way it is set up right now is not the best - I don't think it makes sense
for tagging to take place in program/cdparanoia.py ; but this is how the current
code did it.
I suggest that, when we rip out all the gstreamer code, we also move the tagging
to a more sensible place; and then also make the tagging not be an actual
'task.Task'.
* Add gstreamer-less CRC32 version
Only works on wave files at this point. Should not be a problem, I think.
* Use proper musicbrainz tags and ALBUM tag.
* Add mutagen to .travis.yml
* introduce logcommand.Lager, Whipper(); use argparse for whipper image commands, stub logging
* update Lager docstring to mention config.Config()
* make incorrect subcommand and --version work on toplevel command
* migrate accurip show, expand Lager, do not attempt to return from Lager.__init__.
* migrate offset find, add Lager.error
* correct offset find drive symlink handling
* migrate drive
* change Lager.__init__(prog) to arg from kwarg
* but actually
* remove Whipper.usage
* add and use Lager.device_option() context manager
* help I married an axe murderer
* use unified options namespace for entire command tree
* migrate whipper cd without comprehensive config loading
* switch to logging module
- use logging instead of flog for non-extern modules
- use WHIPPER_DEBUG and WHIPPER_LOGFILE env variables
* convert self.log calls to logger.debug
* convert self.error calls to logger.error
* remove log.Loggable, use logger not logging
* Logging conversion continues
- Convert log.* calls to logger.*
- Remove morituri.common.log imports
* remove morituri.common.log from tests
* remove extern/flog, bare minimum Debug conversion
* update README for logging changes
* update soxi to use logging
* refactor Lager for more declarative subcommands
* Refactor Lager.device_option:
- inline into __init__
- throw IOError instead of Exception for missing drives
- remove CommandError checking in rip/main
* rename rip to whipper in rip.main
* convert rip.debug commands
* Rename logcommand.Lager to command.BaseCommand
- remove command.CommandError occurrences
- remove python-command external module
* remove submodules from README, update rclog formatter
* update minor ambiguity in readme for command invocation
* update version number to match setup.py
* remove gitmodules
* update version number in tests as well (boo)
* convert logger.error to logger.critical
* Change morituri.rip to morituri.command
- mv common.command to command.basecommand
- move TEMPLATES used only by rip.cd out of rip.common
- update entry point for command to command.main
* update basecommand documentation
* go pyflaking: import fixing
* replace self.stdout with sys.stdout
* remove BaseCommand.config, alphabetise imports
* convert self.stdXXX leftovers
* convert last getRootCommand to config.Config
* convert last getExceptionMessage's to str
* change musicbrainz useragent to whipper
Add an EmptyError.
* morituri/common/checksum.py:
Set it when we don't get any frames.
* morituri/rip/main.py:
Catch it and stop ripping if this happens.
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.
Actually raise the exception.
* morituri/common/task.py:
Document interface more clearly.
* morituri/test/test_common_checksum.py:
Use tcommon for test.common
Create a GstException to wrap a Gst.GError.
Create a base GstPipelineTask class.
Use it in Checksum and TRM tasks.
Raise and don't proceed to call .paused() when a GstError happens.
Should help debug https://bugs.launchpad.net/bugs/735053
* morituri/test/test_common_checksum.py:
Adapt test.
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.
add quoteParse function to quote properly for gst.parse_launch()
* morituri/common/checksum.py:
Fix single quote problem.
use self.setException()
* morituri/common/encode.py:
Fix single quote problem.
* morituri/image/image.py:
Fix single quote problem.
Reraise gst.QueryError.
* morituri/test/test_common_encode.py:
* morituri/test/test_common_encode.py (added):
Add tests for unicode/single/double quote.
* morituri/test/test_image_image.py:
* morituri/test/test_common_checksum.py:
Add tests for single/double quote.
* morituri/test/common.py:
add twisted-like failUnlessRaises to TestCase that returns
the exception, so we can check wrapped exceptions in TaskException.
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.
* morituri/test/Makefile.am:
* morituri/test/test_common_checksum.py (added):
Add a check to make sure that checksumming an empty file doesn't
hang. Fix the hang.