Commit Graph

122 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
JoeLametta
223142f328 Merge pull request #130 from MerlijnWajer/remove-gstreamer
Rip out all code that uses gstreamer
2017-04-23 23:36:28 +02:00
Merlijn Wajer
304c66876b Fix several issues in the gstreamer removal PR
Patch by JoeLametta
2017-04-23 22:32:05 +02:00
Matt Robinson
e66ff340d6 Prevent crash if MusicBrainz release date missing
If MusicBrainz returns data for the CD being ripped but no release date
is returned, we attempt to set the DATE tag to None (which is caught by
mutagen).  To resolve this, check if there is a value for release date
before setting.
2017-03-05 20:59:11 +00:00
Clément Bœsch
1775c6a8ec program: do not fetch 4 times MusicBrainz metadata 2017-02-14 21:45:20 +01: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
a1eb3377ea cdrdao no-disc ejection & --eject (#93)
* cdrdao: eject empty disc while reading toc

- introduce EjectError
- move {eject,load,unmount}_device to program.utils

* remove duplicated eject

* remove unnecessary ejection

* add --eject option
2017-01-01 19:41:23 +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
d7f8557426 replace cdrdao.py with much simpler version (#52)
* replace cdrdao.py with much simpler version
* more pythonic syntax for cdrdao.read_toc(fast_toc=) switching
* fix silly typo
2016-10-22 10:32:18 +02: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
JoeLametta
29bcd70b2b Fix musicbrainz-update branch merged pull request
Hopefully this commit fixes JoeLametta/whipper#16
2016-01-12 15:03:48 +01:00
Alexei
8f2158f26a Fixed more references 2015-12-12 10:51:22 -08:00
Alexei
c7b8f95323 Removed mentions of old musicbrainz ngs directory 2015-12-12 10:45:49 -08:00
JoeLametta
735596c401 Improve MusicBrainz results filtering
thomasvs/morituri#140
2015-11-29 16:26:49 +01:00
JoeLametta
9ade743d63 Various short bugfixes
thomasvs/morituri#139
2015-11-29 16:25:38 +01:00
JoeLametta
c29da6cb97 Add experimental overread support (lead-out)
thomasvs/morituri#137
2015-11-29 16:24:16 +01:00
JoeLametta
d83e2fe696 use offset when caching TOC info
thomasvs/morituri#92
2015-11-29 16:19:53 +01:00
Frederik "Freso" S. Olesen
a0232898d9 Save MusicBrainz DiscID to tags. 2014-04-27 18:31:18 +02:00
Thomas Vander Stichele
b461d8a16f Default to 0000 for y when no metadata.
Fixes #53 on github.

Patch by: tlc
2013-12-01 22:29:10 -05:00
Thomas Vander Stichele
120d1b239f work without network 2013-08-04 18:11:13 +02:00
Thomas Vander Stichele
d88d9f9bc6 rename metadata to discMD to be clearer 2013-07-30 11:39:40 +02:00
Thomas Vander Stichele
697aafc21d handle exceptions on verifying empty or half-done tracks 2013-07-22 01:54:00 +02:00
Thomas Vander Stichele
34d58e2b5c more filtering 2013-07-13 22:46:20 +02:00
Thomas Vander Stichele
49d8e9c268 use PathFilter object to filter paths 2013-07-13 18:50:52 +02:00
Thomas Vander Stichele
f93390d1bc pass config to program 2013-07-13 18:37:10 +02:00
Thomas Vander Stichele
7ba5f24f7a we already get the version some other way 2013-07-13 17:32:59 +02:00
thomasvs
eba184e54b Merge pull request #21 from supermanvelo/master
break up logger line; handle encoding for diff
2013-07-13 08:31:42 -07:00
Thomas Vander Stichele
27030a9842 fix output 2013-07-04 00:47:15 +02: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
ee99d833a7 rename our musicbrainzngs.py to mbngs.py
Helps Debian package which prefers to strip out our copy of
musicbrainzngs
2013-03-05 16:12:52 +01:00
Velo Superman
7e3d7f0ab7 return cdrdao version used 2013-03-03 17:55:10 +01:00
Velo Superman
d7848cd34c break into two lines to separate logger problems from morituri 2013-03-01 19:32:15 +01:00
Thomas Vander Stichele
f010fd204c deduplicate rip directories with catalog number or barcode 2013-02-05 19:42:36 +01:00
Thomas Vander Stichele
6e3953e15f remove unused path 2013-02-03 23:18:42 +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
1e9afffde6 extract code into program.getFastToc 2013-02-03 21:07:28 +01:00
Thomas Vander Stichele
b2fc111a9a debug more 2013-02-03 20:57:32 +01:00
Thomas Vander Stichele
db128485eb add some whitespace betwee nreleases 2013-02-03 17:27:34 +01:00
Thomas Vander Stichele
131cc78c39 add how many tracks the disc is 2013-02-03 17:24:12 +01:00
Frederik "Freso" S. Olesen
4040c95817 Add "%X" template variable for uppercase filename extension. 2013-02-01 17:33:19 +01:00
Thomas Vander Stichele
d61b42490e show us the type 2013-01-15 09:27:07 +01:00
Thomas Vander Stichele
090b9656d5 FEATURE: add --working-directory option
morituri will change to this directory before ripping, so
--output-directory is relative to this.
2013-01-13 16:47:48 +01:00
Thomas Vander Stichele
b5827847ef * morituri/common/program.py:
* morituri/rip/cd.py:
	  feature: add %x for extension to track/disc template.
2012-12-22 23:09:09 +00:00
Thomas Vander Stichele
f987210f6c * morituri/common/program.py:
* morituri/rip/image.py:
	  feature: add %r/%R for release type to track/disc template.
2012-12-22 22:52:48 +00:00
Thomas Vander Stichele
64fb8c9f14 * morituri/common/program.py:
add release id to output.
	* morituri/rip/image.py:
	  add --release-id to rip image retag.  Fixes #96.
2012-12-06 17:42:14 +00:00
Thomas Vander Stichele
0c9d3c552b * morituri/common/program.py:
* morituri/rip/cd.py:
	* morituri/rip/image.py:
	  Add stdout to program.  Use it for getting musicbrainz info.
2012-12-06 16:44:54 +00:00
Thomas Vander Stichele
5ddeca949e move import 2012-12-02 21:57:15 +00:00
Thomas Vander Stichele
b86febb3b1 pep8 fixes 2012-12-02 16:40:46 +00:00
Thomas Vander Stichele
c634dd0e92 * morituri/common/cache.py (added):
* morituri/test/cache (added):
	* morituri/test/cache/result (added):
	* morituri/test/cache/result/fe105a11.pickle (added):
	* morituri/test/test_common_cache.py (added):
	* morituri/common/Makefile.am:
	* morituri/common/program.py:
	* morituri/test/Makefile.am:
	  Extract ResultCache object into separate file.
2012-12-02 16:38:03 +00:00