Accepting request 484849 from home:alarrosa:branches:multimedia:apps
- Update to version 1.4.1: * Bugfix: Album shown matched even if extra unmatched files (PICARD-953) * Bugfix: Removing album with saves pending does not remove pending saves (PICARD-972) * Bugfix: Pending log messages not flushed to stderr on quit (PICARD-973) * Bugfix: Drag & Drop not working (PICARD-988) * Bugfix: Picard violating ID3 standard for TXXX frames (PICARD-990) * Bugfix: Disabling the cover art box and enabling it again doesn't bring it back (PICARD-996) * Bugfix: Disabling the action toolbar sometimes doesn't work (PICARD-998) * Bugfix: If a cluster is moved to the album side of the main window it gets moved to unmatched files (PICARD-1005) * Bugfix: Drag and drop for cover arts doesnt work on OSX (PICARD-1006) * Bugfix: Unsetting View/Cover Art doesn't work permanently (PICARD-1010) * Bugfix: Toolbar tab order incorrect after PICARD-908 (PICARD-1011) * Bugfix: Number of images in release info is calculated incorrectly (PICARD-1014) * Bugfix: Artwork tab of the Track Info DIalog doesn't show changes anymore (PICARD-1015) * Bugfix: CoverArtBox doesn't show new/removed images after unmatched files are added/removed to the album (PICARD-1018) * Bugfix: Directory persistence for Add Directory needs tweaking (PICARD-1023) * Bugfix: Fix ~artists_sort metadata variable (PICARD-1029) * Bugfix: Missing import for PICARD_APP_NAME (PICARD-1042) * New Feature: Visual feedback for changes to artwork in before-after pane. (PICARD-258) * New Feature: Implement artwork diff for albums (PICARD-1000) * Task: Remove monkey patching of file write methods in picard formats (PICARD-943) * Task: Replace Ok button text by Make It So! in Options dialog (PICARD-1041) * Improvement: Remove should work when Unmatched Files is selected (PICARD-223) * Improvement: Always use HTTPS for musicbrainz.org (PICARD-951) * Improvement: Use Cover Art Archive over HTTPS (PICARD-952) * Improvement: Mention AcoustID on Scan button too (PICARD-961) * Improvement: Drag&drop cover art doesn't work for images from amazon/google images/https links (PICARD-980) * Improvement: Buttons on the "User Interface" and "Scripting" pages are smaller than buttons in other places (PICARD-1012) * Improvement: Multiple images in related tracks confusing (PICARD-1016) * Improvement: Picard loads all pending files before quitting (PICARD-1021) OBS-URL: https://build.opensuse.org/request/show/484849 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/picard?expand=0&rev=51
This commit is contained in:
parent
51e778a294
commit
d462587faf
@ -1,87 +0,0 @@
|
||||
From b56a1ac307c2183052334926114cb71da41f3956 Mon Sep 17 00:00:00 2001
|
||||
From: Sambhav Kothari <sambhavs.email@gmail.com>
|
||||
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
|
||||
|
@ -1,29 +0,0 @@
|
||||
From 908c6d73ed340dfba5da5de888e868aa9b211179 Mon Sep 17 00:00:00 2001
|
||||
From: Sambhav Kothari <sambhavs.email@gmail.com>
|
||||
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
|
||||
|
@ -1,146 +0,0 @@
|
||||
From 569510e9761b80db9e9aac60dffdd207f59a1647 Mon Sep 17 00:00:00 2001
|
||||
From: Sambhav Kothari <sambhavs.email@gmail.com>
|
||||
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
|
||||
|
@ -1,64 +0,0 @@
|
||||
From a2df06a4d9cbaf6cc5220fad42751bbb9f269c54 Mon Sep 17 00:00:00 2001
|
||||
From: Sambhav Kothari <sambhavs.email@gmail.com>
|
||||
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
|
||||
|
@ -1,51 +0,0 @@
|
||||
From 5eadc2556046fef1a5d25d4735493db90551c3f2 Mon Sep 17 00:00:00 2001
|
||||
From: Sambhav Kothari <sambhavs.email@gmail.com>
|
||||
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
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 623dde46e633ea26338293823ab1b8ebcc78e740 Mon Sep 17 00:00:00 2001
|
||||
From: Sambhav Kothari <sambhavs.email@gmail.com>
|
||||
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
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 1241e13c11e2ad2b441f4f6c5852986145f1ddc7 Mon Sep 17 00:00:00 2001
|
||||
From: Sambhav Kothari <sambhavs.email@gmail.com>
|
||||
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
|
||||
|
@ -1,76 +0,0 @@
|
||||
From 6d0f24b91a472519c85fb2b93fb60b0809ca4c1c Mon Sep 17 00:00:00 2001
|
||||
From: Sambhav Kothari <sambhavs.email@gmail.com>
|
||||
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
|
||||
|
@ -1,32 +0,0 @@
|
||||
From de61907483452dc6c85c1b7f596ccbbae8fe8fea Mon Sep 17 00:00:00 2001
|
||||
From: Sambhav Kothari <sambhavs.email@gmail.com>
|
||||
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
|
||||
|
@ -1,56 +0,0 @@
|
||||
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(
|
3
picard-1.4.1.tar.gz
Normal file
3
picard-1.4.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:994c7f835e1adbd7905e88af841ee6e7c249dc75b8be9963b1b3dc6cb8de6a4a
|
||||
size 2101829
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:069266ce0b0e25cc4eacfd9cc1c78e1b19d4341a3ca2ce50b0e731796070273e
|
||||
size 2075987
|
@ -1,3 +1,49 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 3 11:29:12 UTC 2017 - alarrosa@suse.com
|
||||
|
||||
- Update to version 1.4.1:
|
||||
* Bugfix: Album shown matched even if extra unmatched files (PICARD-953)
|
||||
* Bugfix: Removing album with saves pending does not remove pending saves (PICARD-972)
|
||||
* Bugfix: Pending log messages not flushed to stderr on quit (PICARD-973)
|
||||
* Bugfix: Drag & Drop not working (PICARD-988)
|
||||
* Bugfix: Picard violating ID3 standard for TXXX frames (PICARD-990)
|
||||
* Bugfix: Disabling the cover art box and enabling it again doesn't bring it back (PICARD-996)
|
||||
* Bugfix: Disabling the action toolbar sometimes doesn't work (PICARD-998)
|
||||
* Bugfix: If a cluster is moved to the album side of the main window it gets moved to unmatched files (PICARD-1005)
|
||||
* Bugfix: Drag and drop for cover arts doesnt work on OSX (PICARD-1006)
|
||||
* Bugfix: Unsetting View/Cover Art doesn't work permanently (PICARD-1010)
|
||||
* Bugfix: Toolbar tab order incorrect after PICARD-908 (PICARD-1011)
|
||||
* Bugfix: Number of images in release info is calculated incorrectly (PICARD-1014)
|
||||
* Bugfix: Artwork tab of the Track Info DIalog doesn't show changes anymore (PICARD-1015)
|
||||
* Bugfix: CoverArtBox doesn't show new/removed images after unmatched files are added/removed to the album (PICARD-1018)
|
||||
* Bugfix: Directory persistence for Add Directory needs tweaking (PICARD-1023)
|
||||
* Bugfix: Fix ~artists_sort metadata variable (PICARD-1029)
|
||||
* Bugfix: Missing import for PICARD_APP_NAME (PICARD-1042)
|
||||
* New Feature: Visual feedback for changes to artwork in before-after pane. (PICARD-258)
|
||||
* New Feature: Implement artwork diff for albums (PICARD-1000)
|
||||
* Task: Remove monkey patching of file write methods in picard formats (PICARD-943)
|
||||
* Task: Replace Ok button text by Make It So! in Options dialog (PICARD-1041)
|
||||
* Improvement: Remove should work when Unmatched Files is selected (PICARD-223)
|
||||
* Improvement: Always use HTTPS for musicbrainz.org (PICARD-951)
|
||||
* Improvement: Use Cover Art Archive over HTTPS (PICARD-952)
|
||||
* Improvement: Mention AcoustID on Scan button too (PICARD-961)
|
||||
* Improvement: Drag&drop cover art doesn't work for images from amazon/google images/https links (PICARD-980)
|
||||
* Improvement: Buttons on the "User Interface" and "Scripting" pages are smaller than buttons in other places (PICARD-1012)
|
||||
* Improvement: Multiple images in related tracks confusing (PICARD-1016)
|
||||
* Improvement: Picard loads all pending files before quitting (PICARD-1021)
|
||||
* Improvement: Allow specifying a configuration file path (PICARD-1024)
|
||||
* Improvement: Allow to add/replace cover art images and keep existing cover art (PICARD-1030)
|
||||
- Dropped 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 and
|
||||
fix-cover-art-downloads.diff which are already merged in 1.4.1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 17 10:16:22 UTC 2017 - olaf@aepfle.de
|
||||
|
||||
|
26
picard.spec
26
picard.spec
@ -17,23 +17,13 @@
|
||||
|
||||
|
||||
Name: picard
|
||||
Version: 1.4.0
|
||||
Version: 1.4.1
|
||||
Release: 0
|
||||
Summary: The Next Generation MusicBrainz Tagger
|
||||
License: GPL-2.0+
|
||||
Group: Productivity/Multimedia/Sound/Utilities
|
||||
Url: http://musicbrainz.org/doc/PicardTagger
|
||||
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
|
||||
Source0: ftp://ftp.musicbrainz.org/pub/musicbrainz/picard/%{name}-1.4.1.tar.gz
|
||||
# http://wiki.musicbrainz.org/Picard_Plugins
|
||||
# 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
|
||||
@ -70,17 +60,7 @@ tagging and cross platform compatibility.
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%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
|
||||
%setup -q -n %{name}-release-1.4.1
|
||||
|
||||
%build
|
||||
python setup.py config
|
||||
|
Loading…
Reference in New Issue
Block a user