Commit Graph

171 Commits

Author SHA1 Message Date
Laurent Monin
86320f02d0 Merge pull request #419 from zas/futurize_stage1
Improve python3 compatibility, minor changes
2015-08-28 13:42:38 +02:00
Philipp Wolfer
5fdc5a945a Fixed test not run due to duplicated method name 2015-08-28 10:22:47 +02:00
Laurent Monin
a12ee509aa import print_function 2015-08-25 11:16:05 +02:00
Wieland Hoffmann
7bd95c46be Merge branch 'PICARD-663' of https://github.com/phw/picard 2014-12-05 17:55:14 +01:00
Philipp Wolfer
3b49da9109 Split the drive in replace_win32_incompat only on win32.
Also updated the tests, since this is now platform dependent.
2014-12-05 17:28:01 +01:00
Philipp Wolfer
eb3bb01ca7 Do not run the HiddenFileTest unit tests on Windows.
The unit tests only consider the string and whether any path component starts with a ".". On Windows the dotfiles are not used for hidden files so the tests fail. To have proper tests on Windows would require to have an actual folder structure with hidden files and folders.
2014-12-05 17:08:52 +01:00
Philipp Wolfer
8a336f4b92 Fixed renaming paths starting with "[a-z]:" being interpreted as drive names on Windows.
Fixes PICARD-663
2014-12-04 13:30:05 +01:00
Laurent Monin
043d37b07a Merge pull request #376 from phw/aiff
PICARD-42: Support AIFF files
2014-12-02 19:18:42 +01:00
Laurent Monin
61e7b351e8 Merge pull request #370 from phw/better_hidden_file_handling
PICARD-589: Better hidden file handling
2014-12-02 19:14:43 +01:00
Philipp Wolfer
ce5e4a4ff9 Do not require mutagen 1.23 but disable AIFF support for older versions. 2014-11-18 21:20:19 +01:00
Wieland Hoffmann
28482d3c2b Merge branch 'improved-wma-tags' of github.com:phw/picard 2014-11-13 11:38:08 +01:00
Philipp Wolfer
66feb95a5a Added tests for True Audio to make sure the recent ID3 changes didn't break anything. 2014-11-10 23:34:00 +01:00
Philipp Wolfer
be025002c9 Initial support for AIFF files with ID3 tags. 2014-11-10 23:31:50 +01:00
Philipp Wolfer
5cb930c150 Added tests for Musepack v7 and v8 2014-11-10 22:43:26 +01:00
Philipp Wolfer
388b429b0b Improvements to ASF tags:
* Distingiush between WM/OriginalReleaseTime and WM/OriginalReleaseYear
* Save encodersettings to WM/EncodingSettings
* Save website to WM/AuthorURL
* Support WM/PartOfSet possibly containing totaldiscs
2014-11-06 21:43:56 +01:00
Philipp Wolfer
80e852ceae Allow explicit loading of hidden files.
This will allow explicit loading of hidden files, but still will ignore hidden files and folders on deeper levels if the "show_hidden_files" option is disabled.

This fixes PICARD-589 and improves PICARD-528.
2014-10-26 13:08:38 +01:00
Laurent Monin
bff18344c1 Move cover art related files to a "coverart" sub-directory 2014-09-29 09:48:39 +02:00
Laurent Monin
94be311dc4 Merge pull request #359 from zas/PICARD-633
Picard-633: rework aliases selection for translation of artist's name
2014-09-27 11:53:49 +02:00
Laurent Monin
19d307d9bb PICARD-630: linear_combination_of_weights() raises exception
It happens when the function is called with empty parts list.
Returns 0.0 instead of raising ZeroDivisionError exception
2014-09-26 10:24:56 +02:00
Laurent Monin
068723181f PICARD-633: fix up artist's name translations
See http://chatlogs.musicbrainz.org/musicbrainz-devel/2014/2014-09/2014-09-18.html#T20-39-39-835764

Scores help when it comes to ambiguous choices, see tests.
2014-09-19 09:24:43 +02:00
Laurent Monin
deed015aea Convert xml nodes values from str to unicode 2014-09-19 01:12:13 +02:00
Philipp Wolfer
c6446626aa Better fix for script functions with zero arguments. 2014-06-25 22:08:10 +02:00
Wieland Hoffmann
d95a7221b1 Merge branch 'sophist_fix_default_naming_script' of https://github.com/Sophist-UK/picard 2014-06-20 10:31:49 +02:00
Laurent Monin
9a6ca46341 Fix regression, save only ONE front image when "save_only_front_images_to_tags" is set
This regression was introduced during code rewrite, option name is misleading.

