{"id":31045907,"url":"https://github.com/colonelpanic8/scrobble-scrubber","last_synced_at":"2025-09-14T17:47:20.997Z","repository":{"id":305768776,"uuid":"1023862525","full_name":"colonelpanic8/scrobble-scrubber","owner":"colonelpanic8","description":"Automatically clean your last.fm scrobbles.","archived":false,"fork":false,"pushed_at":"2025-08-13T23:21:23.000Z","size":7247,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-14T01:16:40.165Z","etag":null,"topics":["lastfm","scrobble"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/colonelpanic8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-21T20:13:27.000Z","updated_at":"2025-08-13T23:21:26.000Z","dependencies_parsed_at":"2025-08-06T20:16:51.162Z","dependency_job_id":"a5816d83-fead-4443-82ec-0069aaf7d8e1","html_url":"https://github.com/colonelpanic8/scrobble-scrubber","commit_stats":null,"previous_names":["colonelpanic8/scrobble-scrubber"],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/colonelpanic8/scrobble-scrubber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fscrobble-scrubber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fscrobble-scrubber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fscrobble-scrubber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fscrobble-scrubber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colonelpanic8","download_url":"https://codeload.github.com/colonelpanic8/scrobble-scrubber/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colonelpanic8%2Fscrobble-scrubber/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275143585,"owners_count":25413091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lastfm","scrobble"],"created_at":"2025-09-14T17:47:20.073Z","updated_at":"2025-09-14T17:47:20.982Z","avatar_url":"https://github.com/colonelpanic8.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scrobble Scrubber\n\n[![CI](https://github.com/colonelpanic8/scrobble-scrubber/actions/workflows/ci.yml/badge.svg)](https://github.com/colonelpanic8/scrobble-scrubber/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Crates.io](https://img.shields.io/crates/v/scrobble-scrubber.svg)](https://crates.io/crates/scrobble-scrubber)\n[![docs.rs](https://docs.rs/scrobble-scrubber/badge.svg)](https://docs.rs/scrobble-scrubber)\n\nAutomated Last.fm scrobble monitoring and correction tool that continuously monitors your recent tracks and applies intelligent cleaning rules to fix metadata issues.\n\n## Features\n\n- **🔄 Continuous Monitoring**: Automatically polls your recent tracks at configurable intervals\n- **💾 Smart State Management**: Tracks processed scrobbles to avoid duplicate corrections\n- **🧹 Multiple Cleaning Providers**:\n  - **Pattern-Based Rules**: Lightning-fast regex-based cleaning for common issues\n  - **MusicBrainz Integration**: Validates and corrects metadata against the MusicBrainz database\n  - **AI-Powered Cleaning**: OpenAI integration for complex metadata issues requiring musical context\n  - **Compilation Detection**: Intelligently moves tracks from compilations to original albums\n- **🎯 Self-Improving System**: AI provider identifies patterns for new automated rules\n- **🔍 Dry Run Mode**: Preview changes before applying them to your scrobbles\n- **⚙️ Flexible Configuration**: Supports environment variables, config files, and CLI arguments\n- **🖥️ Interactive TUI**: Terminal user interface for managing rules and monitoring corrections\n\n## Quick Start\n\n### Installation\n\n```bash\n# Install from crates.io\ncargo install scrobble-scrubber\n\n# Or build from source\ngit clone https://github.com/colonelpanic8/scrobble-scrubber\ncd scrobble-scrubber\ncargo build --release\n```\n\n### Basic Setup\n\n```bash\n# Required: Last.fm credentials\nexport SCROBBLE_SCRUBBER_LASTFM_USERNAME=\"your_username\"\nexport SCROBBLE_SCRUBBER_LASTFM_PASSWORD=\"your_password\"\n\n# Run the scrubber (checks every 5 minutes by default)\nscrobble-scrubber\n\n# Or with custom settings\nscrobble-scrubber --interval 600 --dry-run\n```\n\n## Command Line Options\n\n```\nscrobble-scrubber [OPTIONS]\n\nOptions:\n  -i, --interval \u003cSECONDS\u003e     Check interval in seconds [default: 300]\n  -m, --max-tracks \u003cNUMBER\u003e    Maximum tracks to process per run [default: 100]\n  --dry-run                    Preview changes without applying them\n  --config \u003cPATH\u003e              Path to configuration file\n  -h, --help                   Print help information\n  -V, --version                Print version information\n```\n\n## Configuration\n\n### Environment Variables\n\nAll environment variables use the `SCROBBLE_SCRUBBER_` prefix:\n\n#### Required\n```bash\n# Last.fm credentials\nexport SCROBBLE_SCRUBBER_LASTFM_USERNAME=\"your_lastfm_username\"\nexport SCROBBLE_SCRUBBER_LASTFM_PASSWORD=\"your_lastfm_password\"\n```\n\n#### Optional Providers\n\n**OpenAI Integration**\n```bash\n# Enable OpenAI provider for AI-powered metadata cleaning\nexport SCROBBLE_SCRUBBER_PROVIDERS_ENABLE_OPENAI=true\nexport SCROBBLE_SCRUBBER_PROVIDERS_OPENAI_API_KEY=\"sk-...\"\n\n# Optional: Specify model (defaults to gpt-4o)\nexport SCROBBLE_SCRUBBER_PROVIDERS_OPENAI_MODEL=\"gpt-4o-mini\"\n```\n\n#### Scrubber Settings\n```bash\n# Check interval in seconds (default: 300)\nexport SCROBBLE_SCRUBBER_SCRUBBER_INTERVAL=300\n\n# Maximum tracks to process per run (default: 100)\nexport SCROBBLE_SCRUBBER_SCRUBBER_MAX_TRACKS=100\n\n# Dry run mode (default: false)\nexport SCROBBLE_SCRUBBER_SCRUBBER_DRY_RUN=true\n\n# Require confirmation for all edits (default: false)\nexport SCROBBLE_SCRUBBER_SCRUBBER_REQUIRE_CONFIRMATION=false\n```\n\n#### Additional Settings\n```bash\n# Enable/disable providers\nexport SCROBBLE_SCRUBBER_PROVIDERS_ENABLE_REWRITE_RULES=true\nexport SCROBBLE_SCRUBBER_PROVIDERS_ENABLE_HTTP=false\n\n# Storage configuration\nexport SCROBBLE_SCRUBBER_STORAGE_STATE_FILE=\"scrobble_state.db\"\n\n# Last.fm base URL (optional, defaults to https://www.last.fm)\nexport SCROBBLE_SCRUBBER_LASTFM_BASE_URL=\"https://www.last.fm\"\n```\n\n### Configuration Files\n\nConfiguration files are searched for in this order:\n1. `./scrobble-scrubber.toml` (current directory)\n2. `./config/scrobble-scrubber.toml` (config subdirectory)\n3. `$XDG_CONFIG_HOME/scrobble-scrubber/config.toml` (typically `~/.config/scrobble-scrubber/config.toml`)\n4. `$XDG_CONFIG_HOME/scrobble-scrubber/scrobble-scrubber.toml`\n5. `~/.config/scrobble-scrubber/config.toml` (legacy fallback)\n6. `~/.scrobble-scrubber.toml` (legacy fallback)\n\n**Priority Order** (highest to lowest):\n1. Command line arguments\n2. Environment variables\n3. Configuration file\n4. Built-in defaults\n\nSee [`config.example.toml`](config.example.toml) for a complete configuration example.\n\n## How It Works\n\n### Cleaning Providers\n\n#### 1. Pattern-Based Rules\nFast regex-based cleaning for common issues:\n- **Remaster suffixes**: `(2019 Remaster)`, `- Remastered`, etc.\n- **Featuring formats**: Normalizes `ft.`, `featuring`, `feat.` variations\n- **Whitespace**: Trims and normalizes spacing\n- **Custom patterns**: User-defined regex rules with capture groups\n\n#### 2. MusicBrainz Integration\nValidates and corrects metadata against the MusicBrainz database:\n- Album verification and correction\n- Artist name standardization\n- Track title validation\n- Compilation to original album mapping\n\n#### 3. AI-Powered Cleaning (Optional)\nOpenAI integration for complex metadata issues:\n- Context-aware typo correction\n- Artist name disambiguation\n- Complex collaboration formatting\n- Pattern detection for new rules\n\n## Development\n\n### Building from Source\n\n```bash\ngit clone https://github.com/colonelpanic8/scrobble-scrubber\ncd scrobble-scrubber\n\n# Build with default features\ncargo build --release\n\n# Build with all features including OpenAI\ncargo build --release --features full\n\n# Run tests\ncargo test\n```\n\n### Architecture\n\n- **`lastfm-edit`**: Core library for Last.fm API interactions\n- **Provider System**: Modular architecture for adding cleaning providers\n- **State Management**: SQLite-based tracking of processed scrobbles\n- **Action System**: Type-safe representation of metadata modifications\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolonelpanic8%2Fscrobble-scrubber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolonelpanic8%2Fscrobble-scrubber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolonelpanic8%2Fscrobble-scrubber/lists"}