Commit Graph

7535 Commits

Author SHA1 Message Date
Laurent Monin
d45a5a5277 Merge pull request #660 from mineo/run-cleanup-cleanup
Use run_cleanup instead of copying its function body
2017-03-18 15:41:32 +01:00
Wieland Hoffmann
8d91e6b0d3 Remove unused imports 2017-03-18 12:01:34 +01:00
Wieland Hoffmann
9a35ee97a8 Use run_cleanup instead of copying its function body 2017-03-18 11:59:22 +01:00
Sophist
7e40e0386a Skip file loads if Picard is stopping 2017-03-16 18:52:32 +00:00
Sambhav Kothari
ffec2bd418 Change release date to tentative 2017-03-13 23:44:53 +05:30
Sambhav Kothari
b4b9c65ff5 Add release notes for 1.4.1 2017-03-13 19:03:20 +05:30
Laurent Monin
a78450122d Resync translations 2017-03-13 13:36:25 +01:00
Laurent Monin
ac3e0b7c72 Regenerate pot file 2017-03-13 13:34:48 +01:00
Laurent Monin
cb1ff1d4e6 Merge pull request #642 from antlarr/album-cover-art
PICARD-1000: Show album/cluster cover art
2017-03-13 13:31:24 +01:00
Laurent Monin
9c20d93a82 Merge pull request #654 from samj1912/picard1012
PICARD-1012: Change QToolButtons to QPushButtons for GUI uniformity
2017-03-13 13:26:17 +01:00
Laurent Monin
c628849603 Merge pull request #635 from tungol/TXXX_hook
PICARD-990: Avoid multiple value TXXX frames
2017-03-13 13:24:17 +01:00
Laurent Monin
32dc32de2f Update attributes translations 2017-03-13 13:07:45 +01:00
Laurent Monin
0b4ab688d8 Merge pull request #655 from samj1912/picard1011
PICARD-1011: Set action toolbar tab order according to custom order
2017-03-13 12:56:06 +01:00
Laurent Monin
cfaba806c7 Merge pull request #653 from samj1912/picard1010
PICARD-1010: Fix display/hide logic for Coverart box
2017-03-13 12:49:14 +01:00
Sambhav Kothari
fa18ef3046 PICARD-1011: Set action toolbar tab order according to custom order
With #567 support for customizable toolbars was added.
This commit changes the set_tab_order function to correspond with the
custom toolbar layout dynamically.

See: https://tickets.metabrainz.org/browse/PICARD-1011
2017-03-13 13:34:35 +05:30
Sambhav Kothari
38bbe977db PICARD-1012: Change QToolButtons to QPushButtons for GUI uniformity
QToolButtons in User Interface and Scripting looked smalled in comparison
to the rest of the UI.

See: https://tickets.metabrainz.org/browse/PICARD-1012
2017-03-13 00:10:56 +05:30
Antonio Larrosa
879a86e51c Fix unneeded broken import from a bad rebase merge 2017-03-12 19:07:52 +01:00
Sambhav Kothari
855784522b PICARD-1010: Fix display/hide logic for Coverart box
Earlier when the display for Cover art box was toggled, it only
hid the cover art box on trigger. On selection update a
super().show() was called which again caused the cover art box to be
visible. This fixes the flawed display logic due to PR#643.

See: https://tickets.metabrainz.org/browse/PICARD-1010
2017-03-12 21:26:51 +05:30
Antonio Larrosa
0992a6cb7e Move MAX_COVERS_TO_STACK to picard.const 2017-03-11 13:05:40 +01:00
Antonio Larrosa
65499261ec Small fixes
Add a constant to hold the maximum number of covers to draw in a stack.
Extract html tags out of a translated message.
Reformat an if expression to move overators to front.
Remove an unneeded comment.
2017-03-11 13:05:40 +01:00
Antonio Larrosa
f5c82adfbd Limit the number of images to draw in a stack to 4
If there are more than 4 images, draw only three and a kind
of "grey stack of covers" that can be easily identified with
"and more covers"
2017-03-11 13:05:40 +01:00
Antonio Larrosa
8057f2bed0 Add information about common/different images on tooltip 2017-03-11 13:05:40 +01:00
Antonio Larrosa
63908e8619 Make front cover glow when there are no common images among tracks
If all tracks/files have a common set of images, show the stack
of cover art images as usual. If any track/file has a different
set of images, the front image is painted with a darkgoldenrod glow
(the same color used for the MetadataBox for tags with different values).

