P
Peter69
Guest
Hi.
I have completed the plugin.
You can select everything in the right panel or any number and order.
After each selection (blue background of the bar) you need to call the plugin.
WARNING:
The plugin removes unwanted albums from the list while leaving the wanted ones.
|
|
Code:
7 posts - 3 participants
Read full topic
Continue reading...
I have completed the plugin.
You can select everything in the right panel or any number and order.
After each selection (blue background of the bar) you need to call the plugin.
WARNING:
The plugin removes unwanted albums from the list while leaving the wanted ones.

|

|

Code:
Code:
PLUGIN_NAME = "Show Only Selected Albums"
PLUGIN_AUTHOR = "Echelon"
PLUGIN_DESCRIPTION = "Shows only selected album types from the selection in the right Picard panel"
PLUGIN_VERSION = '0.1'
PLUGIN_API_VERSIONS = ['2.2']
PLUGIN_LICENSE = "GPL-2.0-or-later"
PLUGIN_LICENSE_URL = "https://www.gnu.org/licenses/gpl-2.0.html"
from PyQt5 import QtGui
from PyQt5.QtWidgets import QLabel, QGridLayout, QWidget, QCheckBox
from PyQt5.QtGui import QPixmap, QIcon
from PyQt5.QtCore import QCoreApplication
from picard.ui.itemviews import BaseAction, register_album_action
showwindow = QWidget()
showwindow.setStyleSheet("font-size:12pt;")
grid = QGridLayout()
showwindow.setLayout(grid)
showwindow.setGeometry(1500, 200, 400, 150)
showwindow.setWindowTitle("Show Albums")
showwindow.setWindowIcon(QtGui.QIcon(":/images/16x16/org.musicbrainz.Picard.png"))
ckbox1 = QCheckBox("Show only this album")
ckbox2 = QCheckBox("Show only this album")
ckbox3 = QCheckBox("Show only this album")
ckbox4 = QCheckBox("Show only this album")
ckbox5 = QCheckBox("Show only this album")
grid.addWidget(ckbox1, 0, 0)
grid.addWidget(ckbox2, 1, 0)
grid.addWidget(ckbox3, 2, 0)
grid.addWidget(ckbox4, 3, 0)
grid.addWidget(ckbox5, 4, 0)
icon1 = QLabel()
icon1.setPixmap(QPixmap(":/images/22x22/media-optical.png"))
icon2 = QLabel()
icon2.setPixmap(QPixmap(":/images/22x22/media-optical-modified.png"))
icon3 = QLabel()
icon3.setPixmap(QPixmap(":/images/22x22/media-optical-saved.png"))
icon4 = QLabel()
icon4.setPixmap(QPixmap(":/images/22x22/media-optical-saved-modified.png"))
icon5 = QLabel()
icon5.setPixmap(QPixmap(":/images/22x22/media-optical-error.png"))
grid.addWidget(icon1, 0, 1)
grid.addWidget(icon2, 1, 1)
grid.addWidget(icon3, 2, 1)
grid.addWidget(icon4, 3, 1)
grid.addWidget(icon5, 4, 1)
class ShowAlbums(BaseAction):
NAME = 'Show albums'
def callback(self, objs):
if ckbox1.isChecked():
pass
else:
for album in objs:
if album.errors:
pass
elif album.is_complete():
if album.is_modified():
pass
else:
pass
else:
if album.is_modified():
pass
else:
self.tagger.remove_album(album)
QCoreApplication.processEvents()
if ckbox2.isChecked():
pass
else:
for album in objs:
if album.errors:
pass
elif album.is_complete():
if album.is_modified():
pass
else:
pass
else:
if album.is_modified():
self.tagger.remove_album(album)
QCoreApplication.processEvents()
else:
pass
if ckbox3.isChecked():
pass
else:
for album in objs:
if album.errors:
pass
elif album.is_complete():
if album.is_modified():
pass
else:
self.tagger.remove_album(album)
QCoreApplication.processEvents()
else:
if album.is_modified():
pass
else:
pass
if ckbox4.isChecked():
pass
else:
for album in objs:
if album.errors:
pass
elif album.is_complete():
if album.is_modified():
self.tagger.remove_album(album)
QCoreApplication.processEvents()
else:
pass
else:
if album.is_modified():
pass
else:
pass
if ckbox5.isChecked():
pass
else:
for album in objs:
if album.errors:
self.tagger.remove_album(album)
QCoreApplication.processEvents()
elif album.is_complete():
if album.is_modified():
pass
else:
pass
else:
if album.is_modified():
pass
else:
pass
showwindow.show()
register_album_action(ShowAlbums())
7 posts - 3 participants
Read full topic
Continue reading...