Skip to content

[FEATURE] SQLite Metadata Layer & Background Enrichment #641

@safepay

Description

@safepay

Feature Proposal: SQLite Database Migration

Problem

PiKaraoke currently scans the song directory on every startup:

  • No persistence across restarts
  • Renamed/moved files appear as deleted + new (losing any future metadata)
  • Songs are just filenames with no structured metadata

Solution

Migrate to a persistent SQLite database with metadata enrichment.

Benefits

  • Persistent library - No rescanning on restart once db established
  • Move/rename detection - Files tracked by content hash, not path
  • Rich metadata - Artist, title, year, genre instead of just filenames

Implementation

Stage 1: Database Foundation

A complete feature delivering:

  • Persistent song library with hash-based file tracking
  • Automatic detection of added, moved, and deleted files
  • Admin UI for manual sync and database reset
  • Zero breaking changes - all existing features work identically

Stage 2: Metadata Enrichment

Transform filenames into structured metadata:

  • Filename parsing - Extract artist/title from common YouTube karaoke patterns
  • API enrichment - Fetch year/genre from iTunes API
  • Manual editor - UI for correcting/editing metadata

Rollback

  • Stage 1: Revert to direct file scanning, delete database files
  • Stage 2: Disable parsing, continue using filenames only

Success Criteria

  • App behavior identical to pre-migration
  • Move/rename detection works correctly
  • No performance regression
  • More than 99% of songs have accurate artist/title metadata

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions