forked from pool/picard
52 lines
1.8 KiB
Diff
52 lines
1.8 KiB
Diff
|
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
|
||
|
|