For one this is only needed on Windows when running as GUI app, not when running directly from console. Also this should happen as eraly as possible before anything else gets initialized.
If the user explicitly specified a config file being used, do not attempt to migrate any old settings. This is only done when using the app default settings location.
If FLAC picture blocks are located before the Vorbis comments, Windows cannot read the tags. By ensuring the pictures are always located after the Vorbis comments the FLAC metadata will be visible and editable in Windows Explorer.
Changed to not handle PreserveTimesStatError in _save_and_rename, there is nothing useful that can be done about this here. Raise this to the caller, making this being handled as error condition in _saving_finished
This commit changes how Travis sends an alert to the `#metabrainz` IRC
channel. Currently, it comes across as three lines:
```
<travis-ci> metabrainz/picard#5094 (master - 3bd4c03 : Philipp Wolfer): The build passed.
<travis-ci> Change view : e44eafc037...3bd4c031af
<travis-ci> Build details : https://travis-ci.org/metabrainz/picard/builds/595956271
```
This commit condenses them into one:
```
<travis-ci> [infrastructure:upgrade/teleirc-1.3.2@9f909cb - build #59] CI passed! (https://travis-ci.org/FOSSRIT/infrastructure/builds/581454707)
```
The important info is included. Repo name, branch, commit hash, Travis
CI build number, CI result, and a URL to get more info.
This makes it easier for someone like me to filter human noise from bot
noise in reading my client scrollback.
Signed-off-by: Justin W. Flory <git@jwf.io>
On system with different locales per category (e.g. German language, but English number formats) setlocale(LC_ALL) does not return a single locale name. Query the actual locale for LC_MESSAGES.
This failed due to:
- macOS returning language / country separated by "-" instead of "_" (en-UK instead of en_UK)
- required pyobjc modules not being packaged
* only repeats the preceding regular expression, but in the old test, there was
nothing preceding it. This showed up when tests were executed via `python
setup.py test`:
> .........................................E: 20:54:38,617 /home/wieland/dev/picard/picard/track.__init__:88: Failed to compile regex /*/: nothing to repeat at position 0
> Traceback (most recent call last):
> File "/home/wieland/dev/picard/picard/track.py", line 86, in __init__
> regex_search = re.compile(remain, re.IGNORECASE)
> File "/usr/lib/python3.7/re.py", line 234, in compile
> return _compile(pattern, flags)
> File "/usr/lib/python3.7/re.py", line 286, in _compile
> p = sre_compile.compile(pattern, flags)
> File "/usr/lib/python3.7/sre_compile.py", line 764, in compile
> p = sre_parse.parse(p, flags)
> File "/usr/lib/python3.7/sre_parse.py", line 930, in parse
> p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
> File "/usr/lib/python3.7/sre_parse.py", line 426, in _parse_sub
> not nested and not items))
> File "/usr/lib/python3.7/sre_parse.py", line 651, in _parse
> source.tell() - here + len(this))
> re.error: nothing to repeat at position 0
This was swallowed by py.test's behaviour to swallow stdout & stderr if no tests
fail.
Remove `*` from test_regexfilter and add an additional test with `/.*/` to
ensure this works.
The genre filter UI handled this correctly by showing the re.error in the UI.
Both tooltips are quite long and not trivial to understand for people not
already familiar with them. Hiding them after just 5 seconds is way too soon. To
not get into bikeshedding over how long the tooltip should be shown, just don't
hide it.
This changes the error message from
> E: 20:28:35,604 pluginmanager.load_plugins_from_directory:216: Unable to load plugin 'add_album_column': [Errno 13] Keine Berechtigung: '/home/wieland/.config/MusicBrainz/Picard/plugins/add_album_column.py'
to include the whole stack trace:
> E: 20:28:52,099 pluginmanager.load_plugins_from_directory:216: Unable to load plugin 'add_album_column'
> Traceback (most recent call last):
> File "./picard/pluginmanager.py", line 214, in load_plugins_from_directory
> self._load_plugin_from_directory(name, plugindir)
> File "./picard/pluginmanager.py", line 237, in _load_plugin_from_directory
> info = imp.find_module(name, [plugindir])
> File "/usr/lib/python3.7/imp.py", line 300, in find_module
> with open(file_path, 'rb') as file:
> PermissionError: [Errno 13] Keine Berechtigung: '/home/wieland/.config/MusicBrainz/Picard/plugins/add_album_column.py'
The catch-nearly-all codepath in _load_plugin_from_directory does the same.
This also means that the plugin_errored signal is emitted for `name`.
Previously, the error messages were of the form
> E: 20:10:04,902 pluginmanager.plugin_error:175: Failed loading zipped plugin 'add_album_column'
Since Picards plugin directories are only logged at debug level, this meant that
at least a restart was required to figure out which file contains the unloadable
plugin. Now the error message includes the filename:
> E: 20:20:30,756 pluginmanager.plugin_error:174: Failed loading zipped plugin 'add_album_column' from '/home/wieland/.config/MusicBrainz/Picard/plugins/add_album_column.zip'