Skip to content

Commit

Permalink
acousticbrainz: Renamed Acousticbrainz to AcousticBrainz
Browse files Browse the repository at this point in the history
  • Loading branch information
phw committed Jul 2, 2021
1 parent 943b4ea commit 50ea78c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
16 changes: 8 additions & 8 deletions plugins/acousticbrainz/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Acousticbrainz plugin for Picard
# AcousticBrainz plugin for Picard
# Copyright (C) 2021 Wargreen
#
# This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -66,7 +66,7 @@
from picard.util import load_json
from picard.ui.options import register_options_page, OptionsPage
from picard.metadata import register_track_metadata_processor
from picard.plugins.acousticbrainz.ui_options_acousticbrainz_tags import Ui_AcousticbrainzOptionsPage
from picard.plugins.acousticbrainz.ui_options_acousticbrainz_tags import Ui_AcousticBrainzOptionsPage

ratecontrol.set_minimum_delay((ACOUSTICBRAINZ_HOST, ACOUSTICBRAINZ_PORT), 250)

Expand Down Expand Up @@ -318,7 +318,7 @@ def process_sublowlevel(self):
# =============================================================================
# (provides track processing callback)

class AcousticbrainzPlugin:
class AcousticBrainzPlugin:

def __init__(self):
self.tracks = {}
Expand All @@ -334,7 +334,7 @@ def process_track(album, metadata, _, release):
# =============================================================================
# (define plugin options and link with user interface)

class AcousticbrainzOptionsPage(OptionsPage):
class AcousticBrainzOptionsPage(OptionsPage):
NAME = "AcousticBrainz"
TITLE = "AcousticBrainz tags"
PARENT = "plugins"
Expand All @@ -348,8 +348,8 @@ class AcousticbrainzOptionsPage(OptionsPage):
]

def __init__(self, parent=None):
super(AcousticbrainzOptionsPage, self).__init__(parent)
self.ui = Ui_AcousticbrainzOptionsPage()
super(AcousticBrainzOptionsPage, self).__init__(parent)
self.ui = Ui_AcousticBrainzOptionsPage()
self.ui.setupUi(self)

def load(self):
Expand All @@ -369,6 +369,6 @@ def save(self):
setting["acousticbrainz_add_sublowlevel"] = self.ui.add_sublowlevel.isChecked()


plugin = AcousticbrainzPlugin()
plugin = AcousticBrainzPlugin()
register_track_metadata_processor(plugin.process_track)
register_options_page(AcousticbrainzOptionsPage)
register_options_page(AcousticBrainzOptionsPage)
36 changes: 18 additions & 18 deletions plugins/acousticbrainz/ui_options_acousticbrainz_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_AcousticbrainzOptionsPage(object):
def setupUi(self, AcousticbrainzOptionsPage):
AcousticbrainzOptionsPage.setObjectName("AcousticbrainzOptionsPage")
AcousticbrainzOptionsPage.setEnabled(True)
AcousticbrainzOptionsPage.resize(527, 443)
AcousticbrainzOptionsPage.setWindowTitle("")
self.verticalLayout = QtWidgets.QVBoxLayout(AcousticbrainzOptionsPage)
class Ui_AcousticBrainzOptionsPage(object):
def setupUi(self, AcousticBrainzOptionsPage):
AcousticBrainzOptionsPage.setObjectName("AcousticBrainzOptionsPage")
AcousticBrainzOptionsPage.setEnabled(True)
AcousticBrainzOptionsPage.resize(527, 443)
AcousticBrainzOptionsPage.setWindowTitle("")
self.verticalLayout = QtWidgets.QVBoxLayout(AcousticBrainzOptionsPage)
self.verticalLayout.setObjectName("verticalLayout")
self.acousticbrainzTags_groupBox = QtWidgets.QGroupBox(AcousticbrainzOptionsPage)
self.acousticbrainzTags_groupBox = QtWidgets.QGroupBox(AcousticBrainzOptionsPage)
self.acousticbrainzTags_groupBox.setObjectName("acousticbrainzTags_groupBox")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.acousticbrainzTags_groupBox)
self.verticalLayout_2.setObjectName("verticalLayout_2")
Expand Down Expand Up @@ -48,15 +48,15 @@ def setupUi(self, AcousticbrainzOptionsPage):
self.verticalLayout_2.addItem(spacerItem1)
self.verticalLayout.addWidget(self.acousticbrainzTags_groupBox)