See https://github.com/musicbrainz/picard/pull/116
See PICARD-350 (which wasn't closed)
2014-05-26 15:17:27 +02:00
Laurent Monin
c0de7d95c9 PEP8 fixes 2014-05-21 16:04:35 +02:00
Laurent Monin
9e2a91d203 Re-add dummy load to ensure test images are > 64kb
As said in comment, size was increased to catch a bug in mutagen, so better
to keep it.
2014-05-21 16:04:34 +02:00
Laurent Monin
83e45ec77d Minor change in test. 2014-05-16 23:06:42 +02:00
Laurent Monin
a5827926ac Improve tests for cover art types
- add tests according to save_only_front_images_to_tags
- some formats cannot save more than one image
- some formats have no type
2014-05-16 20:40:50 +02:00
Laurent Monin
dc6e150d45 imageinfo: differentiate each failure case
Add exceptions (subclassing IdentificationError):
- NotEnoughData
- UnrecognizedFormat

Add corresponding test code.
2014-05-16 15:47:24 +02:00
Laurent Monin
fe62ec7c1e imageinfo.IdentifyError -> imageinfo.IdentificationError 2014-05-16 15:40:23 +02:00
Laurent Monin
a0213db350 Rely on imageinfo.identify to extract mimetype
- it does what mimetypes.get_from_data()
- .tiff is unused (afaik), so don't bother with it
- it is safer to analyze data for mime type (as data may not match provided mime type)
- when images are loaded from audio file tags, a check is done on valid format
2014-05-15 16:05:01 +02:00
Laurent Monin
8afcefaa6b Remove now unused LockableDefaultDict 2014-05-15 15:42:54 +02:00
Laurent Monin
5ab4625fe7 imageinfo: simplify code and exceptions, image_info() -> identify() 2014-05-15 15:40:36 +02:00
Laurent Monin
9a8fd64aec imageinfo: add extension to result 2014-05-15 15:29:22 +02:00
Laurent Monin
a9e9a14a74 Use real image files to test formats 2014-05-15 14:36:41 +02:00
Laurent Monin
b4367486bd Introduce image_info() to extract width, height from image data 2014-05-15 14:35:56 +02:00
Laurent Monin
42f2048d99 Drop refcount/__del__ mess, make code much more reliable and simpler 2014-05-15 14:26:39 +02:00
Laurent Monin
d652e7307b Make exit cleanup process more generic 2014-05-14 15:55:04 +02:00
Laurent Monin
60bfd6d344 Merge Image() and CoverArtImage()
- Info dialog Artwork tab now displays types and comment for cover art images
- a tooltip gives info about the source (url, caa url, local file, tag, ...)
2014-05-14 15:55:04 +02:00
Sophist
08ca42e90f Add non-NAT and NAT tests 2014-05-14 07:40:11 +01:00
Sophist
6344ca2806 Move album_artist_from_path to utils
and add test.
2014-05-12 22:24:31 +01:00
Sophist
adab289bdb Fix and add tests for windows drive 2014-05-11 10:24:35 +01:00
Laurent Monin
4f2da821d3 Add tests for util.linear_combination_of_weights 2014-04-28 16:22:18 +02:00
Laurent Monin
8a5a2d8514 Fix missing _() in some cases.
======================================================================
ERROR: test_display_tag_name (test.test_utils.TagsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/musicbrainz/picard/test/test_utils.py", line 89, in test_display_tag_name
self.assertEqual(dtn('tag'), 'tag')
File "/home/travis/build/musicbrainz/picard/picard/util/tags.py", line 106, in display_tag_name
return _(name)
NameError: global name '_' is not defined
2014-04-26 14:32:13 +02:00
Laurent Monin
a3b0e21290 Improve API versions list test
- fix typo in method name
- make comment more explicit
- test the case where only one element is in the list
- ignore 0 element case (should test skip(), but 2.6 lacks it)
2014-04-26 12:08:02 +02:00
Laurent Monin
d7ba54dc51 Make version_to_string() and version_from_string() more tolerant
With those changes they can be used to parse plugin API versions too.

Test cases were modified accordingly.

Main changes:
```python
>>> version_from_string("1.0")
(1, 0, 0, 'final', 0)
>>> version_from_string("1.0.1")
(1, 0, 1, 'final', 0)
```
2014-04-25 12:01:47 +02:00
Laurent Monin
14c09a8d1e Add a test for util.tags.display_tag_name() 2014-04-22 10:31:19 +02:00
Sophist
dd03540f15 Add eq_all, ne_any as requested by Freso 2014-04-18 15:44:11 +01:00
Sophist
9291fcbb46 Add tests 2014-04-18 15:43:13 +01:00
Sophist
e406a554bc Address various comments by Philipp Wolfer ...
... based on actual knowledge of how characters are used in practice.

low quotation mark -> normal quotation mark rather than comma
oi should be gha -> gh rather than oi
ideographic punctuation, multiplication / division and middle dot are not punctuation
2014-04-14 11:57:35 +01:00