Hello community,

here is the log from the commit of package picard for openSUSE:Factory checked 
in at 2017-02-28 23:50:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/picard (Old)
 and      /work/SRC/openSUSE:Factory/.picard.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "picard"

Tue Feb 28 23:50:08 2017 rev:26 rq:458661 version:1.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/picard/picard.changes    2016-07-07 
15:10:32.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.picard.new/picard.changes       2017-02-28 
23:50:09.844706815 +0100
@@ -1,0 +2,193 @@
+Fri Feb 17 10:16:22 UTC 2017 - [email protected]
+
+- Drop bonusdisc.py, URL disappeared
+
+-------------------------------------------------------------------
+Tue Feb 14 12:34:42 UTC 2017 - [email protected]
+
+- Update to version 1.4.0
+  * Bugfix: AcoustID submission fails with code 299 (PICARD-82)
+  * Bugfix: Ignoring "hip hop rap" folksonomy tags also ignores "rap", "hip 
hop", etc. (PICARD-335)
+  * Bugfix: Picard downloads multiple 'front' images instead of just first 
one. (PICARD-350)
+  * Bugfix: Saving hidden file with only an extension drops the extension 
(PICARD-357)
+  * Bugfix: Add directory opens in "wrong" dir (PICARD-366)
+  * Bugfix: Picard should de-duplicate work lists (PICARD-375)
+  * Bugfix: Tree selector in Options window is partially obscured, pane too 
narrow (PICARD-408)
+  * Bugfix: tag acoustid_id can not be removed or deleted in script, renaming 
or plugin (PICARD-419)
+  * Bugfix: Can't remove value from field (PICARD-546)
+  * Bugfix: Can't open Options (PICARD-592)
+  * Bugfix: "Tags from filenames" action stays enabled even if it is 
unavailable. (PICARD-688)
+  * Bugfix: Using the first image type as filename changes the name of front 
images (PICARD-701)
+  * Bugfix: Fingerprint Submission Failes if AcoustID tags are present and/or 
invalid (PICARD-706)
+  * Bugfix: Picard moves into the selected folder (PICARD-726)
+  * Bugfix: Picard does not support (recording) relationship credits 
(PICARD-730)
+  * Bugfix: Picard repeats/duplicates field data (PICARD-748)
+  * Bugfix: Number of pending web requests is not decremented on exceptions in 
the handler (PICARD-751)
+  * Bugfix: Divide by zero error in _convert_folksonomy_tags_to_genre when no 
tag at the release/release group level (  PICARD-753)
+  * Bugfix: Directory tree (file browser) not sorted for non-system drives 
under Windows (PICARD-754)
+  * Bugfix: Crash when loading release with only zero count tags (PICARD-759)
+  * Bugfix: No name and no window grouping in gnome-shell Alt-Tab app switcher 
(PICARD-761)
+  * Bugfix: Lookup in Browser does not and can not load HTTPS version of 
musicbrainz.org (PICARD-764)
+  * Bugfix: Unable to login using oauth via Picard options with Server Port 
set to 443 (PICARD-766)
+  * Bugfix: "AttributeError: 'MetadataBox' object has no attribute 
'resize_columns'" when enabling the cover art box (  PICARD-775)
+  * Bugfix: Pre-gap tracks are not counted in absolutetracknumber (PICARD-778)
+  * Bugfix: CAA cover art provider runs even if cover art has already been 
loaded (PICARD-780)
+  * Bugfix: Toggling Embed Cover Art in Tags and restarting doesn't have the 
expected behavior (PICARD-782)
+  * Bugfix: XMLWS redirects incorrectly (PICARD-788)
+  * Bugfix: Handle empty collection-list in web server response (PICARD-798)
+  * Bugfix: Amazon Cover Art provider does not work (and does not have a lot 
of debug logging enabled) (PICARD-799)
+  * Bugfix: Cover Art from CAA release group is skipped even though it exists 
(PICARD-801)
+  * Bugfix: Multiple instances of history and log dialogs (PICARD-804)
+  * Bugfix: Empty string lookup (PICARD-805)
+  * Bugfix: Will not load album information on any albums (PICARD-811)
+  * Bugfix: Redirect URL is not encoded which leads to http 400 error. 
(PICARD-814)
+  * Bugfix: Not compatible with latest Mutagen (PICARD-833)
+  * Bugfix: Can't save any files.  Get: "error: invalid literal for int() with 
base 10" (PICARD-834)
+  * Bugfix: Picard 1.3.2 shows cleartext username & password on status line 
when errors occur (PICARD-839)
+  * Bugfix: Cannot fetch cover art from amazon link contains https scheme. 
(PICARD-848)
+  * Bugfix: media-optical-modified.png icon still displayed after release save 
when two files match one track (PICARD-851)
+  * Bugfix: Release that Picard will not load (due to disc with just data 
track?) (PICARD-853)
+  * Bugfix: ValueError in metadata.py (PICARD-855)
+  * Bugfix: Improper detection of Gnome as a desktop environment and no 
support for gnome 3 (PICARD-857)
+  * Bugfix: Apparent non-functional tagger button (PICARD-858)
+  * Bugfix: Picard does not read Ogg/Opus files with an ".ogg" file exension 
(PICARD-859)
+  * Bugfix: Setting a large value in in $num function as length causes picard 
to become unresponsive (PICARD-865)
+  * Bugfix: id3 deletion needs to be improved (PICARD-867)
+  * Bugfix: id3v2.3 does not properly handle TMOO ( mood tag) (PICARD-868)
+  * Bugfix: Coverart providers duplicates on reset (PICARD-870)
+  * Bugfix: Restore defaults broken for plugins page and tagger scripts page 
(PICARD-873)
+  * Bugfix: Coverart providers erroneous save (PICARD-874)
+  * Bugfix: The metadatabox doesn't correctly show the tag selected  
(PICARD-876)
+  * Bugfix: Length tag for ID3 is no longer displayed in the metadata box 
(PICARD-881)
+  * Bugfix: Removed tags are not removed from the metadatabox after saving the 
file (PICARD-882)
+  * Bugfix: File Browser pane doesn't check for path type( file or folder) 
when setting home path/move files here (  PICARD-884)
+  * Bugfix: mov files return a +ve score for mp4 container leading to errors 
(PICARD-885)
+  * Bugfix: "Restore defaults" doesn't log out the user (PICARD-888)
+  * Bugfix: Broken 'Restore Defaults' (PICARD-907)
+  * Bugfix: Messagebox wraps and displays title inappropriately (PICARD-911)
+  * Bugfix: An “empty” track shouldn’t get an “excellent match” tooltip. 
(PICARD-914)
+  * Bugfix: In plugins list, some plugins don't show description (PICARD-915)
+  * Bugfix: Plugin restore defaults broken (PICARD-916)
+  * Bugfix: Does not use UI language but locale on Windows (PICARD-917)
+  * Bugfix: Preserve scripting splitter position (PICARD-925)
+  * Bugfix: Having trouble submitting AcoustIDs (PICARD-926)
+  * Bugfix: Cluster double‐click opens the Info… panel (PICARD-931)
+  * Bugfix: Status bar not cleared when selection changed (PICARD-937)
+  * Bugfix: Open containing folder not working for shared files over network  
(PICARD-942)
+  * Bugfix: Warning: Plugin directory 
'…/python2.7/site-packages/contrib/plugins' doesn't exist (PICARD-945)
+  * Bugfix: Additionnal files aren't moved anymore (PICARD-946)
+  * Bugfix: Search window error message does not appear translated (PICARD-947)
+  * Bugfix: Open Containing Folder duplicates (PICARD-950)
+  * Bugfix: Errors when directory / file names contain unicode characters 
(PICARD-958)
+  * New Feature: AIF support (ID3) (PICARD-42)
+  * New Feature: Test and integrate support for "local" cover art into Picard 
(PICARD-137)
+  * New Feature: Display infos (album, artist, tracklist) for clusters without 
release match (PICARD-680)
+  * New Feature: Add download plugin functionality to existing UI (PICARD-691)
+  * New Feature: Fallback on album artist's tags if no tags are found for 
album (PICARD-738)
+  * New Feature: Add m2a as a supported extension (PICARD-743)
+  * New Feature: MusicBrainz/AcoustID entities should be hyperlinked in Picard 
(PICARD-756)
+  * New Feature: Support key tag (PICARD-769)
+  * New Feature: Export / import settings (PICARD-901)
+  * New Feature: Search releases from within a Picard dialog (PICARD-927)
+  * New Feature: Searching tracks and displaying similar tracks in a dialog 
box (PICARD-928)
+  * New Feature: Search for artists from dialog (PICARD-929)
+  * Task: Picard default name files script refinement (PICARD-717)
+  * Task: Update Picard logo/icons (PICARD-760)
+  * Task: Link to the Scripting documentation on the Scripting options page 
(PICARD-779)
+  * Task: Remove contrib/plugins from the repository (PICARD-835)
+  * Task: Raise the required mutagen version to 1.22 (PICARD-841)
+  * Task: Renaming save_only_front_images_to_tags option to something more 
appropriate  (PICARD-861)
+  * Task: Allow translators to finalize translations before releasing Picard 
1.4 (PICARD-895)
+  * Task: Raise the required Python version to 2.7. (PICARD-904)
+  * Task: Bump Picard’s copyright date (PICARD-912)
+  * Task: Add Norwegian to UI languages (PICARD-982)
+  * Task: Provide ~video variable for video tracks (PICARD-652)
+  * Task: Improve error logging on AcoustId submission (PICARD-708)
+  * Improvement: Link to Picard Scripting page under 'File Naming' (PICARD-22)
+  * Improvement: Restore default settings button/s (PICARD-116)
+  * Improvement: Speed of Ogg tag writing/updating (PICARD-133)
+  * Improvement: Allow adding/removing tags to be preserved from context menu 
in the tag diff pane (PICARD-207)
+  * Improvement: Make it easier to remove everything currently loaded in 
Picard (PICARD-210)
+  * Improvement: Bring back keyboard shortcuts for editing tags (PICARD-222)
+  * Improvement: Case sensitivity for "Move additional files" option 
(PICARD-229)
+  * Improvement: Metadata comparison box shows that it intends to write (and 
has written) tags unsupported by   underlyingfile format (PICARD-253)
+  * Improvement: Add more descriptive tooltips to buttons (PICARD-267)
+  * Improvement: Allow musicip_puid and acoustid_id to be cleared from tags 
(PICARD-268)
+  * Improvement: Make it possible to remove existing tags without clearing all 
tags (PICARD-287)
+  * Improvement: Disable recurse subdirectories should be added (PICARD-291)
+  * Improvement: display how many "pending files" left on lookup (PICARD-305)
+  * Improvement: Handle MP3 TSST/TIT3 (subtitle) tags better with ID3v2.3 
(PICARD-307)
+  * Improvement: Customisable toolbars (PICARD-353)
+  * Improvement: Ignore file extension and try to read anyway (PICARD-359)
+  * Improvement: Make it possible to unset all performer (etc) tags 
(PICARD-384)
+  * Improvement: Progress tracking (PICARD-388)
+  * Improvement: Add ability to handle multiple tagger scripts (PICARD-404)
+  * Improvement: the option "select all" to save (PICARD-476)
+  * Improvement: Option to load only audio tracks, i.e. not DVD-Video, CD-ROM 
tracks (PICARD-514)
+  * Improvement: Picard should use OAuth for authentication (PICARD-615)
+  * Improvement: Improvements to WMA tags (PICARD-648)
+  * Improvement: Only ask to "log in now" once per session (PICARD-678)
+  * Improvement: Show codec info for MP4 files (PICARD-683)
+  * Improvement: "Play File" button should be renamed to "Open in Player" 
(PICARD-692)
+  * Improvement: ID3 padding not reduced can result in large files (PICARD-695)
+  * Improvement: Set option 'caa_approved_only' disabled by default 
(PICARD-705)
+  * Improvement: Validate fpcalc executable in options (PICARD-707)
+  * Improvement: Improve File Naming options (PICARD-733)
+  * Improvement: Add --long-version/-V option, outputting third parties libs 
versions as well as Picard version PICARD-734)
+  * Improvement: missing info in the help file (PICARD-740)
+  * Improvement: Pass command-line arguments to QtApplication (PICARD-773)
+  * Improvement: Use the more detailed icons in more places on windows 
(PICARD-777)
+  * Improvement: Use .ini configuration file on all platforms (PICARD-794)
+  * Improvement: Use python2 shebang as of PEP 0394 (PICARD-806)
+  * Improvement: Display existing covers in File Info dialog (PICARD-808)
+  * Improvement: Use HTTPS for external links (PICARD-818)
+  * Improvement: Install a scalable icon (PICARD-838)
+  * Improvement: Use HTTPS for requests to the plugins API on 
picard.musicbrainz.org (PICARD-852)
+  * Improvement: Use magic numbers to determine the audio file types instead 
of relying on extensions (PICARD-864)
+  * Improvement: Multi-scripting UI is very basic (PICARD-883)
+  * Improvement: Allow scripting functions to have arbitrary number of 
arguments (PICARD-887)
+  * Improvement: The "Restore defaults" confirmation buttons should follow the 
quit confirmation dialog in style PICARD-890)
+  * Improvement: Replace submit icon with AcoustID logo (PICARD-896)
+  * Improvement: Rename "Submit" button to "Submit AcoustIDs" (PICARD-897)
+  * Improvement: Use UTF-8 for ID3v2.4 by default instead of UTF-16 
(PICARD-898)
+  * Improvement: Restore defaults is slightly broken for tags option page 
(PICARD-902)
+  * Improvement: Rearrange the action toolbar icons from left to right 
according to the expected user-flow (PICARD-908)
+  * Improvement: Add tooltips to “Restore all Defaults” and “Restore Defaults” 
(PICARD-913)
+  * Improvement: Make PICARD-883 UI have adjustable widths for list of scripts 
and script content (PICARD-918)
+  * Improvement: Move Options/Advanced/Scripting to Options/Scripting 
(PICARD-919)
+  * Improvement: Move UI options page up the options tree (PICARD-921)
+  * Improvement: Add $startswith and $endswith string functions (PICARD-923)
+  * Improvement: Make list of scripts smaller than script text by default 
(PICARD-924)
+  * Improvement: Wait for save thread pool to be finished before exit  
(PICARD-944)
+  * Improvement: New guess format functionality should use explicit buffer 
size (PICARD-970)
+
+-------------------------------------------------------------------
+Tue Feb 14 11:33:53 UTC 2017 - [email protected]
+
+- Fix the source urls for the plugins.
+
+-------------------------------------------------------------------
+Sun Feb 12 11:28:08 UTC 2017 - [email protected]
+
+- Add 0001-Introduce-new-cover-art-thumbnail-class.patch
+  0002-Connect-events-for-CoverArtThumbnail-class.patch
+  0003-Update-coverartbox-class-to-include-new-and-original.patch
+  0004-Update-labels-in-_show-method.patch
+  0005-Update-mainwindow-to-display-original-coverart.patch
+  0006-Implement-__eq__-method-for-CoverArtThumbnail-and-up.patch
+  0007-Add-i18n-support-to-coverart-labels.patch
+  0008-Add-view-coverart-changes-button.patch
+  0009-Add-spacer-item-to-push-coverartbox-items-to-top.patch
+  which are part of pull request 586, which fixes PICARD-258.
+  This pull request was already approved upstream but will be merged
+  after 1.4.0 is released.
+- This makes picard show visual feedback in the main window
+  for coverart changes in tracks.
+
+-------------------------------------------------------------------
+Sat Feb 11 09:13:52 UTC 2017 - [email protected]
+
+- Add fix-cover-art-downloads.diff, which fixes drag&drop issues with
+  cover art images from amazon/google images/urls using https.
+
+-------------------------------------------------------------------

