Home

dev / openkara

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

feat(sources): add optional ISRC to streaming tracks (protocol 2.1)

merged
#695 opened by devfeat/track-isrc→main
Conversation4 Commits0
devopened this pull requestAuthor· 2 weeks ago
Files changed
…

Summary

Adds an optional ISRC to streaming tracks. This is part 2 of #693 (part 3, Playable Match, remains), so this PR does not close the issue.

Changes

  • Streaming Source protocol Track gets an optional isrc: string | null (protocol 2.1, additive).
  • The host trims the value, removes hyphens and spaces, and uppercases it. It keeps the value only in the 12-character ISRC form (2 letters, 3 letters or digits, 7 digits). Any other value is dropped without rejecting the track.
  • IPC StreamingTrack carries a nullable isrc.
  • The host checks only the protocol major, so packages declaring minor 0 keep working and can omit the field.
  • No UI change.

Acceptance criteria

Part 2 of #693: the protocol and host accept an optional, normalized ISRC on streaming tracks without breaking existing packages. Part 3 (Playable Match) is tracked separately in #693.

Test plan

Verification run locally:

  • cargo fmt
  • cd src-tauri && cargo clippy --all-targets -- -D warnings (clean)
  • cd src-tauri && cargo test -q (1324 + 174 + 320 passed, 14 ignored, 0 failed)
  • npx tsc --noEmit (clean)
  • pnpm lint (PASS)
  • pnpm build (PASS)
  • pnpm test (PASS, 239 files, 2558 tests)

Not run locally:

  • Optimized release build (cargo build --profile optimized). CI covers packaging.
  • The official NetEase source package in openkara-sources does not send isrc yet. It lives in a separate repo.

Contracts updated:

  • docs/references/contracts/streaming-source-protocol.md (2.1, Track shape, "Changes in 2.1")
  • docs/references/contracts/catalog.md (StreamingTrack)

Product standards:

  • Interfaces and compatibility profile: additive minor protocol change, contract docs updated in the same change, old packages unaffected because the host checks only the major version.
  • Lifecycle/testing profile: Rust test isrc_is_normalized_and_invalid_values_are_dropped in src-tauri/src/catalog/plugin_tests.rs.

Related issues

Part of #693

claude.ai/code/session_01N6gLN7iSoCkgZaPffMrAim

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 42 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: feat/track-isrc
  • File: .coderabbit.yaml
  • Commit: fdc81a6
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 863a3263-b567-46f4-acfa-631cd623b15f
Commits

Reviewing files that changed from the base of the PR and between 70759ead8e79e3405a08840cc502d8184bbf163a and fdc81a66b123095fd16e588961676a961a756249.

Files selected for processing: 12

  • docs/references/contracts/catalog.md
  • docs/references/contracts/streaming-source-protocol.md
  • src-tauri/src/catalog/import.rs
  • src-tauri/src/catalog/plugin.rs
  • src-tauri/src/catalog/plugin_tests.rs
  • src-tauri/src/catalog/streaming.rs
  • src-tauri/src/catalog/types.rs
  • src/components/Catalog/GlobalSearchView.test.tsx
  • src/components/Catalog/StreamingBrowser.test.tsx
  • src/components/Catalog/StreamingTrackList.test.tsx
  • src/mock/tauri-mock-impl.ts
  • src/types/ipc.ts
  • 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 (12 files)
  • docs/references/contracts/catalog.md
  • docs/references/contracts/streaming-source-protocol.md
  • src-tauri/src/catalog/import.rs
  • src-tauri/src/catalog/plugin.rs
  • src-tauri/src/catalog/plugin_tests.rs
  • src-tauri/src/catalog/streaming.rs
  • src-tauri/src/catalog/types.rs
  • src/components/Catalog/GlobalSearchView.test.tsx
  • src/components/Catalog/StreamingBrowser.test.tsx
  • src/components/Catalog/StreamingTrackList.test.tsx
  • src/mock/tauri-mock-impl.ts
  • src/types/ipc.ts

Reviewed by free · Input: 23.7K · Output: 1.7K · Cached: 215.8K

github-actions[bot]commented· 2 weeks ago

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 84.95% (🎯 65%) 9128 / 10745
🟢 Statements 84.11% (🎯 65%) 9752 / 11593
🟢 Functions 81.53% (🎯 60%) 2384 / 2924
🟢 Branches 76.93% (🎯 60%) 5713 / 7426
File CoverageNo changed files found.
Generated in workflow #2395 for commit fdc81a6 by the Vitest Coverage Report Action
codecov[bot]commented· 2 weeks ago

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 88.1%. Comparing base (70759ea) to head (fdc81a6). :white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #695     +/-   ##
=======================================
- Coverage   88.1%   88.1%   -0.1%
=======================================
  Files        238     238
  Lines      13582   13582
  Branches    4593    4593
=======================================
- Hits       11971   11970      -1
- Misses      1528    1529      +1
  Partials      83      83
FlagCoverage Δ
frontend88.1% <ø> (-0.1%):arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

ComponentsCoverage Δ
frontend88.1% <ø> (-0.1%):arrow_down:
rust∅ <ø> (∅)
see 1 file with indirect coverage changes
:rocket: New features to boost your workflow:
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.