Also, fixed the draw of the stack so the bottom cover is drawn
correctly.
2017-03-11 13:05:40 +01:00
Antonio Larrosa
3599f74f16 Show cover stack from front-to-bottom and from bottom-left to top-right 2017-03-11 13:05:40 +01:00
Antonio Larrosa
270b07d08a Reduce the number of metadata image updates when dropping an image
Disable/enable the update of images also before/after setting a dropped image
2017-03-11 13:05:40 +01:00
Antonio Larrosa
e2e2ca39a6 Update album metadata images when Files/Tracks emit signal
Add a signal to Files/Tracks that gets emitted when the images
change (or might have changed), and update the album's metadata images
on such signals instead of each time the album is selected in the
user interface.
2017-03-11 13:05:40 +01:00
Antonio Larrosa
0dd1e8d6aa Start the correct InfoDialog
I forgot to add the changes from this file to the previous commit
(654490053ab038c27a628510c9f921ba2bf1be02)
2017-03-11 13:05:40 +01:00
Antonio Larrosa
cba798505a Small refactorization of TrackInfoDialog
In order to fix tracks without files not having the info button
available, I changed it to allow 0, 1 or multiple files.
If the track doesn't have any linked file, only the cover art is shown
(if available). If the track has n files, the info tab shows information
from the all the files.
2017-03-11 13:05:40 +01:00
Antonio Larrosa
0710a0d7a1 Rename file variable to obj
I changed it in e9fa6c887f94306c1aee3f3eb90f9db05951cb97 so a track
is passed to that function some times, so better reflect that in
the variable name too.
2017-03-11 13:05:40 +01:00
Antonio Larrosa
f9befdd0af Move documentation inside class definition 2017-03-11 13:05:40 +01:00
Antonio Larrosa
5e14e084bf Slightly improve the readability of the code 2017-03-11 13:05:40 +01:00
Antonio Larrosa
1982d03535 Enable cover artwork diff for albums
And remove an unused variable in TrackInfoDialog
2017-03-11 13:05:40 +01:00
Antonio Larrosa
269b7f07e3 PEP8 fixes
Remove spaces at start/end of braces
2017-03-11 13:05:40 +01:00
Antonio Larrosa
77fbaaee43 Cleanup the calculations 2017-03-11 13:05:40 +01:00
Antonio Larrosa
7370819ddb Move LRUCache to picard/utils/lrucache.py
Moved the LRUCache class to its own module in utils, in case it's useful
in other parts of the code.
2017-03-11 13:05:40 +01:00
Antonio Larrosa
9ff5434dd7 Remove CoverArtThumbnail.name variable which is not used anymore 2017-03-11 13:04:13 +01:00
Antonio Larrosa
53afbb51be Fix album cover art for album with no files
Retrieve the images from tracks, since an album that doesn't have any linked
file, can still have images defined in its tracks.
2017-03-11 13:04:13 +01:00
Antonio Larrosa
a6614eec77 Allow to open an info dialog of a track with no linked file
Instead of raising an exception, now it's possible to see all
images of tracks with no linked file.
2017-03-11 13:04:13 +01:00
Antonio Larrosa
b3726f255a Remove unuseful/broken debug message 2017-03-11 13:04:13 +01:00
Antonio Larrosa
b1520c155f Cache generated pixmaps in CoverArtThumbnail
This commit implements a LRU cache for generated pixmaps so they're not
generated each time the function is called (saving a lot of I/O and
CPU). The cache is shared by cover_art and orig_cover_art objects
and currently is configured to contain a maximum of 40 pixmaps.
2017-03-11 13:04:13 +01:00
Antonio Larrosa
fdb3ae4e44 Implement CoverArtImage.__hash__
This make CoverArtImage objects hashable
2017-03-11 13:04:13 +01:00
Antonio Larrosa
42dad8031a Move duplicate code to a common private function 2017-03-11 13:04:13 +01:00
Antonio Larrosa
c67decd47e Update file status after dropping images 2017-03-11 13:04:13 +01:00
Antonio Larrosa
cb07b7874e Set the default empty cover art when there's no cover art to show
When there's no data, we should show the empty cover art box
2017-03-11 13:04:13 +01:00
Antonio Larrosa
0c7e2a0ecd PEP8 fixes 2017-03-11 13:04:13 +01:00
Antonio Larrosa
d86d7f205b Fix update of album original images
When the tracks of an album change their original images (for example,
because the tracks are saved and the original images change) then
them album also has to update its original images
2017-03-11 13:04:13 +01:00
Antonio Larrosa
b4bfaed65f Update album images when an album is to be shown
When a user drops different images to be used as covers of
different tracks of the same album, the album's metadata.images list
didn't reflect these changes. This commit updates the list of images
so CoverArtBox always shows the correct values
2017-03-11 13:04:13 +01:00
Antonio Larrosa
14e2639e1a Replace front images instead of appending them
When an image is dropped, replace the front image with the dropped one.
Appending front covers is counterintuitive
2017-03-11 13:04:13 +01:00
Antonio Larrosa
3dab58c22e Draw stack of covers when metadata contains multiple images
Now CoverArtThumbnails uses all images in metadata to draw a stack
of covers so when a release contains files with different
original metadata covers that will be overwritten, the user
can intuitively see that.
2017-03-11 13:04:13 +01:00
Antonio Larrosa
876a3055b0 Add debug information
This will be removed later, but it's useful to see the actual metadata
arriving to CoverArtBox.
2017-03-11 13:04:13 +01:00