Add Album Column Plugin - Modification / New columns

Hello

The plugin can not be installed, nothing happens when the green arrow is pressed. When you try to manually install from a zip file, a message pops up:


Manual installation of the .py file is successful, but the plugin does not work and is not visible in the plug-in window. Tested with versions: 2.1, 2.1.3, 2.2.0.dev1 (python3.7.2_20190312182933).

Manual edition of PLUGIN_API_VERSIONS in init.py also don’t work.

# -*- coding: UTF-8 -*-

#
# Licensing
#
# Add Album Column, Add the Album column to the main window panel
# Copyright (C) 2019 Evandro Coan <https://github.com/evandrocoan>
#
#  Redistributions of source code must retain the above
#  copyright notice, this list of conditions and the
#  following disclaimer.
#
#  Redistributions in binary form must reproduce the above
#  copyright notice, this list of conditions and the following
#  disclaimer in the documentation and/or other materials
#  provided with the distribution.
#
#  Neither the name Evandro Coan nor the names of any
#  contributors may be used to endorse or promote products
#  derived from this software without specific prior written
#  permission.
#
#  This program is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by the
#  Free Software Foundation; either version 3 of the License, or ( at
#  your option ) any later version.
#
#  This program is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#  General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

PLUGIN_NAME = u"Add Album Column"
PLUGIN_AUTHOR = u"Evandro Coan"
PLUGIN_DESCRIPTION = """Add the Album column to the main window panel.

WARNING: This plugin cannot be disabled. See:
https://github.com/metabrainz/picard-plugins/pull/195
"""

PLUGIN_VERSION = "1.0"
PLUGIN_API_VERSIONS = ["2.0", "2.1", "2.1.3", "2.2.0.dev1"]
PLUGIN_LICENSE = "GPL-3.0-or-later"
PLUGIN_LICENSE_URL = "http://www.gnu.org/licenses/"

from picard.ui.itemviews import MainPanel
MainPanel.columns.append((N_('Album'), 'album'))

The second thing, if we add a command to the file:

from picard.ui.itemviews import MainPanel
MainPanel.columns.append((N_('Album'), 'album'))
MainPanel.columns.append((N_('Catalog#'), 'catalognumber'))

is a column with catalognumber displayed in the program window?

I’ve searched github, and found a solution. Change the file name from init .py to add_album_column.py and copy / paste it to the folder with plugins: C:\Users\xxxxx\AppData\Local\MusicBrainz\Picard\plugins

In addition, I added a pair of parameters and the main window also shows in tracks: catalognumber, genre, media.

Link to the modified plugin: https://www88.zippyshare.com/v/IO7tu2Xd/file.html
Or paste/replace into init.py:

from picard.ui.itemviews import MainPanel
MainPanel.columns.append((N_('Album'), 'album'))
MainPanel.columns.append((N_('Catalog#'), 'catalognumber'))
MainPanel.columns.append((N_('Genre'), 'genre'))
MainPanel.columns.append((N_('Media'), 'media'))

Is it possible, that additional information (catalognumber, media) was displayed only in albums not tracks? As below:

Last thing, I would like also Disambiguation to be displayed as well. Unfortunately, I failed, I tried with the parameters:

  • Disambiguation
  • comment
  • _releasecomment
  • releasecomment
  • _releasegroupcomment
  • releasegroupcomment
  • _recordingcomment
  • recordingcomment
  • comment:description

But they don’t work. Any suggestions?

1 Like

Thanks for reporting this. The ZIP file for this plugin gets generated wrongly.

@zas I made a fix ready, but by mistake commited directly to the main branch. Can you review Properly generate ZIPs for single file Python packages · metabrainz/picard-plugins@af3de8b · GitHub and rebuild the plugins?

Depends on which disambiguation comment you want to have (recording, release or release group). Pick what you need:

MainPanel.columns.append((N_('Comment Release'), '~releasecomment'))
MainPanel.columns.append((N_('Comment RG'), '~releasegroupcomment'))
MainPanel.columns.append((N_('Comment Recording'), '~recordingcomment'))
2 Likes

@outsidecontext Your help is invaluable. Thank you.

Is it possible, that additional information (catalognumber, media) was displayed only in albums not tracks? As below:

And this, making it is easy? Is this a matter of one or two commands or is there more work / more complicated?

I deployed picard website with updated plugins.

3 Likes