Old:
----
  bonusdisc.py
  picard-1.3.2.tar.gz

New:
----
  0001-Introduce-new-cover-art-thumbnail-class.patch
  0002-Connect-events-for-CoverArtThumbnail-class.patch
  0003-Update-coverartbox-class-to-include-new-and-original.patch
  0004-Update-labels-in-_show-method.patch
  0005-Update-mainwindow-to-display-original-coverart.patch
  0006-Implement-__eq__-method-for-CoverArtThumbnail-and-up.patch
  0007-Add-i18n-support-to-coverart-labels.patch
  0008-Add-view-coverart-changes-button.patch
  0009-Add-spacer-item-to-push-coverartbox-items-to-top.patch
  fix-cover-art-downloads.diff
  picard-1.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ picard.spec ++++++
--- /var/tmp/diff_new_pack.d3FSQI/_old  2017-02-28 23:50:11.360492870 +0100
+++ /var/tmp/diff_new_pack.d3FSQI/_new  2017-02-28 23:50:11.364492306 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package picard
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,25 +17,37 @@
 
 
 Name:           picard
-Version:        1.3.2
+Version:        1.4.0
 Release:        0
 Summary:        The Next Generation MusicBrainz Tagger
 License:        GPL-2.0+
 Group:          Productivity/Multimedia/Sound/Utilities
 Url:            http://musicbrainz.org/doc/PicardTagger
