Commit Graph

1536 Commits

Author SHA1 Message Date
JoeLametta
145cc47aa8 Fix 'Resource not accessible by integration' for GitHub action
This commit should make it work for pull requests too.
2020-09-17 21:48:17 +02:00
JoeLametta
3acc3ffed6 Drop whipper caching (#336)
Whipper's caching implementation causes a few issues (#196, #230, [#321 (comment)](https://github.com/whipper-team/whipper/pull/321#issuecomment-437588821)) and complicates the code: it's better to drop this feature.

The rip resume feature doesn't work anymore: if possible it will be restored in the future.

* Remove caching item from TODO
* Delete unneeded files related to caching
* Update 'common/directory.py' & 'test/test_common_directory.py' (caching removal)
* Update 'common/accurip.py' & 'test/test_common_accurip.py' (caching removal)
* Update 'common/program.py' (caching removal)
* Update 'command/cd.py' (caching removal)

This fixes #335, fixes #196 and fixes #230.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-09-17 17:52:11 +02:00
JoeLametta
4b5b6e5e2b Fix mistake in .travis.yml
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-09-14 13:29:16 +00:00
JoeLametta
ae5bb15a5e Discontinue python 3.5 support (EOL reached)
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-09-14 13:25:03 +00:00
JoeLametta
23c3e62436 Merge pull request #504 from cclauss/patch-1
Travis CI: Add Python 3.9 release candidate 1
2020-09-10 10:12:48 +02:00
Christian Clauss
7947f2cb1f Travis CI: Add Python 3.9 release candidate 1
* Python 3.9 in allow_failures mode until release on Oct. 5th  https://www.python.org/download/pre-releases
* Now that pip has a real dependancy resolver, feed it all requirements in one command
* Fix Travis build config validation issues: os, sudo

Note: Python 3.5 goes EOL next week.
Signed-off-by: cclauss <cclauss@me.com>
2020-09-09 23:08:12 +02:00
JoeLametta
b3aae5f162 Fix Dockerfile syntactic error
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-08-10 15:05:04 +00:00
JoeLametta
28221adf04 Remove mention about outdated unoffical snap package from README
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-08-10 14:58:34 +00:00
JoeLametta
164b604cc9 Merge pull request #498 from MasterOdin/patch-1
Define libcdio version as environment variables in docker
2020-08-10 16:49:50 +02:00
JoeLametta
bbed92bb30 Update failing AccurateRipResponse tests
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-08-10 16:39:55 +02:00
JoeLametta
8676e254e2 Fix CD drive permission issue with Docker (on ArchLinux)
Fixes #499.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-08-10 14:07:52 +00:00
Matthew Peveler
8a43568bce Define libcdio version as environment variables in docker
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
2020-07-14 13:09:57 -04:00
JoeLametta
0ffa34bc98 Fix wrong 'rm' directory name in Dockerfile
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-05-30 11:15:11 +00:00
JoeLametta
e685c04e97 Merge pull request #490 from baldurmen/manpages
Add man pages.
2020-05-30 12:58:05 +02:00
Louis-Philippe Véronneau
3c199f109f Document the new docutils optional dep. and link to the man pages
README

Signed-off-by: Louis-Philippe Véronneau <pollo@debian.org>
2020-05-30 10:51:26 +00:00
Louis-Philippe Véronneau
abcdd06713 Add man pages.
Fixes #73.

Signed-off-by: Louis-Philippe Véronneau <pollo@debian.org>
2020-05-30 10:49:07 +00:00
JoeLametta
ec1598e97d Replace 'master' with 'develop' branch in README links
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-05-30 10:12:07 +00:00
JoeLametta
fa7c50d3a6 Replace 'sys.exit()' and 'exit()' instructions with 'SystemExit()' equivalents
- `SystemExit` doesn't require importing the `sys` module
- `exit()` depends on the `site` module (for this reason its usage is discouraged in production code)

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-05-30 09:38:52 +00:00
JoeLametta
8802c5482e Improve error message for unconfigured drive offset
Fixes #478.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-05-29 16:24:30 +00:00
JoeLametta
0a960d991b Change docker alias in README to use '${HOME}' rather than '~'
Inlcudes another unrelated change to the README.

Fixes #482.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-05-29 15:58:05 +00:00
JoeLametta
2fe4292a9b Update README
- Updated bugs information about the `libcdio-utils` package
- Added missing entries to ToC

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-05-29 14:27:00 +00:00
JoeLametta
752162a434 Fix two flake8 errors
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-05-29 14:03:27 +00:00
JoeLametta
86fa4a3e77 Correct mistake in previous commit
The mistake caused the following error: "cd: can't cd to libcdio-paranoia-10.2+2.0.0".

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-04-21 14:10:19 +00:00
JoeLametta
30ab61fee2 Update libcdio-paranoia's version in Dockerfile
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-04-21 12:11:07 +00:00
JoeLametta
bbf1eba0e4 Replace 'freedb.freedb.org' CDDB server with a mirror
This is motivated by the imminent shut down of freedb.org which will happen on 2020-03-31.

More details here: https://web.archive.org/web/20200331093822/http://www.freedb.org/
And here: https://hydrogenaud.io/index.php?topic=118682

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-03-31 13:22:21 +00:00
JoeLametta
6b7fc81189 Merge pull request #324 from whipper-team/feature/issue-313-pathfilter-questions
Rewrite PathFilter
2020-02-22 19:10:35 +01:00
JoeLametta
4dc02ec12e Rewrite PathFilter
Added filter options:
- dot (replace leading dot with _)
- posix (replace illegal chars in *nix OSes with _)
- vfat (replace illegal chars in VFAT filesystems with _)
- whitespace (replace all whitespace chars with _)
- printable (replace all non printable ASCII chars with _)

Removed filter options:
- fat (replaced with vfat)
- special

Fixes #313.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-02-22 18:01:20 +00:00
Andreas Oberritter
afc31f930e config: generalize getting and setting of drive options
Fixed merge conflicts (JoeLametta).

Signed-off-by: Andreas Oberritter <obi@saftware.de>
2020-02-22 16:15:25 +00:00
JoeLametta
00b0692142 Merge pull request #389 from whipper-team/bugfix/improve-docstrings
Improve docstrings
2020-02-22 16:24:27 +01:00
JoeLametta
e56c636fd3 Improve docstrings
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-02-22 15:11:22 +00:00
JoeLametta
3b269e7a3b Fix flake8 warning
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-02-08 18:32:12 +00:00
JoeLametta
9a0b911666 Clarify 'set_hostname' warning message
Fixes #464.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-02-08 18:24:00 +00:00
JoeLametta
6fd7a78222 Change dest name of '--cover-art' option to 'cover_art'
Make it consistent with the name of the option.

Fixes #465.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-02-08 17:51:29 +00:00
JoeLametta
9e63915f65 Display release country in matching releases
This simplifies choosing the correct release when there are multiple matches.
If a certain release has multiple countries associated, all will be shown.

Thanks to the user "the-confessor" for testing this new feature.

Fixes #451.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-02-04 16:36:02 +01:00
JoeLametta
3213241ea5 Merge pull request #461 from neilmayhew/fix/inline-config-comments
Restore the ability to use inline comments in config files
2020-02-04 16:23:55 +01:00
Neil Mayhew
dca9fcb7dc Restore the ability to use inline comments in config files
The ability was lost in the switch to Python 3, because the config
parser module in the standard library changed its defaults.

[Python 2][2]:

> Comments may appear on their own in an otherwise empty line, or
> may be entered in lines holding values or section names.

[Python 3][3]:

> Inline comments can be harmful because they prevent users
> from using the delimiting characters as parts of values.
> That being said, this can be customized.

[2]: https://docs.python.org/2/library/configparser.html#module-ConfigParser
[3]: https://docs.python.org/3/library/configparser.html#supported-ini-file-structure

Signed-off-by: Neil Mayhew <neil@neil.mayhew.name>
2020-02-03 15:01:36 -07:00
JoeLametta
87e75d0f98 Drop 'requests' external dependency
It was only used in a single method and wasn't really needed.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-02-03 15:56:07 +00:00
JoeLametta
8428b69448 Merge pull request #460 from kevinoid/fix-max-retries-option
Fix cd rip --max-retries option handling
2020-01-30 08:47:22 +01:00
Kevin Locke
922389687a Fix cd rip --max-retries option handling
9db3aa9 introduced the -r/--max-retries option, but passed `'r'` to
`argparse.ArgumentParser.add_argument` instead of `'-r'` which causes:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File ".../whipper/command/main.py", line 48, in main
        cmd = Whipper(sys.argv[1:], os.path.basename(sys.argv[0]), None)
      File ".../whipper/command/basecommand.py", line 117, in __init__
        self.options
      File ".../whipper/command/basecommand.py", line 117, in __init__
        self.options
      File ".../whipper/command/basecommand.py", line 60, in __init__
        self.add_arguments()
      File ".../whipper/command/cd.py", line 308, in add_arguments
        default=DEFAULT_MAX_RETRIES)
      File "/usr/lib/python3.7/argparse.py", line 1354, in add_argument
        kwargs = self._get_optional_kwargs(*args, **kwargs)
      File "/usr/lib/python3.7/argparse.py", line 1485, in _get_optional_kwargs
        raise ValueError(msg % args)
    ValueError: invalid option string 'r': must start with a character '-'

