Commit Graph

7535 Commits

Author SHA1 Message Date
Antonio Larrosa
b7c324b4de Fix PEP8 issues (mostly lines too large)
Add a few empty lines and wrap some lines so they're not so large
2017-02-13 15:41:20 +01:00
Antonio Larrosa
9155c0bd8f Fix inmulti behaviour with multi-values
inmulti arguments where evaluated before inmulti was executed, which
resulted in strings being passed as arguments, which breaks cases in which
the strings in multivalue variables contain the separator used to separate
multiple values (see PICARD-922).
This commit changes the behaviour of inmulti so arguments are not evaluated
before they're passed, so it can extract the argument value as a list and
work with that.
This should fix PICARD-922
2017-02-12 20:50:55 +01:00
Antonio Larrosa
85282935f6 Add test for the inmulti function
Add a test to check that the inmulti function works as expected.
2017-02-12 20:47:15 +01:00
Laurent Monin
1117dd637c Update few .po files 2017-02-10 11:01:52 +01:00
Antonio Larrosa
da3bbf414f Use picard.util.imageinfo.py::identify to guess the mimetype of dropped image data
Replace the hack to identify the image format of the dropped
octet-stream with a call to imageinfo.identify which is used
in other parts of picard.
2017-02-09 19:32:40 +01:00
Laurent Monin
e1384b20b4 Merge pull request #622 from samj1912/patch-12
Add Norwegian to UI languages
2017-02-09 12:39:38 +01:00
Sambhav Kothari
33ea56fb54 Add Norwegian to UI languages 2017-02-09 16:51:19 +05:30
Antonio Larrosa
2961ed0333 Rename the imageDropped signal to image_dropped 2017-02-09 10:43:25 +01:00
Antonio Larrosa
31768cf8f9 Rename variables to use snake-case
Also, use log.debug instead of log.warning for a message
2017-02-09 10:40:34 +01:00
Antonio Larrosa
f2e2188ba4 Fix various cover drop issues
This patch adds https support, so users can drag covers from amazon.

Also fixes the imgurl query handling so users can drag covers from
google images thumbnails (but large resolution images will be downloaded).

It also adds support for dropped octet-stream data, so chromium users
can drag "opened" images from google images even if the link actually
points to the url containing the image, since chromium adds the
image data to the drop event. Unfortunately, firefox doesn't do that,
so firefox users will have to drag thumbnails (but the same large
resolution image will be used in any case)
2017-02-09 10:40:34 +01:00
Laurent Monin
0b6207a40d PICARD-947: fix typo in parenthesis causing translation to fail
The string was correctly parsed by gettext, but not translated at runtime.
2017-02-09 00:07:17 +01:00
Laurent Monin
40114def9a Resync translations 2017-02-08 18:19:17 +01:00
Sophist
b987d34e85 PICARD-969: Queue search dialog xmlws to run first
If you are loading a lot of albums and have a long queue of releases
being looked up, then the xmlws request for Search for similar albums...
is queued behind them.