self.retranslateUi(AcousticbrainzOptionsPage)
QtCore.QMetaObject.connectSlotsByName(AcousticbrainzOptionsPage)
self.retranslateUi(AcousticBrainzOptionsPage)
QtCore.QMetaObject.connectSlotsByName(AcousticBrainzOptionsPage)

def retranslateUi(self, AcousticbrainzOptionsPage):
def retranslateUi(self, AcousticBrainzOptionsPage):
_translate = QtCore.QCoreApplication.translate
self.acousticbrainzTags_groupBox.setTitle(_translate("AcousticbrainzOptionsPage", "AcousticBrainz Tags"))
self.add_simplemood.setText(_translate("AcousticbrainzOptionsPage", "Add simple Mood tags"))
self.add_simplegenre.setText(_translate("AcousticbrainzOptionsPage", "Add simple Genre tags"))
self.add_keybpm.setText(_translate("AcousticbrainzOptionsPage", "Add simple BPM and Key tags"))
self.add_fullhighlevel.setText(_translate("AcousticbrainzOptionsPage", "Add all highlevel AcousticBrainz tags"))
self.add_sublowlevel.setText(_translate("AcousticbrainzOptionsPage", "Add a subset of the lowlevel AcousticBrainz tags"))
self.sublowlevel_descr.setText(_translate("AcousticbrainzOptionsPage", "<html><head/><body><p>The low level subset include:</p><ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li style=\" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">rhythm:bpm</li><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">tonal:chords_change_rate</li><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">tonal:chords_key</li><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">tonal:chords_scale</li><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">tonal:key_key</li><li style=\" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">tonal:key_scale</li></ul></body></html>"))
self.acousticbrainzTags_groupBox.setTitle(_translate("AcousticBrainzOptionsPage", "AcousticBrainz Tags"))
self.add_simplemood.setText(_translate("AcousticBrainzOptionsPage", "Add simple Mood tags"))
self.add_simplegenre.setText(_translate("AcousticBrainzOptionsPage", "Add simple Genre tags"))
self.add_keybpm.setText(_translate("AcousticBrainzOptionsPage", "Add simple BPM and Key tags"))
self.add_fullhighlevel.setText(_translate("AcousticBrainzOptionsPage", "Add all highlevel AcousticBrainz tags"))
self.add_sublowlevel.setText(_translate("AcousticBrainzOptionsPage", "Add a subset of the lowlevel AcousticBrainz tags"))
self.sublowlevel_descr.setText(_translate("AcousticBrainzOptionsPage", "<html><head/><body><p>The low level subset include:</p><ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li style=\" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">rhythm:bpm</li><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">tonal:chords_change_rate</li><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">tonal:chords_key</li><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">tonal:chords_scale</li><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">tonal:key_key</li><li style=\" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">tonal:key_scale</li></ul></body></html>"))
4 changes: 2 additions & 2 deletions plugins/acousticbrainz/ui_options_acousticbrainz_tags.ui
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AcousticbrainzOptionsPage</class>
<widget class="QWidget" name="AcousticbrainzOptionsPage">
<class>AcousticBrainzOptionsPage</class>
<widget class="QWidget" name="AcousticBrainzOptionsPage">
<property name="enabled">
<bool>true</bool>
</property>
Expand Down

0 comments on commit 50ea78c

Please sign in to comment.