-Source0:        
http://ftp.musicbrainz.org/pub/musicbrainz/picard/%{name}-%{version}.tar.gz
+Source0:        
ftp://ftp.musicbrainz.org/pub/musicbrainz/picard/%{name}-1.4.tar.gz
+Patch0:         fix-cover-art-downloads.diff
+Patch1:         0001-Introduce-new-cover-art-thumbnail-class.patch
+Patch2:         0002-Connect-events-for-CoverArtThumbnail-class.patch
+Patch3:         0003-Update-coverartbox-class-to-include-new-and-original.patch
+Patch4:         0004-Update-labels-in-_show-method.patch
+Patch5:         0005-Update-mainwindow-to-display-original-coverart.patch
+Patch6:         0006-Implement-__eq__-method-for-CoverArtThumbnail-and-up.patch
+Patch7:         0007-Add-i18n-support-to-coverart-labels.patch
+Patch8:         0008-Add-view-coverart-changes-button.patch
+Patch9:         0009-Add-spacer-item-to-push-coverartbox-items-to-top.patch
 # http://wiki.musicbrainz.org/Picard_Plugins
-Source2:        http://dispuutivv.nl/~jan/bonusdisc.py
-Source8:        http://users.musicbrainz.org/~brianfreud/SearchAmazon3.py
-Source9:        http://users.musicbrainz.org/~brianfreud/SearchAMG.py
-Source10:       http://users.musicbrainz.org/~brianfreud/SearchCastAlbums3.py
-Source11:       http://users.musicbrainz.org/~brianfreud/SearchDiscogs3.py
-Source12:       http://users.musicbrainz.org/~brianfreud/SearchFilmMusziek3.py
-Source13:       http://users.musicbrainz.org/~brianfreud/SearchGMR.py
-Source14:       http://users.musicbrainz.org/~brianfreud/SearchGoogle3.py
-Source15:       
http://users.musicbrainz.org/~brianfreud/SearchLortelArchives3.py
-Source16:       
http://users.musicbrainz.org/~brianfreud/SearchSoundtrackCollector3.py
-Source17:       
http://users.musicbrainz.org/~brianfreud/SearchSoundtrackINFO3.py
+# All of the Search*.py files come from 
https://github.com/brianfreud/Picard-plugins
+# The full URL can not be part of this specfile because download corrupts line 
endings
+Source8:        SearchAmazon3.py
+Source9:        SearchAMG.py
+Source10:       SearchCastAlbums3.py
+Source11:       SearchDiscogs3.py
+Source12:       SearchFilmMusziek3.py
+Source13:       SearchGMR.py
+Source14:       SearchGoogle3.py
+Source15:       SearchLortelArchives3.py
+Source16:       SearchSoundtrackCollector3.py
+Source17:       SearchSoundtrackINFO3.py
+#
 BuildRequires:  desktop-file-utils
 BuildRequires:  gcc-c++
 BuildRequires:  libofa-devel
