Commit Graph

1127 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
17b70ce82b Fix Travis CI failure
I've updated whipper's version number value in the cue sheets used for testing purposes to make it match with the internal one
2017-04-24 16:33:17 +02:00
JoeLametta
3dad52df42 Update whipper release number in init.py
I'm going to tag this as a new amended version 0.5.1: no changes were done apart from the version number bugfix.
I've also included a code coverage report.

Fixes #147
2017-04-24 16:22:51 +02:00
JoeLametta
4dbdf59456 Remove GStreamer left out from .travis.yml
No big deal, missed it in my previous commit
2017-04-24 12:12:31 +02:00
JoeLametta
1abc54c59f Polish everything after PR #130
Updated README.md, CHANGELOG.md, .travis.yml
2017-04-24 11:54:37 +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
3fbe7f4adf Remove dependency on gst from the README. 2017-04-23 23:07:52 +02:00
Merlijn Wajer
efd75ab110 EncodeTaskFlac -> FlacEncodeTask
Untested.
2017-04-23 23:06:54 +02:00
Merlijn Wajer
3526a24310 Add peaktask to morituri/command/debug.py
Untested; but should work.
2017-04-23 22:35:32 +02:00
Merlijn Wajer
304c66876b Fix several issues in the gstreamer removal PR
Patch by JoeLametta
2017-04-23 22:32:05 +02:00
JoeLametta
f873bd00da Merge pull request #140 from Freso/rm-gst-flacparse-notes
Remove notes related to GStreamer flacparse
2017-03-06 15:11:38 +01:00
JoeLametta
8c74d73106 Merge pull request #139 from ribbons/no-date-crash
Prevent a crash if MusicBrainz release date is missing
2017-03-06 15:10:41 +01:00
Frederik “Freso” S. Olesen
df9d1928ef Remove notes related to GStreamer flacparse
Thomas had assembled some notes related to GStreamer 0.10's flacparse.
See commits 862221c5fd
and 29ac4d49b6.

However, since GStreamer is being removed entirely[*], these notes are
not really relevant for current development/status of whipper.
So let's get rid of them.

[*] https://github.com/JoeLametta/whipper/pull/67 and
    https://github.com/JoeLametta/whipper/pull/121 and
    https://github.com/JoeLametta/whipper/pull/130
2017-03-06 11:51:32 +01: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
JoeLametta
c710859215 Merge pull request #134 from ubitux/master
program: do not fetch 4 times musicbrainz metadata
2017-02-15 11:09:29 +01:00
Clément Bœsch
1775c6a8ec program: do not fetch 4 times MusicBrainz metadata 2017-02-14 21:45:20 +01:00
JoeLametta
2367286409 Merge pull request #132 from JoeLametta/fix-travis
Fix Travis CI build failures
2017-02-12 23:04:05 +01:00
JoeLametta
43cba71672 Update .travis.yml
Updated dependencies and hopefully fixed Twisted caused Travis CI build failure.
2017-02-12 22:57:17 +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
0e395e5f0e Fix bug introduced in fb271f08c 2017-02-09 23:05:00 +01:00
JoeLametta
c2b64369e7 Merge pull request #124 from JoeLametta/issue120
Add pre-emphasis status reporting to whipper's logfiles
2017-02-05 18:47:25 +01:00
JoeLametta
fb271f08cd Add pre-emphasis status reporting to whipper's logfiles
Fixes #120
2017-02-05 18:18:27 +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
JoeLametta
4dc7a3cf77 Merge pull request #114 from JoeLametta/fix-old-rip-references
Replace rip command suggestions with 'whipper'
2017-01-16 22:16:33 +01:00
JoeLametta
078342500e Replace rip command suggestions with whipper
I've only fixed the user facing occurrences: there are lots more in the source code.

