diff --git a/README.md b/README.md new file mode 100644 index 0000000..5902faa --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# AcousticBrainz-ng + +This plugin is not affiliated with the [AcousticBrainz](https://acousticbrainz.org) project. + +## Features + +- Moods +- ReplayGain +- BPM +- Key +- [Tags](./models/msd-musicnn-1.json) + +## Getting started + +1. Clone this repository to your Picard plugins folder +2. Enable the plugin +3. If not correctly set already, set the FFmpeg executable path in the plugin options page diff --git a/__init__.py b/__init__.py index b8fba8f..90a50c4 100644 --- a/__init__.py +++ b/__init__.py @@ -912,7 +912,7 @@ class AcousticBrainzNGAction(BaseAction): self.current = 0 def _get_pending(self) -> int: - label = self.tagger.window.status_indicators[0].val4 + label = self.tagger.window.status_indicators[0].val4 # pyright: ignore[reportAttributeAccessIssue] try: pending = int(label.text() or "0") @@ -923,7 +923,7 @@ class AcousticBrainzNGAction(BaseAction): return pending def _update_pending_count(self, delta: int): - label = self.tagger.window.status_indicators[0].val4 + label = self.tagger.window.status_indicators[0].val4 # pyright: ignore[reportAttributeAccessIssue] pending = self._get_pending() label.setNum(pending + delta) @@ -951,22 +951,22 @@ class AcousticBrainzNGAction(BaseAction): if album: album_name = album.metadata.get('album', 'Unknown Album') track_name = track.metadata.get('title', 'Unknown Track') - self.tagger.window.set_statusbar_message( + self.tagger.window.set_statusbar_message( # pyright: ignore[reportAttributeAccessIssue] 'Successfully analyzed "%s" from "%s"%s.', track_name, album_name, progress ) else: track_name = track.metadata.get('title', 'Unknown Track') - self.tagger.window.set_statusbar_message( + self.tagger.window.set_statusbar_message( # pyright: ignore[reportAttributeAccessIssue] 'Successfully analyzed "%s"%s.', track_name, progress ) else: track_name = track.metadata.get('title', 'Unknown Track') if result['files_processed'] > 0: - self.tagger.window.set_statusbar_message( + self.tagger.window.set_statusbar_message( # pyright: ignore[reportAttributeAccessIssue] 'Partially analyzed "%s" with warnings%s.', track_name, progress ) else: - self.tagger.window.set_statusbar_message( + self.tagger.window.set_statusbar_message( # pyright: ignore[reportAttributeAccessIssue] 'Failed to analyze "%s"%s.', track_name, progress ) else: @@ -976,7 +976,7 @@ class AcousticBrainzNGAction(BaseAction): error_msg = str(error) if error else "Unknown error" log.error(f"Analysis failed for {track_name}: {error_msg}") - self.tagger.window.set_statusbar_message( + self.tagger.window.set_statusbar_message( # pyright: ignore[reportAttributeAccessIssue] 'Failed to analyze "%s"%s.', track_name, progress ) @@ -1012,9 +1012,9 @@ class AcousticBrainzNGAction(BaseAction): if self.num_tracks == 1: track, album = tracks_to_process[0] track_name = track.metadata.get('title', 'Unknown Track') - self.tagger.window.set_statusbar_message('Analyzing "%s" with %s...', track_name, PLUGIN_NAME) + self.tagger.window.set_statusbar_message('Analyzing "%s" with %s...', track_name, PLUGIN_NAME) # pyright: ignore[reportAttributeAccessIssue] else: - self.tagger.window.set_statusbar_message('Analyzing %i tracks with %s...', self.num_tracks, PLUGIN_NAME) + self.tagger.window.set_statusbar_message('Analyzing %i tracks with %s...', self.num_tracks, PLUGIN_NAME) # pyright: ignore[reportAttributeAccessIssue] log.debug(f"Analyzing {total_files} files from {self.num_tracks} tracks with {PLUGIN_NAME}") diff --git a/constants.py b/constants.py index 8b2c352..dda068c 100644 --- a/constants.py +++ b/constants.py @@ -12,17 +12,17 @@ This plugin is not affiliated with the Acou This is not a 1:1 recreation of the AcousticBrainz schema, but will provide most of the meaningful data
External dependencies:
This plugin is CPU heavy! """ PLUGIN_VERSION = "1.0.0" -PLUGIN_API_VERSIONS = ["2.7", "2.8", "2.9", "2.10", "2.11"] +PLUGIN_API_VERSIONS = ["2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13"] PLUGIN_LICENSE = "GPL-2.0-or-later" PLUGIN_LICENSE_URL = "https://www.gnu.org/licenses/gpl-2.0.html" -PLUGIN_USER_GUIDE_URL = "https://example.com" # TODO: Update with actual user guide URL +PLUGIN_USER_GUIDE_URL = "https://git.altaiar.dev/ahmed/acousticbrainz-ng" REQUIRED_MODELS: List[Tuple[str, str]] = [ ("msd-musicnn-1", "msd"),