Basic README

This commit is contained in:
2025-08-13 12:17:39 -04:00
parent c515e85c18
commit 5fe0171b78
3 changed files with 30 additions and 13 deletions

17
README.md Normal file
View File

@@ -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

View File

@@ -912,7 +912,7 @@ class AcousticBrainzNGAction(BaseAction):
self.current = 0 self.current = 0
def _get_pending(self) -> int: 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: try:
pending = int(label.text() or "0") pending = int(label.text() or "0")
@@ -923,7 +923,7 @@ class AcousticBrainzNGAction(BaseAction):
return pending return pending
def _update_pending_count(self, delta: int): 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() pending = self._get_pending()
label.setNum(pending + delta) label.setNum(pending + delta)
@@ -951,22 +951,22 @@ class AcousticBrainzNGAction(BaseAction):
if album: if album:
album_name = album.metadata.get('album', 'Unknown Album') album_name = album.metadata.get('album', 'Unknown Album')
track_name = track.metadata.get('title', 'Unknown Track') 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 'Successfully analyzed "%s" from "%s"%s.', track_name, album_name, progress
) )
else: else:
track_name = track.metadata.get('title', 'Unknown Track') 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 'Successfully analyzed "%s"%s.', track_name, progress
) )
else: else:
track_name = track.metadata.get('title', 'Unknown Track') track_name = track.metadata.get('title', 'Unknown Track')
if result['files_processed'] > 0: 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 'Partially analyzed "%s" with warnings%s.', track_name, progress
) )
else: else:
self.tagger.window.set_statusbar_message( self.tagger.window.set_statusbar_message( # pyright: ignore[reportAttributeAccessIssue]
'Failed to analyze "%s"%s.', track_name, progress 'Failed to analyze "%s"%s.', track_name, progress
) )
else: else:
@@ -976,7 +976,7 @@ class AcousticBrainzNGAction(BaseAction):
error_msg = str(error) if error else "Unknown error" error_msg = str(error) if error else "Unknown error"
log.error(f"Analysis failed for {track_name}: {error_msg}") 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 'Failed to analyze "%s"%s.', track_name, progress
) )
@@ -1012,9 +1012,9 @@ class AcousticBrainzNGAction(BaseAction):
if self.num_tracks == 1: if self.num_tracks == 1:
track, album = tracks_to_process[0] track, album = tracks_to_process[0]
track_name = track.metadata.get('title', 'Unknown Track') 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: 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}") log.debug(f"Analyzing {total_files} files from {self.num_tracks} tracks with {PLUGIN_NAME}")

View File

@@ -12,17 +12,17 @@ This plugin is not affiliated with the <a href='https://acousticbrainz.org'>Acou
This is not a 1:1 recreation of the AcousticBrainz schema, but will provide most of the meaningful data<br/> This is not a 1:1 recreation of the AcousticBrainz schema, but will provide most of the meaningful data<br/>
External dependencies: External dependencies:
<ul> <ul>
<li><a href='https://essentia.upf.edu'>Essentia</a> binaries compiled with TensorFlow and gaia2 support</li> <li><a href='https://essentia.upf.edu'>Essentia</a> binaries compiled with TensorFlow and gaia2 support (included)</li>
<li>A few MusicNN models (see user guide for details)</li> <li>A few MusicNN models (included)</li>
<li><a href='https://ffmpeg.org'>FFmpeg</a></li> <li><a href='https://ffmpeg.org'>FFmpeg</a></li>
</ul> </ul>
<strong>This plugin is CPU heavy!</strong> <strong>This plugin is CPU heavy!</strong>
""" """
PLUGIN_VERSION = "1.0.0" 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 = "GPL-2.0-or-later"
PLUGIN_LICENSE_URL = "https://www.gnu.org/licenses/gpl-2.0.html" 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]] = [ REQUIRED_MODELS: List[Tuple[str, str]] = [
("msd-musicnn-1", "msd"), ("msd-musicnn-1", "msd"),