This commit runs these request as priority=True important=True which
means that they will run as the very next xmlws.
2017-02-08 14:25:33 +00:00
Sophist
5f119183b6 PICARD-978: Identify album in debug for unmatched files. 2017-02-08 13:14:06 +00:00
Sophist
5297f382b9 PICARD-978: Change internal terminology 2017-02-08 13:14:03 +00:00
Sophist
40358b7812 PICARD-978: Distinguish in UI between unclustered and release unmatched files
Calling it unclustered in the UI will help users to realise that
they need to Cluster files, and in debug messages helps to
distinguish between Unclustered files just loaded, and an album
with Unmatched files.
2017-02-08 13:13:56 +00:00
Laurent Monin
78273d1722 Merge pull request #617 from samj1912/patch-11
Refactor add_release_to_user_collections
2017-02-03 22:12:03 +01:00
Sambhav Kothari
67da3428a9 Refactor add_release_to_user_collections 2017-02-04 00:58:15 +05:30
Laurent Monin
fc951c4926 Move collection related code to new add_release_to_user_collections()
- it simplifies imports
- it will ease creation of unit tests
- outputs a debug line when it happens
2017-02-03 14:19:14 +01:00
Laurent Monin
1b5a89ba8c Insert missing blankline (PEP8) 2017-02-03 14:15:45 +01:00
Laurent Monin
3980bb0138 Add __repr__() method to Collection class 2017-02-03 14:15:20 +01:00
Laurent Monin
abf3b4621e Fix commit d3cf9e5b: s/collection_list/collection_list[0]/ 2017-02-03 13:58:18 +01:00
Laurent Monin
27acdecaa0 Merge pull request #614 from samj1912/picard798
PICARD-798: Handle empty collection list
2017-02-03 12:21:25 +01:00
Sophist
0f9d5c7677 PICARD-973: Process events before exiting
Resolves [PICARD-973](https://tickets.metabrainz.org/browse/PICARD-973).
2017-02-02 21:04:10 +00:00
Sambhav Kothari
d3cf9e5bf5 PICARD-798: Handle empty collection list 2017-02-03 01:35:31 +05:30
Laurent Monin
2052bd326b Merge pull request #608 from Sophist-UK/PICARD-970_Set-buffer-size-to-data-size
PICARD-970 Read files unbuffered in guess_format
2017-02-02 18:46:15 +01:00
Laurent Monin
5deb33f371 Merge pull request #607 from Sophist-UK/PICARD-958_Fix-stderr-encoding
PICARD-958: Fix-stderr-unicode encoding-errors
2017-02-02 14:09:05 +01:00
Sophist
328762b7be Add debug message showing final file saved. 2017-02-02 09:17:11 +00:00
Sophist
e8d22952d4 Initialise tagger.stopping 2017-02-02 07:36:36 +00:00
Sophist
15901f8660 Also skip save if Picard is stopping 2017-02-02 00:18:36 +00:00
Sophist
b56f9c862e Correct typo. 2017-02-02 00:10:24 +00:00
Sophist
cebc2387d7 Add explanatory comment and check for None 2017-02-01 22:25:22 +00:00
Laurent Monin
89cd44e843 Merge pull request #611 from samj1912/patch-10
Add travis build status to README
2017-02-01 21:49:41 +01:00
Sambhav Kothari
b2faa57dcf Add travis build status to README 2017-02-02 01:25:47 +05:30
Laurent Monin
d0e56b90e1 Merge pull request #610 from samj1912/patch-9
Remove sockets from py2exe exclude list
2017-02-01 20:45:33 +01:00
Sambhav Kothari
aa8d889ab2 Remove sockets from py2exe exclude list 2017-02-02 01:11:40 +05:30
Sophist
784df7b3ed PICARD-972: Avoid save if file removed
Handles both removal before save starts and removal whilst file is being
saved.
2017-02-01 15:42:46 +00:00
Sophist
5005bc1aea Switch to unbuffered mode and add comment. 2017-02-01 15:28:21 +00:00
Sophist
5acf8c5dff PICARD-970 Set guess_format buffer size to read size
Resolves [PICARD-970](https://tickets.metabrainz.org/browse/PICARD-970).
2017-02-01 14:05:41 +00:00
Sophist
3f305acdf2 Remove unneeded imports 2017-02-01 12:56:24 +00:00
Sophist
0d133e225d PICARD-958_Fix-stderr-unicode encoding-errors 2017-01-31 18:58:41 +00:00
Frederik “Freso” S. Olesen
256d0ef3ea Set default server port to 443.
Since the code now always forces HTTPS (ie., port 443) connections to
MUSICBRAINZ_SERVERS, having port set to 80 means that the interface
shows musicbrainz.org:80 as the default, while it will actually be
connecting to musicbrainz.org:443. So this change makes the interface
more consistent with what is actually going on.

See discussion from and onwards:
https://github.com/metabrainz/picard/pull/600#issuecomment-275917095
2017-01-29 17:23:34 +01:00
Wieland Hoffmann
7075b1935f Merge branch 'master' of github.com:musicbrainz/picard 2017-01-29 15:53:30 +01:00
Wieland Hoffmann
605e225b3e Remove an unneeded import 2017-01-29 15:52:37 +01:00
Wieland Hoffmann
2113a13d60 submit_rating: Properly pass query arguments
Since 8ebe83b69e, query arguments should not be
added to the path, but passed as a separate argument to the HTTP method methods
on the web service object. Do so in submit_ratings.
2017-01-29 15:49:10 +01:00
Lukáš Lalinský
ffcbbec156 Use python-discid 1.1.1 2017-01-29 13:13:50 +01:00
Laurent Monin
0180d0cf41 Drop os.path.realpath(), partly reverting PR 599
See discussion at d5f3ca3665 (r98327865)
2017-01-28 11:28:42 +01:00
Laurent Monin
bda972d0e7 Merge pull request #605 from Sophist-UK/patch-4
PICARD-958: Avoid dir/file name unicode errors
2017-01-28 09:53:37 +01:00
Sophist
fdc905b0aa PICARD-958: Avoid dir/file name unicode errors
Resolves [PICARD-958](https://tickets.metabrainz.org/browse/PICARD-958).

When dir or file names contain unicode characters and debug logging is on, then debug.log statements which use %s placeholders cause the following error:
```
Traceback (most recent call last):
  File ".\picard\tagger.py", line 315, in event
    event.run()
  File ".\picard\util\thread.py", line 34, in run
    self.func(*self.args, **self.kwargs)
  File ".\picard\log.py", line 116, in _stderr_receiver
    sys.stderr.write(formatted_log_line(level, time, msg + os.linesep))
  File "C:\Program Files (x86)\Python2\lib\encodings\cp850.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u2010' in position 77: character maps to <undefined>
```
2017-01-27 20:29:18 +00:00
Laurent Monin
32e531d5a6 Merge pull request #599 from Sophist-UK/patch-2
PICARD-950: Don't open same folder multiple times
2017-01-27 11:39:33 +01:00