@@ -58,7 +70,17 @@
 %lang_package
 
 %prep
-%setup -q -n %{name}-release-%{version}
+%setup -q -n %{name}-release-1.4
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
 
 %build
 python setup.py config
@@ -69,7 +91,6 @@
 
 # install plugins
 PLUGINDIR=%{buildroot}%{py_sitedir}/picard/plugins/
-install -m 0644 %{SOURCE2} ${PLUGINDIR}
 install -m 0644 %{SOURCE8} ${PLUGINDIR}
 install -m 0644 %{SOURCE9} ${PLUGINDIR}
 install -m 0644 %{SOURCE10} ${PLUGINDIR}
@@ -102,6 +123,7 @@
 %{_datadir}/applications/%{name}.desktop
 %{python_sitearch}/picard*
 %{_datadir}/icons/hicolor/*/apps/picard.png
+%{_datadir}/icons/hicolor/*/apps/picard.svg
 
 %files lang -f %{name}.lang
 %defattr(-,root,root)

++++++ 0001-Introduce-new-cover-art-thumbnail-class.patch ++++++
>From b56a1ac307c2183052334926114cb71da41f3956 Mon Sep 17 00:00:00 2001
From: Sambhav Kothari <[email protected]>
Date: Sun, 22 Jan 2017 18:49:00 +0530
Subject: [PATCH 1/9] Introduce new cover-art thumbnail class

---
 picard/ui/coverartbox.py | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/picard/ui/coverartbox.py b/picard/ui/coverartbox.py
index fc515877..a2ca057f 100644
--- a/picard/ui/coverartbox.py
+++ b/picard/ui/coverartbox.py
@@ -67,6 +67,70 @@ class ActiveLabel(QtGui.QLabel):
         if accepted:
             event.acceptProposedAction()
 
+class CoverArtThumbnail(ActiveLabel):
+
+    def __init__(self, active=False, drops=False, *args, **kwargs):
+        super(CoverArtThumbnail, self).__init__(active, drops, *args, **kwargs)
+        self.data = None
+        self.shadow = QtGui.QPixmap(":/images/CoverArtShadow.png")
+        self.release = None
+        self.setPixmap(self.shadow)
+        self.setAlignment(QtCore.Qt.AlignTop | QtCore.Qt.AlignHCenter)
+        self.clicked.connect(self.open_release_page)
+        self.imageDropped.connect(self.fetch_remote_image)
+
+    def show(self):
+        self.set_data(self.data, True)
+
+    def set_data(self, data, force=False, pixmap=None):
+        if not force and self.data == data:
+            return
+
+        self.data = data
+        if not force and self.parent().isHidden():
+            return
+
+        cover = self.shadow
+        if self.data:
+            if pixmap is None:
+                pixmap = QtGui.QPixmap()
+                pixmap.loadFromData(self.data.data)
+            if not pixmap.isNull():
+                offx, offy, w, h = (1, 1, 121, 121)
+                cover = QtGui.QPixmap(self.shadow)
+                pixmap = pixmap.scaled(w, h, QtCore.Qt.KeepAspectRatio, 
QtCore.Qt.SmoothTransformation)
+                painter = QtGui.QPainter(cover)
+                bgcolor = QtGui.QColor.fromRgb(0, 0, 0, 128)
+                painter.fillRect(QtCore.QRectF(offx, offy, w, h), bgcolor)
+                x = offx + (w - pixmap.width()) / 2
+                y = offy + (h - pixmap.height()) / 2
+                painter.drawPixmap(x, y, pixmap)
+                painter.end()
+        self.setPixmap(cover)
+
+    def set_metadata(self, metadata):
+        data = None
+        if metadata and metadata.images:
+            for image in metadata.images:
+                if image.is_front_image():
+                    data = image
+                    break
+            else:
+                # There's no front image, choose the first one available
+                data = metadata.images[0]
+        self.set_data(data)
+        release = None
+        if metadata:
+            release = metadata.get("musicbrainz_albumid", None)
+        if release:
+            self.setActive(True)
+            self.setToolTip(_(u"View release on MusicBrainz"))
+        else:
+            self.setActive(False)
+            self.setToolTip("")
+        self.release = release
+
+
 
 class CoverArtBox(QtGui.QGroupBox):
 
