Commit Graph

2107 Commits

Author SHA1 Message Date
Michael Wiencek
fe17c2cb3c Copy value list in Metadata.update 2013-06-30 17:56:26 -05:00
Michael Wiencek
fd30cb62ee functools.partial is 2.5+ 2013-06-30 16:15:27 -05:00
Michael Wiencek
b1980e6ac8 Merge pull request #126 from mwiencek/throttle-gui
Add @throttle decorator to reduce the number of GUI updates
2013-06-30 14:02:46 -07:00
Michael Wiencek
90c43c72e1 Add @throttle decorator to reduce the number of GUI updates 2013-06-30 16:00:22 -05:00
Michael Wiencek
5568dc7c3e Merge pull request #134 from zas/status_icons
Display icons with tooltip instead of text for counters in status bar
2013-06-30 13:39:37 -07:00
Laurent Monin
1802208d69 Use a green down arrow as download icon instead of globe.
In 16x16 globe is too complex, arrow is much more legible.
2013-06-30 22:01:21 +02:00
Laurent Monin
a545c10cad Merge remote-tracking branch 'upstream/master' into status_icons 2013-06-30 21:50:39 +02:00
Laurent Monin
748502419a Remove incorrect author from header. 2013-06-30 21:49:26 +02:00
Michael Wiencek
befd8d8f57 Merge pull request #138 from zas/parse_amazon_url
Create a function to parse amazon urls and reduce code redundancy.
2013-06-30 10:45:27 -07:00
Michael Wiencek
910725ed70 Merge pull request #136 from zas/resources_tools
Improve resources tools
2013-06-30 10:39:52 -07:00
Laurent Monin
f892444998 Create a function to parse amazon urls and reduce code redundancy.
A test for amazon url parsing was added.
2013-06-30 17:25:15 +02:00
Laurent Monin
c8af60e21a Use unix eol in generated ressource file. 2013-06-30 05:04:47 +02:00
Laurent Monin
0661491f37 Use len() instead of a counter. 2013-06-30 05:02:45 +02:00
Laurent Monin
746fa31286 Use resources makeqrc and compile code, reducing code redundancy.
An empty __init__.py file was added so functions can be imported.
2013-06-28 12:39:53 +02:00
Laurent Monin
26f595a068 Mark compile.py and makeqrc.py as executables, they have python bang path. 2013-06-28 12:39:42 +02:00
Laurent Monin
b974a9cf63 Make compile.py runnable from anywhere and importable. 2013-06-28 12:39:30 +02:00
Laurent Monin
5f5afa7d02 Add script to generate picard.qrc from png images in images directory 2013-06-28 12:39:16 +02:00
Laurent Monin
22d99966dc Move source images (.psd, .svg) from images to img-src directory 2013-06-28 12:39:02 +02:00
Michael Wiencek
d729e205cf Merge pull request #135 from zas/unicode_str_error
Fix a TypeError, str vs unicode.
2013-06-27 12:29:13 -07:00
Laurent Monin
d2baf4449d Fix a TypeError, str vs unicode.
E: 139836956702464 21:25:09 Traceback (most recent call last):
  File "./picard/album.py", line 133, in _parse_release
    run_album_metadata_processors(self, m, release_node)
  File "./picard/metadata.py", line 334, in run_album_metadata_processors
    processor(tagger, metadata, release)
  File "./picard/coverart.py", line 178, in coverart
    config.setting["caa_image_types"].split())
TypeError: descriptor 'lower' requires a 'unicode' object but received a 'str'
2013-06-27 21:26:11 +02:00
Laurent Monin
4aa4cd411e Reduce spaces between counters. 2013-06-27 19:18:59 +02:00
Laurent Monin
559ec4e74b Include active requests in the pending requests count.
Counter was 0 if request queue was empty but Picard was still waiting for replies,
with this change, counter is set to 0 only if no active request left.
2013-06-27 18:17:42 +02:00
Laurent Monin
78df904c77 Use icons for counters in status bar 2013-06-27 18:02:55 +02:00
Michael Wiencek
d8b1b79d02 Add missing import 2013-06-23 12:03:32 -05:00
Michael Wiencek
9446b03d2e Use config module in ID3Metadata 2013-06-23 11:49:23 -05:00
Michael Wiencek
1d61c2ebd3 Merge branch 'Sophist-UK-sophist_id3v23_matching_v2'
Conflicts:
	picard/file.py
	picard/formats/id3.py
	picard/ui/metadatabox.py
	picard/ui/options/tags.py
2013-06-23 11:46:25 -05:00
Michael Wiencek
c54205e2c8 Merge pull request #132 from zas/amazon_regex_const
Move duplicated amazon asin regex to const.py
2013-06-21 15:56:51 -07:00
Laurent Monin
46d47f6edc Move duplicated amazon asin regex to const.py 2013-06-21 13:30:03 +02:00
Michael Wiencek
b520e33023 Merge pull request #130 from zas/bytes2human_nofrtest
Remove fr_FR locale test, too much a requirement.
2013-06-19 12:44:48 -07:00
Laurent Monin
4fc84a428b Remove (now) useless data test file. 2013-06-19 19:27:10 +02:00
Laurent Monin
fdbed3f6c1 Remove fr_FR locale test, too much a requirement. 2013-06-18 12:24:09 +02:00
Sophist
da1c2239b3 Fix review comments from luks 2013-06-17 09:15:48 +01:00
Sophist
26b310d04b Minor white-space tweaks 2013-06-17 07:48:45 +01:00
Lukáš Lalinský
b3f2e99130 Merge remote-tracking branch 'zas/info_dialog2'
Conflicts:
	picard/tagger.py
