Commit graph

13297 commits

Author SHA1 Message Date
Adrian Sampson
8b4d03095f parentwork tests: Remove unnecessary mocking
This mocking doesn't do anything because `command_output` is never
invoked by the code under test. See also #3332.
2019-07-20 16:23:03 -04:00
Zsin Skri
271a3c980c replaygain: ffmpeg: increase parser readability
Use keyword arguments to make the ffmpeg parser more readable.
2019-07-19 21:54:47 +02:00
Zsin Skri
b589521755 changelog entry: ffmpeg replaygain backend
Add changelog entry for the new ffmpeg replaygain backend.
2019-07-19 21:54:47 +02:00
Zsin Skri
c3af5b3763 replaygain: add ffmpeg backend
Add replaygain backend using ffmpeg's ebur128 filter.

The album gain is calculated as the mean of all BS.1770 gating block powers.
Besides differences in gating block offset, this should be equivalent to a
BS.1770 analysis of a proper concatenation of all tracks.

Just calculating the mean of all track gains (as implemented by the bs1770gain
backend) yields incorrect results as that would:
- completely ignore track lengths
  - just using length in seconds won't work either (e.g. BS.1770 ignores
    passages below a threshold)
- take the mean of track loudness, not power

When using the ffmpeg replaygain backend to create R128_*_GAIN tags, the
targetlevel will be set to -23 LUFS. GitHub PullRequest #3065 will make this
configurable.
It will also skip peak calculation, as there is no R128_*_PEAK tag.

It is checked if the libavfilter library supports replaygain calculation. Before
version 6.67.100 that did require the `--enable-libebur128` compile-time-option,
after that the ebur128 library is included in libavfilter itself. Thus we
require either a recent enough libavfilter version or the `--enable-libebur128`
option.
2019-07-19 21:54:47 +02:00
Zsin Skri
7a7314ee3f Allow other ReplayGain backends to support R128.
Previously using EBU R128 forced the use of the bs1770gain backend.
This change adds a whitelist of backends supporting R128. When the configured
backend is in that list it will also be used for R128 calculations. Otherwise
bs1770gain is still used as a default.

This should not change the overall behaviour of the program at all, but allow
for further R128-supporting backends to be added.
2019-07-19 21:54:47 +02:00
Adrian Sampson
5adb3ecad2
Merge pull request #3330 from zsinskri/bpd-sporadic-failure
fix "Sporadic test failures in BPD tests #3309"
2019-07-18 20:24:21 -04:00
Zsin Skri
5e5cb3cd43 changelog: fix "Sporadic test failures in BPD tests #3309" #3330
Add a changelog entry asking plugin developers to report any further occurrences
of this failure.
2019-07-17 19:26:45 +02:00
Zsin Skri
088af4d171 bpd tests: skip control_port in queue
When setting up bpd tests, two servers are startet: first a control server, then
bpd. Both send their assigned ports down a queue. The recipient only needs bpd's
port and thus skips the first queue entry.
2019-07-17 19:05:51 +02:00
Zsin Skri
8ba79117d9 bpd tests: use mp.Queue to communicate assigned port
Use a `multiprocessing.Queue` instead of a `multiprocessing.Value` to avoid the
manual polling/timeout handling.

TODO: Strangely Listener seems to be constructed twice. Only the second one is
used. Fix that and then remove the code working around it.
2019-07-17 16:19:17 +02:00
Zsin Skri
871f79c8f2 bpd tests: close only existing sockets
Close sockets in `finally`-clauses only after they have actually been created.
2019-07-17 13:38:57 +02:00
Zsin Skri
fb07a5112a bpd tests: terminate server upon connection failure 2019-07-17 13:21:25 +02:00
Zsin Skri
bbda292145 bpd test: make start_server a freestanding function
Under some circumstances (maybe under MS Windows?) local objects can't be
pickled. When `start_server` is a local this causes a crash:
https://ci.appveyor.com/project/beetbox/beets/builds/25996163/job/rbp3frnkwsvbuwx6#L541

Make `start_server` a freestanding function to mitigate this.
2019-07-15 22:25:48 +02:00
Zsin Skri
0ebab5edaa fix "Sporadic test failures in BPD tests #3309"
The bpd test bind a socket in order to test the protocol implementation. When
running concurrently this often resulted in an attempt to bind an already
occupied port.

By using the port number `0` we instead let the OS choose a free port. We then
have to extract it from the socket (which is handled by `bluelet`) via
`mock.patch`ing.
2019-07-15 21:25:39 +02:00
Adrian Sampson
f835cca235 Expand changelog for #3329 2019-07-15 09:51:18 -04:00
Adrian Sampson
cf3c1b9386 Merge pull request #3329 from zsinskri/command-output-stderr
util.command_output: return stderr, too
2019-07-15 09:47:53 -04:00
Zsin Skri
45aa75a4ef document util.command_output return value change
After commit `30395911 util.command_output: return stderr, too`,
`command_output` returns a tuple of stdout and stderr. Document that change by
adding a changelog entry and add a usage note to `command_output`'s docstring.
2019-07-15 11:39:30 +02:00
Zsin Skri
30395911e2 util.command_output: return stderr, too
Return a namedtuple CommandOutput(stdout, stderr) instead of just stdout from
util.command_ouput, allowing separate access to stdout and stderr.