-- 
2.11.0

++++++ 0002-Connect-events-for-CoverArtThumbnail-class.patch ++++++
>From 908c6d73ed340dfba5da5de888e868aa9b211179 Mon Sep 17 00:00:00 2001
From: Sambhav Kothari <[email protected]>
Date: Sun, 22 Jan 2017 18:49:48 +0530
Subject: [PATCH 2/9] Connect events for CoverArtThumbnail class

---
 picard/ui/coverartbox.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/picard/ui/coverartbox.py b/picard/ui/coverartbox.py
index a2ca057f..b7e4b21c 100644
--- a/picard/ui/coverartbox.py
+++ b/picard/ui/coverartbox.py
@@ -130,6 +130,12 @@ class CoverArtThumbnail(ActiveLabel):
             self.setToolTip("")
         self.release = release
 
+    def open_release_page(self):
+        lookup = self.tagger.get_file_lookup()
+        lookup.albumLookup(self.release)
+
+    def fetch_remote_image(self, url):
+        return self.parent().fetch_remote_image(url)
 
 
 class CoverArtBox(QtGui.QGroupBox):
-- 
2.11.0

++++++ 0003-Update-coverartbox-class-to-include-new-and-original.patch ++++++
>From 569510e9761b80db9e9aac60dffdd207f59a1647 Mon Sep 17 00:00:00 2001
From: Sambhav Kothari <[email protected]>
Date: Sun, 22 Jan 2017 18:50:52 +0530
Subject: [PATCH 3/9] Update coverartbox class to include new and original
 coverart

---
 picard/ui/coverartbox.py | 101 +++++++++++++++--------------------------------
 1 file changed, 32 insertions(+), 69 deletions(-)

diff --git a/picard/ui/coverartbox.py b/picard/ui/coverartbox.py
index b7e4b21c..f09326ab 100644
--- a/picard/ui/coverartbox.py
+++ b/picard/ui/coverartbox.py
@@ -137,88 +137,50 @@ class CoverArtThumbnail(ActiveLabel):
     def fetch_remote_image(self, url):
         return self.parent().fetch_remote_image(url)
 
-
 class CoverArtBox(QtGui.QGroupBox):
 
     def __init__(self, parent):
         QtGui.QGroupBox.__init__(self, "")
         self.layout = QtGui.QVBoxLayout()
-        self.layout.setSpacing(0)
+        self.layout.setSpacing(6)
         # Kills off any borders
         self.setStyleSheet('''QGroupBox{background-color:none;border:1px;}''')
         self.setFlat(True)
-        self.release = None
-        self.data = None
         self.item = None
-        self.shadow = QtGui.QPixmap(":/images/CoverArtShadow.png")
-        self.coverArt = ActiveLabel(False, parent)
-        self.coverArt.setPixmap(self.shadow)
-        self.coverArt.setAlignment(QtCore.Qt.AlignTop | QtCore.Qt.AlignHCenter)
-        self.coverArt.clicked.connect(self.open_release_page)
-        self.coverArt.imageDropped.connect(self.fetch_remote_image)
-        self.layout.addWidget(self.coverArt, 0)
+        self.cover_art_label = QtGui.QLabel('Cover-Art')
+        self.cover_art_label.setAlignment(QtCore.Qt.AlignTop | 
QtCore.Qt.AlignHCenter)
+        self.cover_art = CoverArtThumbnail(False, True, parent)
+        self.orig_cover_art_label = QtGui.QLabel('')
+        self.orig_cover_art = CoverArtThumbnail(False, False, parent)
+        self.orig_cover_art_label.setAlignment(QtCore.Qt.AlignTop | 
QtCore.Qt.AlignHCenter)
+        self.orig_cover_art.setHidden(True)
+        self.layout.addWidget(self.cover_art_label)
+        self.layout.addWidget(self.cover_art)
+        self.layout.addWidget(self.orig_cover_art_label)
+        self.layout.addWidget(self.orig_cover_art)
         self.setLayout(self.layout)
 
+    def _show(self):
+        if self.cover_art.data == self.orig_cover_art.data:
+            self.orig_cover_art.setHidden(True)
+        else:
+            self.orig_cover_art.setHidden(False)
+            self.cover_art_label.setText('New Cover-Art')
+            self.orig_cover_art_label.setText('Original Cover-Art')
+
     def show(self):
-        self.__set_data(self.data, True)
+        self.cover_art.show()
+        if self.orig_cover_art.data:
+            self.orig_cover_art.show()
+            self._show()
         QtGui.QGroupBox.show(self)
 
