Commit graph

267 commits

Author SHA1 Message Date
Adrian Sampson
84c0f909b6 replaygain: Check for bad mp3gain output (#961) 2014-09-15 10:25:57 -07:00
e5e4eaeacd39c5cfba4d7c852c48277ae50331e6
65de93941d flake8 cleanup
Cleanup after cleanup
2014-09-09 11:28:43 +10:00
e5e4eaeacd39c5cfba4d7c852c48277ae50331e6
66aee8094f Clean up of logging messages as described here
All logging now prefers the ' (single quote) over the " (double quote)

https://github.com/sampsyo/beets/wiki/Hacking
2014-09-09 11:28:43 +10:00
Yevgeny Bezman
2f9fe91121 replaygain: restore flake8 cleanliness 2014-06-27 20:02:11 +03:00
Yevgeny Bezman
b019e6a5c0 replaygain: silenced errors during import. Fixes #732 2014-06-27 19:50:41 +03:00
Adrian Sampson
32a3da5961 Clarify dependencies for RG GStreamer backend 2014-05-17 13:21:55 -07:00
Adrian Sampson
54445882d8 replaygain: Log when files are unsupported 2014-04-29 10:23:07 -07:00
Thomas Scholtes
e96753f96a Plugins use import_task.album 2014-04-25 13:52:03 +02:00
Yevgeny Bezman
e82147ce6d replaygain: added missing import 2014-04-17 21:32:12 +03:00
Yevgeny Bezman
bfac8cf84f replaygain: ignoring deprecation warning for threads_init in newer gi versions. Fixes #697 2014-04-17 20:06:03 +03:00
Thomas Scholtes
ea04344560 Test and fix unicode issues in logs. Fixes #699
The helper functions for creating test fixtures now include unicode characters.
2014-04-17 12:12:49 +02:00
Adrian Sampson
033cf9ec21 spell check 2014-04-15 21:17:23 -07:00
Adrian Sampson
9fd0e1d3fe fix #687: template indexes in logging statements 2014-04-14 10:35:20 -07:00
Fabrice Laporte
3ead936fe5 flake8 cleaning beetsplug/*
Remaining warnings are related to visual indentation.
2014-04-13 23:24:57 +02:00
Thomas Scholtes
c3ea1ded30 Add item.try_write() to log errors
Many commands and plugins use `item.write()` to update tags. Since the success
of the call is not critical to the functionality of most consumers we want to
catch any exceptions, log an error and continue with our task. The new method
encapsulates this logic.

This fixes #675.
2014-04-10 15:26:05 +02:00
Thomas Scholtes
1c598d4cee Add replaygain target level for gstreamer 2014-04-04 22:42:17 +02:00
Thomas Scholtes
81a2433e9d Use GLib.MainLoop instead of deprecated GObject 2014-04-04 19:46:43 +02:00
Thomas Scholtes
81f53fb0d2 Add basic cli tests for replaygain 2014-04-04 19:44:16 +02:00
Yevgeny Bezman
cf49d88156 replaygain: clarified the need to strange thread initialization| 2014-04-04 20:20:14 +03:00
Yevgeny Bezman
d8c37d6ca3 replaygain: Added a FatalReplayGainError class to signal the plugin that the backend failed completely 2014-04-04 19:17:41 +02:00
Thomas Scholtes
a5bdbdcf7f Move available backends to class level
See also https://github.com/sampsyo/beets/issues/650
2014-04-04 19:17:41 +02:00
Thomas Scholtes
439fc1938f Remove debug print statements 2014-04-04 19:17:41 +02:00
Thomas Scholtes
89680d835a Refine docstrings and fix style issues (flake8) 2014-04-04 19:17:41 +02:00
Yevgeny Bezman
6aa1cc95cb replaygain: Improved error handling 2014-04-04 19:17:41 +02:00
Yevgeny Bezman
2d9f40d62d replaygain: fixed small errors introduced by previous refactor. Commented the code in key parts. 2014-04-04 19:17:41 +02:00
Adrian Sampson
08b2bff28d eliminate GStreamer globals and initialize_config 2014-04-04 19:17:41 +02:00
Adrian Sampson
2369122075 minor Python style; move namedtuples to module 2014-04-04 19:17:41 +02:00
Yevgeny Bezman
d2c6d00b7b replaygain: Added some informative prints, removed hardcoded debug print 2014-04-04 19:17:40 +02:00
Yevgeny Bezman
9581b91e10 replaygain: Added gstreamer support, fixed some small bugs 2014-04-04 19:17:40 +02:00
Yevgeny Bezman
86ee30df0d replaygain: modified current implementation to fit a backend framework in anticipation of other implementations 2014-04-04 19:17:40 +02:00
Adrian Sampson
c7fe017752 remove Library.{move,store} methods
These methods are now provided by LibModel, which makes dealing with items and
albums symmetric.
2013-08-21 15:34:45 -07:00
Adrian Sampson
7779a5c6f5 replaygain: catch Unicode exc on Windows (GC-499)
(grafted from 89cee0e842b4e553790b0db7daaf2fd31d217e15)

--HG--
extra : source : 89cee0e842b4e553790b0db7daaf2fd31d217e15
2013-01-12 14:38:19 -08:00
Adrian Sampson
7a410f636b happy new year
For future reference, this command did the trick:
ack -l 'Copyright 201' | xargs perl -pi -E 's/Copyright 201./Copyright 2013/'
2013-01-11 10:43:41 -08:00
Adrian Sampson
6d68a4855e per-plugin configuration defaults in __init__()
This uses the new BeetsPlugin.config convenience view heavily. Things are
slowly getting less verbose.
2012-12-18 22:35:44 -08:00
Adrian Sampson
3ef9e006f4 finish confit-ifying all the plugins 2012-12-13 17:14:19 -08:00
Adrian Sampson
6c94358b13 begin Confit-ifying plugins in alphabetical order 2012-12-13 12:31:10 -08:00
Adrian Sampson
2d4b91fa6d replaygain: handle RG tool invocation errors (GC-469) 2012-12-11 13:09:10 -08:00
Adrian Sampson
531025f799 replaygain: restrict file formats (GC-469) 2012-12-11 13:06:57 -08:00
Adrian Sampson
ad9021b9d9 replaygain: normalize peaks to 2^15 (closes #65) 2012-11-09 16:25:19 -08:00
Adrian Sampson
f4fa11f8ca don't use subprocess.check_output
This function was added in Python 2.7 and we're currently targetting 2.6 as a
minimum version. Replaced with a function in util.
2012-11-01 11:59:02 -07:00
Adrian Sampson
dcb9ad7373 fix several non-unicode logging statements
A user reported a problem with one of the logging statements where .format()
tried to convert a Unicode string to bytes because the log message was '', not
u''. As a rule, we should ensure that all logging statements use Unicode
literals.
2012-10-24 15:14:33 -07:00
Adrian Sampson
9368075756 replaygain: reinstate albumgain config option 2012-10-20 16:49:52 -07:00
Adrian Sampson
848b56e54c replaygain: remove album noclip gain adjustment
as suggested by @kraYmer
2012-10-20 16:41:31 -07:00
Adrian Sampson
2c38c15fb8 replaygain: apply album gain in album mode 2012-10-18 11:33:13 -07:00
Adrian Sampson
0ab3426bd9 replaygain: add command
You can now disable automatic analysis and instead use a command to manually
analyze albums or tracks.
2012-10-17 22:12:38 -07:00
Adrian Sampson
1a261db918 replaygain: style and light refactoring 2012-10-17 21:47:17 -07:00
Adrian Sampson
95910a366b replaygain: run in import stage
This is the "new way" to post-process files on import (superseding the imported
events).
2012-10-17 21:43:27 -07:00
Adrian Sampson
3a4e1ca4f7 replaygain: add fields to Item
This has been a long time coming, but we now finally keep track of ReplayGain
values in the database. This is an intermediate step toward a refactoring of the
RG plugin; at the moment, these values are not actually saved!
2012-10-17 20:28:24 -07:00
Adrian Sampson
83f3069d57 replaygain: remove albumgain setting
We now always calculate album gain when importing an album. This is "free" (no
performance cost) now and players are free to ignore the setting if they so
choose.
2012-10-17 20:11:20 -07:00
Adrian Sampson
3d68cf5deb replaygain: fix album nopeak adjustment
Removed the second tool invocation. We now adjust the album-level gain based on
track peaks in one fell swoop. Based on help from Fabrice via email.
2012-10-17 20:06:10 -07:00
Adrian Sampson
6115fba765 replaygain: calculate when any file needs calculation
This ensures accurate album-level data. It also fixes a problem with the old way
of doing things where the MediaFiles and tool results would become misaligned if
a subset of the tracks needed recalculation.
2012-10-15 14:54:06 -07:00
Adrian Sampson
672ac78e76 replaygain: write album-level tags 2012-10-15 14:42:28 -07:00
Adrian Sampson
9afaed534c refactor output parsing code to use a dictionary 2012-10-15 14:31:31 -07:00
Adrian Sampson
8de8777b7e replaygain: use log messages instead of prints 2012-10-15 12:19:14 -07:00
Adrian Sampson
4adc896a86 replaygain: consolidate command invocation code
Invocations of the mp3gain/aacgain commands are now wrapped in a centralized
function that takes care of output capture and error handling. This avoids code
duplication for the various sites at which the tool needs to be invoked.

This change also avoids unintentionally modifying tags via the command-line
tool. The "-s s" option makes the tool *just* calculate RG values rather than
toying with tags at all.
2012-10-15 12:14:35 -07:00
Adrian Sampson
df6c244381 replaygain: fix some spacing and error messages 2012-10-15 09:57:44 -07:00
Jakob Schnitzer
4ebc5237d0 replaygain: Fix TypeError if command option is not set 2012-10-15 16:23:03 +02:00
Fabrice Laporte
375137bc57 replaygain: fix aacgain waiting for user input by using -c switch to ignore clipping warnings 2012-10-13 11:35:24 +02:00
Adrian Sampson
b9e2beddec replaygain: changelog & doc enhancements for GH-55 2012-10-12 22:42:08 -07:00
Fabrice Laporte
ca6fd2ccf5 rgain: unclutter stdout 2012-10-12 08:54:35 +02:00
Fabrice Laporte
17842b8d0d rgain: fix computation on singleton import 2012-10-12 08:53:14 +02:00
kraymer
6208c453c6 add apply_gain option (was default) 2012-10-12 08:52:12 +02:00
kraymer
7265119aad change replaygain plugin backend: it now invokes a command line tool (mp3gain or aacgain) 2012-10-12 08:51:36 +02:00
Adrian Sampson
760fff3ace use new "except ... as ...:" syntax
This replaces the older "except ..., ...:" syntax.
2012-05-13 21:18:50 -07:00
Adrian Sampson
93678307ef lastgenre now writes tags to files (#279)
This was accomplished by adding a new "config" parameter to the *_imported
events so that the handlers can check whether writing is enabled.
2011-12-20 17:49:11 -08:00
Adrian Sampson
1219c9c0fb remove some dead code from replaygain 2011-11-13 15:54:08 -08:00
Peter B
6b3365303a -moved replaygain plugin from Lugoues/beets-replaygain into beets core
-moved output to debug messages
2011-11-13 17:15:32 -05:00