for any arguments passed to `whipper cd rip`.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2020-01-29 16:40:24 -07:00
JoeLametta
1a06e51c80 Add whipper useragent to AccurateRip requests
Don't think it's required but it would be impolite not to announce
the software making the requests with its name, version and
contact information.

Fixes #439.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-01-29 14:58:09 +00:00
JoeLametta
dea7db10cf Merge pull request #459 from kevinoid/fix-unknown-no-mbid
Fix crash fetching cover art for unknown album
2020-01-29 13:42:44 +01:00
Kevin Locke
3ec17dbd33 Fix crash fetching cover art for unknown album
Ripping an unknown album when cover art fetching is enabled (e.g.
`whipper cd rip --unknown --cover-art complete`) causes whipper to crash
with an error similar to the following:

```python
Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File ".../whipper/whipper/command/main.py", line 43, in main
    ret = cmd.do()
    File ".../whipper/whipper/command/basecommand.py", line 139, in do
    return self.cmd.do()
    File ".../whipper/whipper/command/basecommand.py", line 139, in do
    return self.cmd.do()
    File ".../whipper/whipper/command/cd.py", line 191, in do
    self.doCommand()
    File ".../whipper/whipper/command/cd.py", line 363, in doCommand
    self.program.metadata.mbid)
AttributeError: 'NoneType' object has no attribute 'mbid'
```

