[Feature] Quality Grading System for Media Assets

Resolved 💬 2 comments Opened Jan 14, 2026 by pwtoday-gtms Closed Feb 28, 2026

Summary

Implement a quality grading system for media assets that provides users with visibility into the quality of their library content.

Implementation Status

  • [x] Database schema - Added quality columns to download_assets, media_items, and episodes tables
  • [x] Quality Analyzer Service (app/services/quality_analyzer.py) - Multi-factor analysis including:
  • Metadata scoring (40%): Resolution, HDR, source type, audio codec
  • ML-based perceptual quality (30%): BRISQUE + NIQE metrics via PyIQA
  • Bitrate efficiency (20%): Bitrate per pixel analysis
  • Manual override support (10%): User adjustment capability
  • [x] Integration with batch optimizer - Quality analysis runs after successful optimization
  • [x] Branded tier naming: S (LOCKED ON), A (STRONG BEAM), B (TRACKING), C (WEAK SIGNAL), D (STATIC)

Remaining Work

  • [ ] Add quality grade display in tvOS app UI
  • [ ] Add quality grade display in web UI (movie/episode pages)
  • [ ] Add API endpoint to manually override quality grades
  • [ ] Add bulk quality analysis for existing library content
  • [ ] Consider VMAF scoring for more accurate quality assessment

Technical Notes

  • All processing is fully local (no external API calls after initial model download)
  • Analysis takes ~15 seconds per file on M4 Max
  • PyIQA models cached at ~/.cache/torch/hub/pyiqa/

Files Changed

  • app/services/quality_analyzer.py (new)
  • app/services/optimization_batch.py (modified)
  • Database schema updated (quality columns added)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