Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created Add Column album plugin #195

Merged
merged 3 commits into from Feb 18, 2019
Merged

Conversation

evandrocoan
Copy link
Contributor

@evandrocoan evandrocoan commented Dec 23, 2018

The same for version 1.4: #138

Tested with version 2.1.0

mineo
mineo previously requested changes Jan 1, 2019
plugins/add_album_column/__init__.py Outdated Show resolved Hide resolved
plugins/add_album_column/__init__.py Outdated Show resolved Hide resolved
plugins/add_album_column/__init__.py Outdated Show resolved Hide resolved
@evandrocoan
Copy link
Contributor Author

I hope I fixed everything.

@evandrocoan evandrocoan closed this Jan 1, 2019
@evandrocoan
Copy link
Contributor Author

Oops.

@evandrocoan evandrocoan reopened this Jan 1, 2019
@mineo
Copy link
Member

mineo commented Jan 1, 2019

Looks good to me. I'm not sure about two things that maybe @zas and @samj1912 know more about:

  • All other single-file plugins are named <pluginname>.py instead of __init__.py. Since they're packaged in zip files, this shouldn't matter, I think?
  • The plugin also appears to be active if it's disabled in the UI (at least I get an Album column in the main window). Was that also the case in Picard 1.x?

@evandrocoan
Copy link
Contributor Author

evandrocoan commented Jan 1, 2019

All other single-file plugins are named .py instead of init.py. Since they're packaged in zip files, this shouldn't matter, I think?

I do not know what is the difference.

The plugin also appears to be active if it's disabled in the UI (at least I get an Album column in the main window). Was that also the case in Picard 1.x?

Yes. I just tested. I do not why it does that. It seems to be loaded, even if it is disabled. May be it is a bug?

@phw
Copy link
Member

phw commented Jan 1, 2019

All other single-file plugins are named .py instead of init.py. Since they're packaged in zip files, this shouldn't matter, I think?

Yes, it doesn't matter much the way we currently distribute the plugins as a ZIP. It does make a difference if you give this to users as single files. If it is named add_album_column.py the file can just be placed in the plugin directory as is. If it is called init.py creating a subdirectory is mandatory.

I personally don't have a strong opinion which naming to prefer with our current ZIP structure, both ways have benefits.

@phw
Copy link
Member

phw commented Jan 1, 2019

The plugin also appears to be active if it's disabled in the UI (at least I get an Album column in the main window). Was that also the case in Picard 1.x?

Yes. I just tested. I do not why it does that. It seems to be loaded, even if it is disabled. May be it is a bug?

Not a bug really, but a limitation of the plugin system. Picard's plugin system does not directly support a plugin like this. In some way this plugin just abuses the fact that plugins get executed on load to monkey patch Picard. It really is more a hack then a proper plugin.

There is some discussion about redesigning the plugin system, and one point definitely should be to allow for explicit activation / deactivation hooks for plugins. Together with properly defined interfaces for some UI manipulation that would allow more flexibility here.

In the meantime maybe the fact that this plugin is always active and cannot be deactivated should be mentioned in the description.

@phw phw merged commit 1d53f1c into metabrainz:2.0 Feb 18, 2019
@evandrocoan evandrocoan deleted the add_album_column branch February 19, 2019 00:03
@mxmilkiib
Copy link

Can I request a screenshot of what this plugin looks like?

@evandrocoan
Copy link
Contributor Author

Of course!

It looks like this with Picard version 2.1.0 on Windows 10:
image

uqs pushed a commit to freebsd/freebsd-ports that referenced this pull request Mar 19, 2019
- Add ALBUM_COLUMN option to enable the Add Album Column plugin - disabled by
  default since it changes the UI and the only way to disable it is to
  deinstall it. See: metabrainz/picard-plugins#195
- Use BUILD_WRKSRC everywhere
- Remove hidden files and backup files from the build directory

New plugins (see: https://picard.musicbrainz.org/plugins/ for descriptions)
 - Add Album Column
 - Amazon cover art
 - Apiseeds Lyrics
 - Instruments
 - TheAudioDB cover art


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@496239 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this pull request Mar 19, 2019
- Add ALBUM_COLUMN option to enable the Add Album Column plugin - disabled by
  default since it changes the UI and the only way to disable it is to
  deinstall it. See: metabrainz/picard-plugins#195
- Use BUILD_WRKSRC everywhere
- Remove hidden files and backup files from the build directory

New plugins (see: https://picard.musicbrainz.org/plugins/ for descriptions)
 - Add Album Column
 - Amazon cover art
 - Apiseeds Lyrics
 - Instruments
 - TheAudioDB cover art
Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this pull request Mar 19, 2019
- Add ALBUM_COLUMN option to enable the Add Album Column plugin - disabled by
  default since it changes the UI and the only way to disable it is to
  deinstall it. See: metabrainz/picard-plugins#195
- Use BUILD_WRKSRC everywhere
- Remove hidden files and backup files from the build directory

New plugins (see: https://picard.musicbrainz.org/plugins/ for descriptions)
 - Add Album Column
 - Amazon cover art
 - Apiseeds Lyrics
 - Instruments
 - TheAudioDB cover art


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@496239 35697150-7ecd-e111-bb59-0022644237b5
@wisdomtooth
Copy link

I get (running from pip installed version):

/usr/local/lib/python3.7/site-packages/picard/plugin.plugin_error:261: Failed loading zipped plugin 'add_album_column'

@evandrocoan
Copy link
Contributor Author

There is some sort of bug, where you need to go to the Picard's plugin directory and manually unzip the plugin file:

  1. image
  2. image
  3. image
  4. image
  5. image
  6. Once you do that, you can restart Picard's and it will be working
  7. image
  8. Before restart:
    image
  9. After restart:
    image

@phw
Copy link
Member

phw commented Jun 23, 2019

@wisdomtooth This was supposed to be fixed with af3de8b . Strange, I will check tomorrow

svmhdvn pushed a commit to svmhdvn/freebsd-ports that referenced this pull request Jan 10, 2024
- Add ALBUM_COLUMN option to enable the Add Album Column plugin - disabled by
  default since it changes the UI and the only way to disable it is to
  deinstall it. See: metabrainz/picard-plugins#195
- Use BUILD_WRKSRC everywhere
- Remove hidden files and backup files from the build directory

New plugins (see: https://picard.musicbrainz.org/plugins/ for descriptions)
 - Add Album Column
 - Amazon cover art
 - Apiseeds Lyrics
 - Instruments
 - TheAudioDB cover art
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants