From 08444f4d6252c1936a9a32f25433aa6779767a2f Mon Sep 17 00:00:00 2001 From: Sophist Date: Fri, 4 Apr 2014 18:32:59 +0100 Subject: [PATCH] Minor tweak to display if variable is null string --- contrib/plugins/viewvariables/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/viewvariables/__init__.py b/contrib/plugins/viewvariables/__init__.py index 8617b7335..2a9b87d44 100644 --- a/contrib/plugins/viewvariables/__init__.py +++ b/contrib/plugins/viewvariables/__init__.py @@ -3,7 +3,7 @@ PLUGIN_NAME = u'View script variables' PLUGIN_AUTHOR = u'Sophist' PLUGIN_DESCRIPTION = u'''Display a dialog box listing the metadata variables for the track / file.''' -PLUGIN_VERSION = '0.4' +PLUGIN_VERSION = '0.5' PLUGIN_API_VERSIONS = ['1.0'] from PyQt4 import QtGui, QtCore @@ -84,8 +84,8 @@ class ViewVariablesDialog(QtGui.QDialog): i += 1 key_item.setText(u"_" + key[1:] if key.startswith('~') else key) if key in metadata: - value = dict.get(metadata, key, []) - if len(value) == 1: + value = dict.get(metadata, key) + if len(value) == 1 and value[0] != '': value = value[0] else: value = repr(value)