2013-06-17 08:20:42 +02:00
Michael Wiencek
dfc790226d Remove some obsolete code
Python 2.5 is no longer supported.
2013-06-16 22:01:32 -05:00
Sophist
7a7c255c6e Fix white-space issues as pep8 2013-06-16 12:39:13 +01:00
Sophist
69c73f2527 Handle id3v23 date / original date in yyyy only
For id3 files where picard is set to write id3v23 tags, truncate dates
provided by MB to yyyy (from yyyy-mm-dd).
2013-06-16 12:09:08 +01:00
Michael Wiencek
da981ee5d9 Merge pull request #128 from kepstin/vocals-rel-fix
Fix performed vocals relationship with no vocal type set
2013-06-15 15:55:35 -07:00
Michael Wiencek
3a0d7555ac Merge pull request #119 from zas/searchmbid
Make Picard search box smart enough to detect mbids.
2013-06-15 15:05:08 -07:00
Calvin Walton
513b51d730 Fix performed vocals attribute with no vocal type set
This fixes a regression since e16b2533c where picard no saves vocal ARs
with no type set as generic "performer" ars; appearing in the UI like
    Performer []: Some Vocalist
    Performer [guest]: Some Guest Vocalist

Add special handling for the vocal relationship type to use a fallback
string if there is no vocal type set. The fallback string is "vocals"
(earlier versions of picard used "vocal"), for consistancy with the
current vocal type strings, which look like "lead vocals", "background
vocals", etc.
2013-06-15 12:04:19 -04:00
Michael Wiencek
aaea3d4f54 Better metadata box locking
The previous use of "selection_mutex" didn't really prevent race conditions.
The only thing really stopping them was the hackish "throttling" implemented
using self.updating and self.update_pending. If self.update was called while
another update was already in-progress, it'd set self.update_pending to True
and return, thereby reducing the chance that two update threads would execute
simultaneously.

Another thing to note is that race conditions here are almost impossible to
reproduce in CPython by default, because the interpreter only checks for
possible thread switches every 100 virtual instructions or so (configurable
using sys.setcheckinterval). Still, relying on such behavior bothers me.

The new attempt here reduces the need for locking considerably, because
instead of having a constant, shared self.tag_diff object, each update
thread creates its own and passes it on as the result.

So, selection_mutex is now simply used to protect the cached selection vars
while they're being set in _update_selection and read in _update_tags. As
mentioned, CPython's default behavior makes selection_mutex pretty much
unnecessary, but I don't think it adds much overhead given its limited use.

Tested on Mac and Windows.
2013-06-15 00:44:54 -05:00
Michael Wiencek
d1c611d805 Remove leftover from #116 2013-06-14 13:33:05 -05:00
Michael Wiencek
69ba093a3b Merge pull request #120 from zas/picard-480
PICARD-480: add few missing tags to ASF/WMA format
2013-06-14 10:56:36 -07:00
Michael Wiencek
7f55ba67b5 Merge pull request #116 from zas/front_image
When "save_only_front_images_to_tags" is set, save only 1 front image.
2013-06-14 10:50:08 -07:00
Laurent Monin
65a593aecf When "save_only_front_images_to_tags" is set, save only 1 front image.
Introduce helpers to clarify and fix code:
- is_front_image()
- save_this_image_to_tags()
- image_type_from_id3_num()
- image_type_as_id3_num()

Fixes:
- honor "save_only_front_images_to_tags" option for apev2 format too
- save only caa front image to tags when "save_only_front_images_to_tags" is set
  and image source is CAA, use 'front' flag from json.
  Other sources should have only 1 front image anyways.
2013-06-13 08:48:55 +02:00
Michael Wiencek
2c375d788c If there's no ~length, use 0 as the fallback, not [""]
Otherwise, format_time raises an exception.
2013-06-11 22:55:00 -05:00
Michael Wiencek
b58caa4805 Fix file renaming examples after 7c4fdf76
The _make_filename and _script_to_filename methods actually *do* need
to be passed a custom settings dict, so that the renaming examples
can update instantly.
2013-06-11 12:40:16 -05:00
Michael Wiencek
caa52006ee Merge pull request #124 from Sophist-UK/sophist_fix_test_formats_after-status_counters_update
Fix format test file
2013-06-11 09:15:27 -07:00
Sophist
2c3cb1bf02 Fix format test file 2013-06-11 16:51:26 +01:00
Laurent Monin
80a2296bc8 Use ASIN instead WM/ASIN, as discussed with ijabz. 2013-06-11 13:49:24 +02:00