-    def __set_data(self, data, force=False, pixmap=None):
-        if not force and self.data == data:
-            return
-
-        self.data = data
-        if not force and self.isHidden():
-            return
-
-        cover = self.shadow
-        if self.data:
-            if pixmap is None:
-                pixmap = QtGui.QPixmap()
-                pixmap.loadFromData(self.data.data)
-            if not pixmap.isNull():
-                offx, offy, w, h = (1, 1, 121, 121)
-                cover = QtGui.QPixmap(self.shadow)
-                pixmap = pixmap.scaled(w, h, QtCore.Qt.KeepAspectRatio, 
QtCore.Qt.SmoothTransformation)
-                painter = QtGui.QPainter(cover)
-                bgcolor = QtGui.QColor.fromRgb(0, 0, 0, 128)
-                painter.fillRect(QtCore.QRectF(offx, offy, w, h), bgcolor)
-                x = offx + (w - pixmap.width()) / 2
-                y = offy + (h - pixmap.height()) / 2
-                painter.drawPixmap(x, y, pixmap)
-                painter.end()
-        self.coverArt.setPixmap(cover)
-
-    def set_metadata(self, metadata, item):
-        self.item = item
-        data = None
-        if metadata and metadata.images:
-            for image in metadata.images:
-                if image.is_front_image():
-                    data = image
-                    break
-            else:
-                # There's no front image, choose the first one available
-                data = metadata.images[0]
-        self.__set_data(data)
-        if item and metadata:
-            self.coverArt.setAcceptDrops(True)
-        else:
-            self.coverArt.setAcceptDrops(False)
-        release = None
-        if metadata:
-            release = metadata.get("musicbrainz_albumid", None)
-        if release:
-            self.coverArt.setActive(True)
-            self.coverArt.setToolTip(_(u"View release on MusicBrainz"))
-        else:
-            self.coverArt.setActive(False)
-            self.coverArt.setToolTip("")
-        self.release = release
-
-    def open_release_page(self):
-        lookup = self.tagger.get_file_lookup()
-        lookup.albumLookup(self.release)
+    def set_metadata(self, metadata, orig_metadata, item):
+        self.cover_art.set_metadata(metadata)
+        self.orig_cover_art.set_metadata(orig_metadata)
+        self._show()
+        if item:
+            self.item = item
 
     def fetch_remote_image(self, url):
         if self.item is None:
@@ -261,7 +223,8 @@ class CoverArtBox(QtGui.QGroupBox):
             return
         pixmap = QtGui.QPixmap()
         pixmap.loadFromData(data)
-        self.__set_data([mime, data], pixmap=pixmap)
+        self.cover_art.set_data([mime, data], pixmap=pixmap)
+        self._show()
         if isinstance(self.item, Album):
             album = self.item
             album.metadata.append_image(coverartimage)
-- 
2.11.0

++++++ 0004-Update-labels-in-_show-method.patch ++++++
>From a2df06a4d9cbaf6cc5220fad42751bbb9f269c54 Mon Sep 17 00:00:00 2001
From: Sambhav Kothari <[email protected]>
Date: Sun, 22 Jan 2017 18:53:26 +0530
Subject: [PATCH 4/9] Update labels in _show method

---
 picard/ui/coverartbox.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/picard/ui/coverartbox.py b/picard/ui/coverartbox.py
index f09326ab..2ec1719e 100644
--- a/picard/ui/coverartbox.py
+++ b/picard/ui/coverartbox.py
@@ -35,11 +35,11 @@ class ActiveLabel(QtGui.QLabel):
     clicked = QtCore.pyqtSignal()
     imageDropped = QtCore.pyqtSignal(QtCore.QUrl)
 
-    def __init__(self, active=True, *args):
+    def __init__(self, active=True, drops=False, *args):
         QtGui.QLabel.__init__(self, *args)
         self.setMargin(0)
         self.setActive(active)
-        self.setAcceptDrops(False)
+        self.setAcceptDrops(drops)
 
     def setActive(self, active):
         self.active = active
@@ -67,6 +67,7 @@ class ActiveLabel(QtGui.QLabel):
         if accepted:
             event.acceptProposedAction()
 
+
 class CoverArtThumbnail(ActiveLabel):
 
     def __init__(self, active=False, drops=False, *args, **kwargs):
@@ -137,6 +138,7 @@ class CoverArtThumbnail(ActiveLabel):
     def fetch_remote_image(self, url):
         return self.parent().fetch_remote_image(url)
 
+
 class CoverArtBox(QtGui.QGroupBox):
 
     def __init__(self, parent):
@@ -147,7 +149,7 @@ class CoverArtBox(QtGui.QGroupBox):
         self.setStyleSheet('''QGroupBox{background-color:none;border:1px;}''')
         self.setFlat(True)
         self.item = None
-        self.cover_art_label = QtGui.QLabel('Cover-Art')
+        self.cover_art_label = QtGui.QLabel('')
         self.cover_art_label.setAlignment(QtCore.Qt.AlignTop | 
QtCore.Qt.AlignHCenter)
         self.cover_art = CoverArtThumbnail(False, True, parent)
         self.orig_cover_art_label = QtGui.QLabel('')
@@ -163,6 +165,8 @@ class CoverArtBox(QtGui.QGroupBox):
     def _show(self):
         if self.cover_art.data == self.orig_cover_art.data:
             self.orig_cover_art.setHidden(True)
+            self.cover_art_label.setText('')
+            self.orig_cover_art_label.setText('')
         else:
             self.orig_cover_art.setHidden(False)
             self.cover_art_label.setText('New Cover-Art')
-- 
2.11.0

++++++ 0005-Update-mainwindow-to-display-original-coverart.patch ++++++
>From 5eadc2556046fef1a5d25d4735493db90551c3f2 Mon Sep 17 00:00:00 2001
From: Sambhav Kothari <[email protected]>
Date: Sun, 22 Jan 2017 18:54:15 +0530
Subject: [PATCH 5/9] Update mainwindow to display original coverart

---
 picard/ui/mainwindow.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/picard/ui/mainwindow.py b/picard/ui/mainwindow.py
index 3229f6b7..e34e24ce 100644
--- a/picard/ui/mainwindow.py
+++ b/picard/ui/mainwindow.py
@@ -892,15 +892,17 @@ class MainWindow(QtGui.QMainWindow):
         self.update_actions()
 
         metadata = None
+        orig_metadata = None
         obj = None
 
         # Clear any existing status bar messages
         self.set_statusbar_message("")
 
         if len(objects) == 1:
             obj = list(objects)[0]
             if isinstance(obj, File):
                 metadata = obj.metadata
