Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix(sources): give imported streaming songs the source's title, artist and cover

merged
#705 opened by devfix/streaming-import-artwork→main
Conversation2 Commits0
devopened this pull requestAuthor· 2 weeks ago
Files changed
…

Summary

Songs imported from a streaming source arrived in the library without a cover, and untagged downloads such as Bilibili audio arrived as their file name with "Unknown Artist". Stacked on #702, which adds the artwork registry this uses.

Changes

  • After an import or a confirmed replace, a song takes the title and artist the user picked it by (the file's values stay only when the source gives none), and the source's artwork when the file embeds none. Neither step fails the import.
  • StreamingSource::artwork returns cover bytes; the plugin source loads them through the same cache and resource-origin checks as listing covers.
  • set_cover_art is split out of embedded-cover extraction so both paths store covers and derivatives the same way.
  • Contract note in catalog.md.

Screenshots

Release build with a real Bilibili account, importing one public favorite. Before: the title is the file name and the artist is unknown. After: the video title and its uploader. The cover came from the video in both runs because this file happens to embed one; the unit test covers a file without one.

BeforeAfter
Library row before: file name and Unknown ArtistLibrary row after: video title and uploader

Test plan

  • cargo test --release --lib -- catalog library: 215 passed, including the new an_untagged_import_takes_the_source_title_artist_and_artwork
  • cargo clippy --release --lib --tests: clean
  • Release app: imported a Bilibili favorite; the library row shows the video cover, its title and its uploader

claude.ai/code/session_01N6gLNB1dzAQCEYjvHhcRPV

coderabbitai[bot]commented· 2 weeks ago

[!WARNING]

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: thedavidweng/OpenKara
  • Branch: fix/streaming-import-artwork
  • File: .coderabbit.yaml
  • Commit: a3e4f17
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0017a0d3-c929-4a77-a1e7-1c0e4371e41c
Commits

Reviewing files that changed from the base of the PR and between 39502ae3981cf727f47a786147ab9e8acbb9c8e6 and a3e4f179c539726c4cfdb3379b3ba01eb4d0c8ce.

Files selected for processing: 6

  • docs/references/contracts/catalog.md
  • src-tauri/src/catalog/import.rs
  • src-tauri/src/catalog/plugin.rs
  • src-tauri/src/catalog/streaming.rs
  • src-tauri/src/library/import/cover.rs
  • src-tauri/src/library/import/mod.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
kilo-code-bot[bot]commented· 2 weeks ago

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (6 files)
  • docs/references/contracts/catalog.md - contract note for source title/artist/artwork on import
  • src-tauri/src/catalog/import.rs - applies source metadata/artwork on import/replace; new test coverage
  • src-tauri/src/catalog/plugin.rs - plugin source artwork lookup via host/cache
  • src-tauri/src/catalog/streaming.rs - trait/default and gated/fake artwork support
  • src-tauri/src/library/import/cover.rs - extracted reusable set_cover_art
  • src-tauri/src/library/import/mod.rs - exports set_cover_art

Reviewed by free · Input: 52.7K · Output: 2.7K · Cached: 119.3K

Sign in to comment.

Merge readiness

Checking mergeability after the indexing worker computes the current branch state.

Autopilot

Debug

Reviews

Approved0
ReviewersNone yet

Configure an OpenRouter key in repository settings.