Skip to content

feat: Discogs music scraper plugin (#87)#100

Open
fabiodalez-dev wants to merge 28 commits intomainfrom
feature/87-discogs-plugin
Open

feat: Discogs music scraper plugin (#87)#100
fabiodalez-dev wants to merge 28 commits intomainfrom
feature/87-discogs-plugin

Conversation

@fabiodalez-dev
Copy link
Copy Markdown
Owner

@fabiodalez-dev fabiodalez-dev commented Mar 30, 2026

Summary

New optional plugin that integrates with the Discogs API for music metadata scraping (CD, LP, vinyl, cassette).

Closes #87

How it works

  • Registers as a scraping source via the existing hook system (scrape.sources, scrape.fetch.custom, scrape.data.modify)
  • Searches by barcode (EAN) first (most reliable for physical media), falls back to title search
  • Fetches full release details and maps to Pinakes fields:
Discogs Pinakes
Artists Autore
Labels Editore
Year Anno pubblicazione
Tracklist Descrizione
Images Copertina
Barcode EAN
Genres Genere
Format (CD/Vinyl/etc) Formato

Configuration

  • Optional Discogs personal access token (Settings > Plugin) for 60 req/min instead of 25
  • No token required for basic functionality
  • 1-second delay between API calls for rate limiting

Files

  • storage/plugins/discogs/DiscogsPlugin.php — Main plugin class
  • storage/plugins/discogs/wrapper.php — PluginManager compatibility wrapper
  • storage/plugins/discogs/plugin.json — Plugin manifest
  • storage/plugins/discogs/README.md — Documentation
  • .gitignore — Added discogs plugin exceptions

Test plan

  • Install and activate plugin from Admin > Plugins
  • Search a music CD by barcode (EAN)
  • Search a vinyl record by title
  • Verify cover, tracklist, artist, label are populated
  • Verify rate limiting (1s between requests)
  • Test without API token (should work with 25 req/min limit)
  • PHPStan level 1 passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Discogs-backed music scraper with MusicBrainz/Deezer cover enrichment and admin-configurable API token; plugin install/activation UI.
  • UI Improvements

    • Media-type (tipo_media) support across import/export, filters, badges/icons, media-aware detail pages (MusicAlbum schema, tracklist formatting) and settings page with token redaction.
  • Localization

    • Added IT/EN/DE translations for media/music labels and messages.
  • Tests

    • Multiple Playwright E2E suites for scraping, import, media-type and plugin flows.
  • Chores

    • DB migration adding tipo_media and composite index; installer/updater and plugin loading robustness improvements.

Loading
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.

Proposal: Music audio CD/LP

1 participant