due to accessing `self.program.metadata.mbid` when
`self.program.metadata` is `None`. To avoid this, only attempt to get
cover art when `self.program.metadata` is available.

Also print a warning when the cover art can't be fetched to inform the
user that it isn't being downloaded.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2020-01-29 12:35:49 +00:00
JoeLametta
eaf96ea64e Merge pull request #455 from ABCbum/customize-max-tries
Allow customization of maximum rip attempts value
2020-01-29 12:42:04 +01:00
Martin Paul Eve
3a1663dd15 Update docker instructions to use --bind instead of -v. (#454)
* Update docker instructions to use --bind instead of -v.

This is the better and approved option now as `-v` will yield permission errors on some systems.

Signed-off-by: Martin Paul Eve <martin@martineve.com>

* Add requirement for directories to exist

Signed-off-by: Martin Paul Eve <martin@martineve.com>
2020-01-29 12:39:56 +01:00
ABCbum
9db3aa9247 Allow customization of maximum rip attempts value
Add new `--max-retries` argument to allow users to specify maximum number
of attempts to try before giving up ripping a track. This value defaults to `5` while `0` means infinity.
Possible errors (negative number, string, etc) are also handled.

Co-authored-by: JoeLametta <JoeLametta@users.noreply.github.com>
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
Signed-off-by: ABCbum <kimlong221002@gmail.com>
2020-01-29 11:36:55 +00:00
JoeLametta
087a53a7d0 Merge pull request #444 from ABCbum/add-alternative-tagging
Add PERFORMER & COMPOSER metadata tags to audio tracks (if available)
2020-01-29 10:01:27 +01:00
JoeLametta
7b8a20b22b Merge pull request #450 from ABCbum/develop
Use https and http appropriately when connecting to MusicBrainz
2020-01-29 10:00:35 +01:00
JoeLametta
56f2b1d5f5 Merge pull request #456 from ABCbum/add-version-test
Test all four cases of whipper version scheme
2020-01-29 09:51:43 +01:00
ABCbum
f59caeae7b Test all four cases of whipper version schemes
Group different version schemes with the actual one generated from the logger in a list to avoid parsing a whole .log file.
The four possible cases are documented here: https://github.com/pypa/setuptools_scm/#default-versioning-scheme.

Fixes: #427.

Signed-off-by: ABCbum <kimlong221002@gmail.com>
2020-01-29 08:45:07 +00:00
JoeLametta
5eac141b53 README: replace 'pip' commands with 'pip3'
Whipper is Python 3 only since version 0.9.0.

Related to #457.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
2020-01-29 08:38:13 +00:00