Fixes #112
2017-01-16 22:11:24 +01:00
JoeLametta
490d84380a Amend previous tagged release (#107) 2017-01-08 20:04:19 +01:00
JoeLametta
adf4b79a20 Bump whipper version number to 0.4.1
Fixes #105
2017-01-07 23:53:47 +01:00
JoeLametta
466880fdf4 Merge pull request #103 from Freso/point-to-stable-AUR-package
Update links to Arch Linux AUR packages in README.
2017-01-07 21:03:41 +01:00
Frederik “Freso” S. Olesen
5e3b10eaae Small cleanups of setup.py (#102)
* Limit number of imports in setup.py.

* Make setup.py PEP8 compliant.
2017-01-06 21:14:29 +01:00
JoeLametta
b0bb561d5e Merge pull request #96 from RecursiveForest/add-setuptools-info
add url and license to setup.py
2017-01-06 21:13:54 +01:00
Frederik “Freso” S. Olesen
23a43b10cb Update links to Arch Linux AUR packages in README.
There's now a "stable" `whipper` package, which is likely the main one
we want to link to. I kept in the link to the `whipper-git` package at
the end, but also added a link to the non-git `whipper` package.
2017-01-06 20:50:41 +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
JoeLametta
17021a68f2 Merge pull request #98 from ribbons/defeat-cache-config
Persist False value for defeats_cache correctly
2017-01-01 19:17:17 +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
JoeLametta
ee298906ac Merge pull request #97 from ribbons/drive-info-suggested
Update suggested commands given by `drive list`
2016-12-31 16:22:37 +01:00
Matt Robinson
cf55d5e51e Update suggested commands given by drive list
If the drive offset or cache status are unknown, 'drive list' suggests
running 'rip offset find' or 'rip drive analyze'.  Update these to
refer to whipper instead.
2016-12-31 14:21:03 +00:00
Samantha Baldwin
975edc0a01 add url and license to setup.py 2016-12-28 01:27:27 -05: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
JoeLametta
8f4607de4c Merge pull request #91 from pierrrrrrre/patch-1
Update README.md
2016-12-17 22:33:41 +01:00
Pierre
b3f0fbc59d Update README.md
Added clearer info on required GStreamer-related packages.

I got a `no module named gst` while testing on Ubuntu 16.04 and figured it would be clearer to name the package to install to avoid that.
2016-12-17 23:25:00 +08:00
JoeLametta
4a8c57087b Merge pull request #90 from JoeLametta/readme
Fixed README broken links and added a better changelog
2016-12-17 13:02:54 +01:00
JoeLametta
c647b4cfb9 Fixed README broken links and added better changelog 2016-12-17 12:52:02 +01:00
Samantha Baldwin
ee9a58fcbb soxi: remove self._path unused variable, mark dep as 'soxi' (#89) 2016-12-15 23:05:14 +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
Takeshi Suzuki
71335e1449 Fix spelling mistake in README.md (#86) 2016-12-11 15:29:19 +01:00
chrysn
f9af58ed3e main: show TaskException instead of raising them
a TaskException already wraps another exception; raising it gives a
hard-to-read multi-line message instead of showing the clean wrapped
original backtrace; for comparison, an asserton error in image.py line
253:

exception AssertionError at /home/chrysn/git/whipper/morituri/image/image.py:253: stop(): Track length was not found; look for earlier errors in debug log (set RIP_DEBUG=4)
Traceback (most recent call last):
  File "/home/chrysn/git/whipper/morituri/extern/task/task.py", line 497, in _startWrap
    task.start(self)
  File "/home/chrysn/git/whipper/morituri/extern/task/task.py", line 395, in start
    BaseMultiTask.start(self, runner)
  File "/home/chrysn/git/whipper/morituri/extern/task/task.py", line 330, in start
    self.next()
  File "/home/chrysn/git/whipper/morituri/extern/task/task.py", line 401, in next
    BaseMultiTask.next(self)
  File "/home/chrysn/git/whipper/morituri/extern/task/task.py", line 351, in next
    self.stop()
  File "/home/chrysn/git/whipper/morituri/image/image.py", line 253, in stop
    assert taskk.length is not None, "Track length was not found; look for earlier errors in debug log (set RIP_DEBUG=4)"
AssertionError: Track length was not found; look for earlier errors in debug log (set RIP_DEBUG=4)

vs.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/chrysn/git/whipper/morituri/rip/main.py", line 27, in main
    ret = c.parse(sys.argv[1:])
  File "/home/chrysn/git/whipper/morituri/rip/main.py", line 94, in parse
    logcommand.LogCommand.parse(self, argv)
  File "/home/chrysn/git/whipper/morituri/common/logcommand.py", line 62, in parse
    command.Command.parse(self, argv)
  File "/home/chrysn/git/whipper/morituri/extern/command/command.py", line 401, in parse
    return self.subCommands[command].parse(args[1:])
  File "/home/chrysn/git/whipper/morituri/common/logcommand.py", line 62, in parse
    command.Command.parse(self, argv)
  File "/home/chrysn/git/whipper/morituri/extern/command/command.py", line 401, in parse
    return self.subCommands[command].parse(args[1:])
  File "/home/chrysn/git/whipper/morituri/common/logcommand.py", line 62, in parse
    command.Command.parse(self, argv)
  File "/home/chrysn/git/whipper/morituri/extern/command/command.py", line 363, in parse
    ret = self.do(args)
  File "/home/chrysn/git/whipper/morituri/rip/image.py", line 184, in do
    cueImage.setup(runner)
  File "/home/chrysn/git/whipper/morituri/image/image.py", line 75, in setup
    runner.run(verify)
  File "/home/chrysn/git/whipper/morituri/extern/task/task.py", line 490, in run
    raise TaskException(task.exception, message=msg)
morituri.extern.task.task.TaskException: (AssertionError('Track length was not found; look for earlier errors in debug log (set RIP_DEBUG=4)',), 'exception AssertionError at /home/chrysn/git/whipper/morituri/image/image.py:253: stop(): Track length was not found; look for earlier errors in debug log (set RIP_DEBUG=4)\nTraceback (most recent call last):\n  File "/home/chrysn/git/whipper/morituri/extern/task/task.py", line 497, in _startWrap\n    task.start(self)\n  File "/home/chrysn/git/whipper/morituri/extern/task/task.py", line 395, in start\n    BaseMultiTask.start(self, runner)\n  File "/home/chrysn/git/whipper/morituri/extern/task/task.py", line 330, in start\n    self.next()\n  File "/home/chrysn/git/whipper/morituri/extern/task/task.py", line 401, in next\n    BaseMultiTask.next(self)\n  File "/home/chrysn/git/whipper/morituri/extern/task/task.py", line 351, in next\n    self.stop()\n  File "/home/chrysn/git/whipper/morituri/image/image.py", line 253, in stop\n    assert taskk.length is not None, "Track length was not found; look for earlier errors in debug log (set RIP_DEBUG=4)"\nAssertionError: Track length was not found; look for earlier errors in debug log (set RIP_DEBUG=4)\n')
2016-11-29 13:30:17 +01:00
chrysn
6581812d19 image: add check to give more meaningful error message 2016-11-29 13:30:11 +01:00