Commit Graph

404 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
JoeLametta
ede0f32b19 Fix MusicBrainzngs overly verbose warning message
Fixes #131.
2017-02-12 20:35:49 +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
Matt Robinson
3f9cc77e30 Persist False value for defeat_cache correctly
If cdparanoia can't work around the audio caching of a drive,
defeats_cache = False is written to the config.  However, when it is
read back the string 'False' ends up being converted to True (as it is
not an empty string).

This corrects the behaviour when reading the value back and adds tests
to make sure that both True and False can be correctly retrieved from
the config.
2016-12-31 17:48:21 +00: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
bccba71b42 refactor morituri.common.directory to shed Directory() and bulk 2016-11-02 17:52:14 -04: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
Samantha Baldwin
063876b575 use setuptools, remove autohell, use raw make for src/ 2016-10-19 17:54:01 -04:00
Samantha Baldwin
b2ca3167eb Sox (#48)
* 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
* add SoxPeakTask, program/sox module, sox.peak_level()
* use sox peak detection in lieu of gstreamer
2016-10-17 15:42:17 +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
Merlijn Wajer
9ae279c811 Add and use FastAccurateRipChecksumTask 2016-10-15 19:15:27 +02:00
JoeLametta
8b5ce57fcd Definitive fix to getConfig
Previous commit was wrong.
2016-10-14 23:46:30 +02:00
JoeLametta
985cf2d288 Fix previous commit
Configuration file path was declared but never explicitly created (even when not available).
Should be fixed now.
2016-10-14 23:37:17 +02:00
JoeLametta
746dc6599d Issue24 (#42)
* Address issue #24
* Remove getReadCaches() & replace it with getCache()

Now whipper always follows XDG specifications. All changes were documented into the README file.

The changes introduced here aren't backward compatible so, after updating whipper, you may need to configure it again (old config file are retained, though).
2016-10-09 17:26:06 +02:00
JoeLametta
38810796ba Remove thomasvs' python-deps (#31)
* Crude removal of thomasvs' python-deps
* Fix previous commit
2016-08-27 17:33:18 +02:00
JoeLametta
0a142036ef Improve musicbrainzngs' results handling
Changes:

* whipper is now capable of handling musicbrainzngs’ bad server
responses (it throws an exception).
* whipper is now aware of musicbrainzngs’ possible “cdstub” response
and should handle it fine (ignoring the result because the informations
received are incomplete e/o unverified).

This commit should fix JoeLametta/whipper#22
2016-06-14 22:42:09 +02:00
Chad Bergeron
8ff28da4fc clean up unnecessary return. 2016-02-02 16:24:24 -05:00
Chad Bergeron
0da064fe97 Modified str outputs and ensured that tracks with no peakdB set trackResult.peak to a float. 2016-02-02 16:14:26 -05: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
ace8d5ac22 Improve morituri configuration handling, help
thomasvs/morituri#141
2015-11-29 16:28:06 +01: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
926ce46c8d Use HTTPS for musicbrainz.org. 2014-11-02 03:03:13 +01:00
Frederik "Freso" S. Olesen
a0232898d9 Save MusicBrainz DiscID to tags. 2014-04-27 18:31:18 +02:00
Thomas Vander Stichele
c6161b35f9 use describe --all to always get a description 2014-03-26 09:44:19 -04: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
aec75861be Use newer lamemp3enc element
This fixes trac issue 45 and adapts pull request 42 on github
2013-11-23 16:57:33 -05:00
Thomas Vander Stichele
8a8189fa89 make profiles loggable 2013-11-23 16:57:33 -05:00
Thomas Vander Stichele
fc282df8a6 start with a one frame interval until we know more
if it's say four frames, we get to paused without eos, but then
hit eos without level message
2013-08-29 19:51:07 +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
120d1b239f work without network 2013-08-04 18:11:13 +02:00
Thomas Vander Stichele
df0daefa27 use a built REVISION file as a backup revision source 2013-08-02 16:17:03 +02:00
Thomas Vander Stichele
debd48d3e6 Add testcase to show that previous commit fixes #19. 2013-07-30 13:37:32 +02:00
Thomas Vander Stichele
6eda5d7dc5 remove one if path 2013-07-30 13:25:28 +02:00
Thomas Vander Stichele
7c95e8e017 Set proper track ids. Fixes #34 2013-07-30 13:23:34 +02:00
Thomas Vander Stichele
e8d06ba3f1 distinguish between disc and track credit 2013-07-30 13:17:32 +02:00
Thomas Vander Stichele
ead648feef add getIds and use it to set correct ids 2013-07-30 13:09:56 +02:00
Thomas Vander Stichele
a8ef4a54c4 make sure sortname contains all artists 2013-07-30 13:07:09 +02:00
Thomas Vander Stichele
3d53056573 Extract a Credit list subclass to get name/sortname/id 2013-07-30 13:06:02 +02:00