This change is required by the ffmpeg replaygain backend (GitHub
PullRequest #3056) as ffmpeg's ebur128 filter outputs only to stderr.
2019-07-14 18:32:59 +02:00
Adrian Sampson
f39cff71d3 Revert "Travis: re-enable Python 3.8"
This reverts commit 0d44d31913.

Apparently, 0.15.5 (which contains the 3.8 fix) is not actually released
yet. Oops!
2019-07-05 09:50:05 -04:00
Adrian Sampson
0d44d31913 Travis: re-enable Python 3.8
The Werkzeug issue on 3.8 seems to have been fixed:
https://github.com/pallets/werkzeug/issues/1551
2019-07-05 09:09:33 -04:00
Adrian Sampson
ca4b101ef4 Changelog for #3322 (fix #465) 2019-07-01 17:24:12 -04:00
Adrian Sampson
e39341b282 Merge pull request #3322 from thedevilisinthedetails/master
465 discogs: Fetch a few more metadata fields
2019-07-01 17:22:50 -04:00
Peter
1b4124931b Trigger 2019-07-01 21:17:19 +02:00
Peter
ad67d70818 removing empty string 2019-07-01 21:05:31 +02:00
Peter
0cd46dab77 fixing per review comments 2019-07-01 21:04:35 +02:00
Peter
dd7e932a9a removing print log 2019-06-30 14:34:13 +02:00
Peter
6ae73546e5 Trigger 2019-06-30 14:09:31 +02:00
Peter
e196c1dae6 fixing test 2019-06-30 13:54:38 +02:00
Peter
510276f653 fixing test 2019-06-30 13:44:13 +02:00
Peter
8bf9d75f66 fixing test 2019-06-30 12:50:36 +02:00
Peter
0e2e2dfec3 adding additional discogs attrributes 2019-06-30 12:22:22 +02:00
Peter
e9dd226b93 fixing test 2019-06-30 12:06:38 +02:00
Adrian Sampson
23c9f87142 Typography (#3319) 2019-06-28 09:24:15 -04:00
Adrian Sampson
394a50a354
Merge pull request #3319 from justinmayer/patch-1
Convert plugin skips previously-converted files
2019-06-28 09:22:59 -04:00
Justin Mayer
9e5c45d6dd
Convert plugin skips previously-converted files
Clarifies documentation so it's clear that one can run `beet convert` without fearing that previously-converted files will be needlessly re-converted.
2019-06-28 14:47:38 +02:00
Adrian Sampson
090711eeb2 Changelog for #3318 2019-06-27 22:49:56 -04:00
Adrian Sampson
73f8edd116 Simplify force check (#3318) 2019-06-27 22:44:57 -04:00
Adrian Sampson
0726123e41 Move PROBE_FIELD to module scope (#3318) 2019-06-27 22:43:18 -04:00
Adrian Sampson
cca6c49784 Merge pull request #3318 from SusannaMaria/absubmit-improvements
Absubmit improvements
2019-06-27 22:41:23 -04:00
Susanna Maria
b20516e552 Small improvement of code doc 2019-06-26 20:29:17 +02:00
Susanna Maria
cab97c58d4 Pep8 drives me sometimes crazy 2019-06-25 20:57:43 +02:00
Susanna Maria
932d18a838 Pep8 error ... 2019-06-25 20:37:12 +02:00
Susanna Maria
f254b33c6e Findings from PR 2019-06-25 20:22:26 +02:00
Susanna Maria
2bfc7723fa Fix findings from travis-ci 2019-06-23 18:01:21 +02:00
Susanna Maria
6e179d86e6 Pep8 bugfix 2019-06-23 17:43:40 +02:00
Susanna Maria
f99b4841df Better documentation 2019-06-23 17:04:43 +02:00
Susanna Maria
0242176b40 Why binary import of json? 2019-06-23 16:59:33 +02:00
Susanna Maria
1643eea3f5 Parameter handling 2019-06-23 13:04:17 +02:00
Susanna Maria
b64059b173
Merge pull request #3 from beetbox/master
bump
2019-06-23 10:56:35 +02:00
Adrian Sampson
d959f8d89b
Merge pull request #3316 from SusannaMaria/mosaic-plugin-external
external mosaic plugin
2019-06-22 09:12:29 -07:00
Susanna Maria
43d7446df7 Right listing of mosaic plugin 2019-06-22 17:44:18 +02:00