Laurent Monin
e50bc12a88
Remove unneeded wrapper methods
2014-05-28 15:28:06 +02:00
Laurent Monin
778c9a0aff
Drop now unused caa_front_found
2014-05-28 15:19:23 +02:00
Laurent Monin
5db4d18851
Raise NotImplementedError
2014-05-28 15:17:16 +02:00
Laurent Monin
b4b1619187
Introduce CoverArtProvider.match_url_relations() to reduce code redundancy
2014-05-27 16:36:30 +02:00
Laurent Monin
14b8bd85e7
Split cover art providers to their own classes and files
...
- add extension point so one can write a cover art provider plugin
- minor changes to ease the move
2014-05-27 13:57:35 +02:00
Laurent Monin
8814b9ff95
Merge pull request #333 from zas/fix_front_image_only
...
Fix regression, save only ONE front image when "save_only_front_images_t...
2014-05-26 17:07:57 +02:00
Laurent Monin
7a06b67261
Only download one front image if no more is needed according to options
2014-05-26 15:58:48 +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
25b5d7b9b7
Update translations
2014-05-24 18:42:53 +02:00
Laurent Monin
4d4b762514
Merge pull request #329 from zas/cover_image_simplify
...
Merge Image() and CoverArtImage()
2014-05-24 16:30:27 +02:00
Laurent Monin
2d1a1005d9
Code cleanup, ease debugging
2014-05-22 18:03:40 +02:00
Laurent Monin
016cb3e009
Simplify image data/hash code
2014-05-21 17:36:05 +02:00
Laurent Monin
2c52ecf13e
store_data_for_hash(): always return filename + add debug
2014-05-21 16:22:49 +02:00
Laurent Monin
f3cfd55fb4
Drop index/enumerate(), unused now
2014-05-21 16:04:35 +02:00
Laurent Monin
fb4088addd
Move test for save_images_to_tags option to metadata.images_to_be_saved_to_tags
2014-05-21 16:04:35 +02:00
Laurent Monin
c0de7d95c9
PEP8 fixes
2014-05-21 16:04:35 +02:00
Laurent Monin
7e1902fdec
Output more infos about downloaded image in debug mode
2014-05-21 16:04:35 +02:00
Laurent Monin
2e7caa5a2c
Fix up set_data()
2014-05-21 16:04:34 +02:00
Laurent Monin
a07825fd85
Improve debugging messages
2014-05-21 16:04:34 +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
c7ce593941
Introduce exceptions CoverArtImageIOError and CoverArtImageIdentificationError
...
- hide imageinfo exceptions
- hide io/filesystem exceptions
- those may change in future, callers don't need to know details
2014-05-21 16:04:34 +02:00
Laurent Monin
9e764cb73e
Indentation fixes.
2014-05-20 15:01:39 +02:00
Laurent Monin
aaf1cc5469
Merge pull request #330 from Sophist-UK/sophist_fix_PICARD_607
...
Add ntpath to include list for py2app ...
2014-05-19 19:54:54 +02:00
Sophist
7e96801c93
Add ntpath to include list for py2app
...
in the hope (since I don;t have a Mac and cannot test this) that this
fixes the error reported in
(PICARD-607)[http://tickets.musicbrainz.org/browse/PICARD-607 ].
2014-05-19 18:50:22 +01:00
Laurent Monin
03ff7f9501
Cleanup debug messages
2014-05-19 17:09:15 +02:00
Laurent Monin
1ed5af2bc7
Reduce code redundancy, introduce _next_filename() and _is_write_needed()
2014-05-19 17:03:19 +02:00
Laurent Monin
f13574bb98
Remove unused CoverArtImage.filename and associated code
2014-05-19 16:28:32 +02:00
Laurent Monin
83e45ec77d
Minor change in test.
2014-05-16 23:06:42 +02:00
Laurent Monin
c14e8339c2
Add few comments
2014-05-16 23:01:11 +02:00
Laurent Monin
0d25a8d961
TagCoverArtImage.source(): better display if no tag was set
2014-05-16 23:00:58 +02:00
Laurent Monin
454b11225e
Tidy up.
2014-05-16 22:59:11 +02:00
Laurent Monin
6d7029f955
Return 'front' as main type if at least one type is 'front'
2014-05-16 22:58:55 +02:00
Laurent Monin
cc27ac0bba
Add helper CoverArtImage.types_as_string() to format types for display
2014-05-16 22:37:53 +02:00
Laurent Monin
c37f740a30
types_and_front() -> types_from_id3(), setting is_front isn't require anymore
2014-05-16 20:53:10 +02:00
Laurent Monin
68f246a20d
Use is_front_image() instead of is_front
2014-05-16 20:51:55 +02:00
Laurent Monin
f911beac83
Add missing import
2014-05-16 20:49:49 +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
e3c5e4b4c7
Improve __repr__() outputs
2014-05-16 20:38:57 +02:00
Laurent Monin
07bcbb1abe
CoverArtImage.maintype defaults to 'front' if is_front is set or no type set
2014-05-16 20:38:32 +02:00
Laurent Monin
9966908668
Initialize CoverArtImage.is_front to None, and don't specify default type
...
- is_front is used when one set "front" explicitly (CAA does it)
- types is now empty by default
- rely on is_front_image() to handle various cases
- if support_types is False, is_front_image() will default to True
2014-05-16 20:37:49 +02:00
Laurent Monin
32b014f4b8
Replace save_this_image_to_tags() with Metadata.images_to_be_saved_to_tags
...
It simplifies code, and it fixes the code, using is_front_image() instead of is_front.
2014-05-16 20:32:29 +02:00
Laurent Monin
0d8e1d31a3
Metadata.append_image(): remove useless assert()
2014-05-16 17:30:04 +02:00
Laurent Monin
1f9b49c656
imageinfo.identify(): improve description about exceptions
2014-05-16 17:25:53 +02:00
Laurent Monin
1431e3b32d
Remove unused imports
2014-05-16 16:19:24 +02:00
Laurent Monin
fc59e6d40e
CoverArtImage.set_data(): fix up comment
...
No ref counter anymore.
2014-05-16 16:00:23 +02:00
Laurent Monin
aadd248087
CoverArtImage.maintype -> @property
2014-05-16 15:58:58 +02:00
Laurent Monin
332ae6757e
imageinfo: replace assert() with exception raise
...
Exception UnexpectedError may be raised if for some reason data parsing fails.
2014-05-16 15:55:02 +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
d70b1a518a
support_types=False is the default, unneeded
2014-05-15 17:28:11 +02:00