Skip to content

feat: expand media system definitions#1096

Merged
wizzomafizzo merged 1 commit into
mainfrom
feat/expand-media-systems
Jul 13, 2026
Merged

feat: expand media system definitions#1096
wizzomafizzo merged 1 commit into
mainfrom
feat/expand-media-systems

Conversation

@wizzomafizzo

@wizzomafizzo wizzomafizzo commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

  • add system definitions for applications, TV seasons, music videos, podcasts, and audiobooks
  • add embedded metadata for each new system
  • extend system definition tests for new categories and media types

Verification

  • task lint-fix
  • task test

Summary by CodeRabbit

  • New Features
    • Added support for additional media types, including applications, TV seasons, music videos, podcast series and episodes, and audiobooks.
    • Expanded media categorization and metadata support for software and application content.
    • Added definitions for the newly supported content types, including names, categories, release dates, and manufacturers.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds system definitions and metadata assets for applications, TV seasons, music videos, podcast series and episodes, and audiobooks, with registry mappings and expanded validation tests.

Changes

Media system definitions

Layer / File(s) Summary
System constants, registry, and metadata assets
pkg/database/systemdefs/systemdefs.go, pkg/assets/systems/*.json
Adds identifiers, media-type mappings, slugs, fallbacks, and JSON metadata definitions for the new systems.
System metadata and media-type validation
pkg/database/systemdefs/systemdefs_test.go
Accepts the Software category and MediaTypeApplication, and verifies media-type mappings for the added systems.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: expanding system definitions for new media types.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/expand-media-systems

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/database/systemdefs/systemdefs_test.go`:
- Around line 720-731: Extend the table-driven lookup tests in the system
definition test suite to cover the new aliases and slugs: map App, Apps, and
Software to SystemApplication; map podcastshow, podcastshows, and
podcastepisodes to SystemPodcastSeries or SystemPodcastEpisode as appropriate;
and verify podcast lookups fall back to SystemAudio when required. Keep the
existing media-type assertions unchanged.

In `@pkg/database/systemdefs/systemdefs.go`:
- Around line 458-469: Move the existing system-ID constant block containing
SystemApplication through SystemAudiobook near the top of systemdefs.go, before
functions and methods such as GetMediaType, MapKeys, AlphaMapKeys, and
GetSystem. Preserve all constant names and values without other changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f4f10a38-a895-42af-975c-c9f7a49d2600

📥 Commits

Reviewing files that changed from the base of the PR and between a5f4134 and f1674d8.

📒 Files selected for processing (8)
  • pkg/assets/systems/Application.json
  • pkg/assets/systems/Audiobook.json
  • pkg/assets/systems/MusicVideo.json
  • pkg/assets/systems/PodcastEpisode.json
  • pkg/assets/systems/PodcastSeries.json
  • pkg/assets/systems/TVSeason.json
  • pkg/database/systemdefs/systemdefs.go
  • pkg/database/systemdefs/systemdefs_test.go

Comment on lines +720 to +731
{SystemApplication, MediaTypeApplication},
{SystemMovie, MediaTypeMovie},
{SystemTVEpisode, MediaTypeTVShow},
{SystemTVSeason, MediaTypeTVShow},
{SystemTVShow, MediaTypeTVShow},
{SystemMusicTrack, MediaTypeMusic},
{SystemMusicArtist, MediaTypeMusic},
{SystemMusicAlbum, MediaTypeMusic},
{SystemMusicVideo, MediaTypeMusic},
{SystemPodcastSeries, MediaTypeAudio},
{SystemPodcastEpisode, MediaTypeAudio},
{SystemAudiobook, MediaTypeAudio},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map the target test file and nearby implementation files
git ls-files pkg/database/systemdefs

echo '--- systemdefs_test.go outline ---'
ast-grep outline pkg/database/systemdefs/systemdefs_test.go --view expanded || true

echo '--- grep for relevant identifiers ---'
rg -n "SystemApplication|SystemPodcast|MediaTypeApplication|alias|slug|fallback|registry|cover" pkg/database/systemdefs -g '*.go' || true

Repository: ZaparooProject/zaparoo-core

Length of output: 16688


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- systemdefs_test.go relevant sections ---'
sed -n '681,930p' pkg/database/systemdefs/systemdefs_test.go

echo '--- systemdefs.go relevant definitions ---'
sed -n '1190,1295p' pkg/database/systemdefs/systemdefs.go

Repository: ZaparooProject/zaparoo-core

Length of output: 9738


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- TestLookupSystemExact / Aliases / NaturalLanguage / SlugDerivation sections ---'
sed -n '240,540p' pkg/database/systemdefs/systemdefs_test.go

Repository: ZaparooProject/zaparoo-core

Length of output: 9609


Add lookup coverage for the new systems. These rows only assert media types; add table-driven cases for SystemApplication aliases (App, Apps, Software), SystemPodcastSeries/SystemPodcastEpisode slugs (podcastshow, podcastshows, podcastepisodes), and their fallback to SystemAudio so registry mistakes don’t slip through.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/database/systemdefs/systemdefs_test.go` around lines 720 - 731, Extend
the table-driven lookup tests in the system definition test suite to cover the
new aliases and slugs: map App, Apps, and Software to SystemApplication; map
podcastshow, podcastshows, and podcastepisodes to SystemPodcastSeries or
SystemPodcastEpisode as appropriate; and verify podcast lookups fall back to
SystemAudio when required. Keep the existing media-type assertions unchanged.

Source: Coding guidelines

Comment on lines +458 to +469
SystemApplication = "Application"
SystemMovie = "Movie"
SystemTVEpisode = "TVEpisode"
SystemTVSeason = "TVSeason"
SystemTVShow = "TVShow"
SystemMusicTrack = "MusicTrack"
SystemMusicArtist = "MusicArtist"
SystemMusicAlbum = "MusicAlbum"
SystemMusicVideo = "MusicVideo"
SystemPodcastSeries = "PodcastSeries"
SystemPodcastEpisode = "PodcastEpisode"
SystemAudiobook = "Audiobook"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Move the new constants before functions and methods.

These constants are defined after methods such as GetMediaType, MapKeys, AlphaMapKeys, and GetSystem. Move the existing system-ID constant block near the top of the file.

As per coding guidelines, **/*.go: Define Go types and consts near the top of the file, before functions and methods.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/database/systemdefs/systemdefs.go` around lines 458 - 469, Move the
existing system-ID constant block containing SystemApplication through
SystemAudiobook near the top of systemdefs.go, before functions and methods such
as GetMediaType, MapKeys, AlphaMapKeys, and GetSystem. Preserve all constant
names and values without other changes.

Source: Coding guidelines

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@wizzomafizzo
wizzomafizzo merged commit 163139a into main Jul 13, 2026
16 checks passed
@wizzomafizzo
wizzomafizzo deleted the feat/expand-media-systems branch July 13, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant