Commit Graph

161 Commits

Author SHA1 Message Date
Frederik “Freso” S. Olesen
a8af9b79ab s/morituri/whipper/ in GPL copyright blurbs. 2017-04-26 16:09:13 +02:00
Merlijn Wajer
efd75ab110 EncodeTaskFlac -> FlacEncodeTask
Untested.
2017-04-23 23:06:54 +02:00
Merlijn Wajer
e7767694af Rip out all code that directly uses gstreamer
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.
2017-02-09 23:05:34 +01:00
Merlijn Wajer
6ddb5d0114 Add gstreamer-less flac encoder and tagging (#121)
* 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
2017-02-02 21:50:47 +01:00
Samantha Baldwin
976e1bdca2 remove configure.configure, use __version__, remove getRevision() (#94)
* remove configure.configure, use __version__, remove getRevision()

* remove empty configure/ directory

* remove morituri.configure imports
2016-12-31 16:41:18 +01:00
Samantha Baldwin
d1ed80d62a argparse & logging (#92)
* 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
2016-12-20 23:11:30 +01:00
Samantha Baldwin
d455b77e8a Merge pull request #80 from chrysn-pull-requests/error-reporting-enhancements-noassert
Error reporting enhancements (conditional-raise-instead-of-assert version)
2016-12-15 15:37:31 -05:00
Samantha Baldwin
a443f3006b Merge pull request #67 from chrysn-pull-requests/sox-audiolengthtask
Use soxi instead of gstreamer to determine a track's length
2016-12-15 15:00:07 -05:00
chrysn
6581812d19 image: add check to give more meaningful error message 2016-11-29 13:30:11 +01:00
chrysn
ba10b573a2 Use soxi instead of gstreamer to determine a track's length
Contributes-To: https://github.com/JoeLametta/whipper/issues/29
2016-11-29 12:56:18 +01:00
Samantha Baldwin
39aa68909e do not recalculate musicbrainz disc id for every getMusicBrainzDiscId() call (#69) 2016-11-08 13:16:52 +01:00
Samantha Baldwin
063876b575 use setuptools, remove autohell, use raw make for src/ 2016-10-19 17:54:01 -04:00
Merlijn Wajer
bce359f9d5 Use Fast version of AccurateRipChecksumTask
There are still some changes required to make whipper handle ARv2 checksums,
currently doesn't call the Task for a V2 checksum. V1 should keep working as-is.
2016-10-15 19:15:27 +02:00
Samantha Baldwin
b97e0a72e3 PRE_EMPHASIS (#27)
* update README to force python2

* add support for PRE_EMPHASIS detection; mark pre-emphasis as FLAGS PRE in .cue

* correct typo, s/ivar/type/ for pre_emphasis element in track table
2016-07-24 22:43:29 +02:00
JoeLametta
ed4c9f4ece Convert 'Morituri' to 'morituri' (cue sheet)
The ripper name in the log file is written all lowercase: do the same
in the cue sheet too.
Short cosmetic fixes for 'logger.py'
2015-11-30 13:26:04 +01:00
JoeLametta
9ade743d63 Various short bugfixes
thomasvs/morituri#139
2015-11-29 16:25:38 +01:00
Frederik "Freso" S. Olesen
d81dd339c1 Resolve musicbrainz.org/{bare/cdlookup.html -> cdtoc/attach} redirect. 2014-11-02 11:17:51 +01:00
Frederik "Freso" S. Olesen
926ce46c8d Use HTTPS for musicbrainz.org. 2014-11-02 03:03:13 +01:00
Frederik "Freso" S. Olesen
f08d0a28ca Remove traces of mm.musicbrainz.org.
See
http://chatlogs.musicbrainz.org/musicbrainz-devel/2014/2014-11/2014-11-02.html#T01-18-50-32205
2014-11-02 03:01:38 +01:00
Samantha Baldwin
38cf1f0753 Show morituri version in cue and update TODO. 2014-05-26 00:11:08 -04:00
Thomas Vander Stichele
354bd7744f fix so first FILE goes before TRACK 01 and possible PREGAP 2013-08-24 13:58:21 +02:00
Thomas Vander Stichele
1141f5e27c add type doc 2013-08-24 02:41:21 +02:00
Thomas Vander Stichele
abc03e8e43 since the cached results have wrong (negative) relative for index > 01,
make sure we don't use the cache by upping the version
2013-08-24 02:41:21 +02:00
Thomas Vander Stichele
bcd350f768 use a common _index method for all cases 2013-08-24 02:41:00 +02:00
Thomas Vander Stichele
61fdb2c332 move some assignments around to be more logical 2013-08-24 02:40:20 +02:00
Thomas Vander Stichele
ddea002a8f also add source for DATAFILE 2013-08-24 02:40:20 +02:00
Thomas Vander Stichele
b59bf8f98a make sources an object property 2013-08-24 02:40:20 +02:00
Thomas Vander Stichele
38193c7f0c add/fix debug 2013-08-24 02:40:20 +02:00
Thomas Vander Stichele
2200776b30 update debug 2013-08-24 02:40:20 +02:00
Thomas Vander Stichele
e3e3a87547 WIP: try to set relative offset correctly based on sources 2013-08-24 02:40:20 +02:00
Thomas Vander Stichele
2c23418490 now take relative from currentFile 2013-08-24 02:40:20 +02:00
Thomas Vander Stichele
142fa9e33e create index with the correct path by using sources 2013-08-24 02:38:39 +02:00
Thomas Vander Stichele
73a7056d85 handle index 00 of track 1 specially 2013-08-24 02:38:39 +02:00
Thomas Vander Stichele
f11672fd3d add a Source object, but don't use it yet 2013-08-24 02:38:39 +02:00
Thomas Vander Stichele
7118555a7f add doc 2013-08-24 02:38:39 +02:00
Thomas Vander Stichele
1271ccea18 Set start and length properly on File 2013-08-24 02:38:39 +02:00
Thomas Vander Stichele
879dd7f946 reset relative offset on SILENCE/ZERO 2013-08-24 02:38:39 +02:00
Thomas Vander Stichele
330b2dcb6c make track/index debug uniform 2013-03-05 17:07:36 +01:00
Thomas Vander Stichele
307db4f59f update logging; bump classVersion of Table
now table will get a logName set correctly when unpickled too
2013-03-05 16:59:38 +01:00
Thomas Vander Stichele
55a2325e1e add debugging, comments and documentation 2013-03-01 18:50:43 +01:00
Thomas Vander Stichele
e3b168c2a1 key on musicbrainz disc id by default
Do not use cache if the mb disc id does not match the table cache value.

Fixes asserts on the mb disc id differing.

Fixes trac ticket 103.
2013-02-03 22:20:00 +01:00
Thomas Vander Stichele
7b42cbf93b add debug 2013-02-03 20:57:32 +01:00
Thomas Vander Stichele
4a24671bce better debugging when sampleLength is claimed unknown 2013-01-18 19:36:38 +01:00
Thomas Vander Stichele
99936325ae rename frame to sample to avoid confusion with cd frames 2013-01-18 19:30:13 +01:00
Thomas Vander Stichele
20cb0b3180 debug better 2013-01-18 19:24:09 +01:00
Thomas Vander Stichele
cba7dbe41a pep8 fixes 2012-11-29 19:54:46 +00:00
Thomas Vander Stichele
55df17cf89 * morituri/image/cue.py:
* morituri/image/table.py:
	* morituri/image/toc.py:
	  Fix pychecker warnings.
2012-11-23 15:36:27 +00:00
Thomas Vander Stichele
9b4e653ae4 * morituri/common/common.py:
* morituri/common/program.py:
	* morituri/image/table.py:
	* morituri/rip/cd.py:
	* morituri/test/test_common_common.py:
	* morituri/test/test_image_toc.py:
	  Handle cases where disc_template and track_template are not in
	  the same directory.
2012-11-22 23:20:44 +00:00
Thomas Vander Stichele
794a4c3f5c * morituri/common/common.py:
* morituri/image/cue.py:
	* morituri/image/toc.py:
	  factor out getRealPath
2012-11-19 08:56:17 +00:00
Thomas Vander Stichele
56f1de4c5c * morituri/image/toc.py:
* morituri/test/test_image_toc.py:
	  Add test for getRealPath.  Fix bug found by it for absolute paths.
2012-11-19 08:50:09 +00:00