+                orig_metadata = obj.orig_metadata
                 if obj.state == obj.ERROR:
                     msg = N_("%(filename)s (error: %(error)s)")
                     mparms = {
@@ -914,6 +916,7 @@ class MainWindow(QtGui.QMainWindow):
                 metadata = obj.metadata
                 if obj.num_linked_files == 1:
                     file = obj.linked_files[0]
+                    orig_metadata = file.orig_metadata
                     if file.state == File.ERROR:
                         msg = N_("%(filename)s (%(similarity)d%%) (error: 
%(error)s)")
                         mparms = {
@@ -934,7 +937,7 @@ class MainWindow(QtGui.QMainWindow):
 
         self.metadata_box.selection_dirty = True
         self.metadata_box.update()
-        self.cover_art_box.set_metadata(metadata, obj)
+        self.cover_art_box.set_metadata(metadata, orig_metadata, obj)
         self.selection_updated.emit(objects)
 
     def show_cover_art(self):
-- 
2.11.0

++++++ 0006-Implement-__eq__-method-for-CoverArtThumbnail-and-up.patch ++++++
>From 623dde46e633ea26338293823ab1b8ebcc78e740 Mon Sep 17 00:00:00 2001
From: Sambhav Kothari <[email protected]>
Date: Sun, 22 Jan 2017 19:20:35 +0530
Subject: [PATCH 6/9] Implement __eq__ method for CoverArtThumbnail and update
 _show() method

---
 picard/ui/coverartbox.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/picard/ui/coverartbox.py b/picard/ui/coverartbox.py
index 2ec1719e..03bcdc57 100644
--- a/picard/ui/coverartbox.py
+++ b/picard/ui/coverartbox.py
@@ -80,6 +80,12 @@ class CoverArtThumbnail(ActiveLabel):
         self.clicked.connect(self.open_release_page)
         self.imageDropped.connect(self.fetch_remote_image)
 
+    def __eq__(self, other):
+        if self.data and other.data:
+            return self.data.data == other.data.data
+        else:
+            return False
+
     def show(self):
         self.set_data(self.data, True)
 
@@ -163,7 +169,9 @@ class CoverArtBox(QtGui.QGroupBox):
         self.setLayout(self.layout)
 
     def _show(self):
-        if self.cover_art.data == self.orig_cover_art.data:
+        # We want to show the 2 coverarts only if they are different
+        # and orig_cover_art is not None
+        if getattr(self.orig_cover_art, 'data', None) is None or 
self.cover_art == self.orig_cover_art:
             self.orig_cover_art.setHidden(True)
             self.cover_art_label.setText('')
             self.orig_cover_art_label.setText('')
-- 
2.11.0

++++++ 0007-Add-i18n-support-to-coverart-labels.patch ++++++
>From 1241e13c11e2ad2b441f4f6c5852986145f1ddc7 Mon Sep 17 00:00:00 2001
From: Sambhav Kothari <[email protected]>
Date: Sun, 22 Jan 2017 19:35:40 +0530
Subject: [PATCH 7/9] Add i18n support to coverart labels

---
 picard/ui/coverartbox.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/picard/ui/coverartbox.py b/picard/ui/coverartbox.py
index 03bcdc57..fb1e6e37 100644
--- a/picard/ui/coverartbox.py
+++ b/picard/ui/coverartbox.py
@@ -177,8 +177,8 @@ class CoverArtBox(QtGui.QGroupBox):
             self.orig_cover_art_label.setText('')
         else:
             self.orig_cover_art.setHidden(False)
-            self.cover_art_label.setText('New Cover-Art')
-            self.orig_cover_art_label.setText('Original Cover-Art')
+            self.cover_art_label.setText(_(u'New Cover-Art'))
+            self.orig_cover_art_label.setText(_(u'Original Cover-Art'))
 
     def show(self):
         self.cover_art.show()
-- 
2.11.0

++++++ 0008-Add-view-coverart-changes-button.patch ++++++
>From 6d0f24b91a472519c85fb2b93fb60b0809ca4c1c Mon Sep 17 00:00:00 2001
From: Sambhav Kothari <[email protected]>
Date: Sun, 22 Jan 2017 20:31:57 +0530
Subject: [PATCH 8/9] Add view coverart changes button

---
 picard/ui/coverartbox.py | 10 ++++++++++
 picard/ui/mainwindow.py  |  3 ++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/picard/ui/coverartbox.py b/picard/ui/coverartbox.py
index fb1e6e37..2b3b4cfa 100644
--- a/picard/ui/coverartbox.py
+++ b/picard/ui/coverartbox.py
@@ -151,6 +151,7 @@ class CoverArtBox(QtGui.QGroupBox):
         QtGui.QGroupBox.__init__(self, "")
         self.layout = QtGui.QVBoxLayout()
         self.layout.setSpacing(6)
+        self.parent = parent
         # Kills off any borders
         self.setStyleSheet('''QGroupBox{background-color:none;border:1px;}''')
         self.setFlat(True)
@@ -162,20 +163,29 @@ class CoverArtBox(QtGui.QGroupBox):
         self.orig_cover_art = CoverArtThumbnail(False, False, parent)
         self.orig_cover_art_label.setAlignment(QtCore.Qt.AlignTop | 
QtCore.Qt.AlignHCenter)
         self.orig_cover_art.setHidden(True)
+        self.view_changes_button = QtGui.QPushButton(_(u'View all changes'), 
self)
+        self.view_changes_button.setHidden(True)
         self.layout.addWidget(self.cover_art_label)
         self.layout.addWidget(self.cover_art)
         self.layout.addWidget(self.orig_cover_art_label)
         self.layout.addWidget(self.orig_cover_art)
+        self.layout.addWidget(self.view_changes_button)
         self.setLayout(self.layout)
+        self.view_changes_button.clicked.connect(self.show_cover_art_info)
+
+    def show_cover_art_info(self):
+        self.parent.view_info(default_tab=1)
 
     def _show(self):
         # We want to show the 2 coverarts only if they are different
         # and orig_cover_art is not None
         if getattr(self.orig_cover_art, 'data', None) is None or 
self.cover_art == self.orig_cover_art:
+            self.view_changes_button.setHidden(True)
             self.orig_cover_art.setHidden(True)
             self.cover_art_label.setText('')
             self.orig_cover_art_label.setText('')
         else:
+            self.view_changes_button.setHidden(False)
             self.orig_cover_art.setHidden(False)
             self.cover_art_label.setText(_(u'New Cover-Art'))
             self.orig_cover_art_label.setText(_(u'Original Cover-Art'))
diff --git a/picard/ui/mainwindow.py b/picard/ui/mainwindow.py
index e34e24ce..4c89dfe2 100644
--- a/picard/ui/mainwindow.py
+++ b/picard/ui/mainwindow.py
@@ -818,7 +818,7 @@ class MainWindow(QtGui.QMainWindow):
         dialog.show_similar_albums(obj)
         dialog.exec_()
 
-    def view_info(self):
+    def view_info(self, default_tab=0):
         if isinstance(self.selected_objects[0], Album):
             album = self.selected_objects[0]
             dialog = AlbumInfoDialog(album, self)
@@ -828,6 +828,7 @@ class MainWindow(QtGui.QMainWindow):
         else:
             file = self.tagger.get_files_from_objects(self.selected_objects)[0]
             dialog = FileInfoDialog(file, self)
+        dialog.ui.tabWidget.setCurrentIndex(default_tab)
         dialog.exec_()
 
     def cluster(self):
-- 
2.11.0

++++++ 0009-Add-spacer-item-to-push-coverartbox-items-to-top.patch ++++++
>From de61907483452dc6c85c1b7f596ccbbae8fe8fea Mon Sep 17 00:00:00 2001
From: Sambhav Kothari <[email protected]>
Date: Sun, 22 Jan 2017 20:33:01 +0530
Subject: [PATCH 9/9] Add spacer item to push coverartbox items to top

---
 picard/ui/coverartbox.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/picard/ui/coverartbox.py b/picard/ui/coverartbox.py
index 2b3b4cfa..3acb23f6 100644
--- a/picard/ui/coverartbox.py
+++ b/picard/ui/coverartbox.py
@@ -159,6 +159,7 @@ class CoverArtBox(QtGui.QGroupBox):
         self.cover_art_label = QtGui.QLabel('')
         self.cover_art_label.setAlignment(QtCore.Qt.AlignTop | 
QtCore.Qt.AlignHCenter)
         self.cover_art = CoverArtThumbnail(False, True, parent)
+        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Minimum, 
QtGui.QSizePolicy.Expanding)
         self.orig_cover_art_label = QtGui.QLabel('')
         self.orig_cover_art = CoverArtThumbnail(False, False, parent)
         self.orig_cover_art_label.setAlignment(QtCore.Qt.AlignTop | 
QtCore.Qt.AlignHCenter)
@@ -170,6 +171,7 @@ class CoverArtBox(QtGui.QGroupBox):
         self.layout.addWidget(self.orig_cover_art_label)
         self.layout.addWidget(self.orig_cover_art)
         self.layout.addWidget(self.view_changes_button)
+        self.layout.addSpacerItem(spacerItem)
         self.setLayout(self.layout)
         self.view_changes_button.clicked.connect(self.show_cover_art_info)
 
-- 
2.11.0

++++++ fix-cover-art-downloads.diff ++++++
diff --git a/picard/ui/coverartbox.py b/picard/ui/coverartbox.py
index fc515877..f381fe77 100644
--- a/picard/ui/coverartbox.py
+++ b/picard/ui/coverartbox.py
@@ -54,14 +54,14 @@ class ActiveLabel(QtGui.QLabel):
 
     def dragEnterEvent(self, event):
         for url in event.mimeData().urls():
-            if url.scheme() in ('http', 'file'):
+            if url.scheme() in ('https', 'http', 'file'):
                 event.acceptProposedAction()
                 break
 
     def dropEvent(self, event):
         accepted = False
         for url in event.mimeData().urls():
-            if url.scheme() in ('http', 'file'):
+            if url.scheme() in ('https', 'http', 'file'):
                 accepted = True
                 self.imageDropped.emit(url)
         if accepted:
@@ -153,11 +153,15 @@ class CoverArtBox(QtGui.QGroupBox):
     def fetch_remote_image(self, url):
         if self.item is None:
             return
-        if url.scheme() == 'http':
+        if url.scheme() in ('https', 'http'):
             path = url.encodedPath()
             if url.hasQuery():
                 path += '?' + url.encodedQuery()
-            self.tagger.xmlws.get(url.encodedHost(), url.port(80), path,
+            if url.scheme() == 'https':
+                port = 443
+            else:
+                port = 80
+            self.tagger.xmlws.get(str(url.encodedHost()), url.port(port), 
str(path),
                                   partial(self.on_remote_image_fetched, url),
                                   xml=False,
                                   priority=True, important=True)
@@ -173,13 +177,14 @@ class CoverArtBox(QtGui.QGroupBox):
         mime = reply.header(QtNetwork.QNetworkRequest.ContentTypeHeader)
         if mime in ('image/jpeg', 'image/png'):
             self.load_remote_image(url, mime, data)
-        elif reply.url().hasQueryItem("imgurl"):
+        elif url.hasQueryItem("imgurl"):
             # This may be a google images result, try to get the URL which is 
encoded in the query
-            url = QtCore.QUrl(reply.url().queryItemValue("imgurl"))
+            url = QtCore.QUrl(url.queryItemValue("imgurl"))
             self.fetch_remote_image(url)
         else:
             log.warning("Can't load image with MIME-Type %s", mime)
 
+
     def load_remote_image(self, url, mime, data):
         try:
             coverartimage = CoverArtImage(
++++++ picard-1.3.2.tar.gz -> picard-1.4.tar.gz ++++++
++++ 295750 lines of diff (skipped)


Reply via email to