Skip to content

feat(custom): add separate Outline field to Custom Movie Scraper#1976

Open
Arny80Hexa wants to merge 2 commits intoKomet:masterfrom
Arny80Hexa:feat/custom-scraper-outline
Open

feat(custom): add separate Outline field to Custom Movie Scraper#1976
Arny80Hexa wants to merge 2 commits intoKomet:masterfrom
Arny80Hexa:feat/custom-scraper-outline

Conversation

@Arny80Hexa
Copy link
Copy Markdown
Contributor

Allow users to assign a different scraper for the movie outline (short summary) than for the plot. The Kodi NFO writer already outputs both as separate <outline> and <plot> tags — this change exposes that capability in the Custom Movie Scraper settings.

When no dedicated Outline scraper is configured, the existing "use plot for outline" fallback setting continues to work as before.

Fixes #1975

Developed with AI assistance (Claude Code / Opus 4.6).

@Arny80Hexa Arny80Hexa requested a review from bugwelle as a code owner March 20, 2026 20:58
Copy link
Copy Markdown
Collaborator

@bugwelle bugwelle left a comment

Choose a reason for hiding this comment

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

Cool! Definitely a good addition. I have a few remarks regarding the movie merger. Would be great if you could incorporate that. :)

Comment thread src/data/movie/Movie.cpp Outdated
Comment on lines +85 to +86
<< MovieScraperInfo::TvShowLinks
<< MovieScraperInfo::Outline;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<< MovieScraperInfo::TvShowLinks
<< MovieScraperInfo::Outline;
<< MovieScraperInfo::TvShowLinks //
<< MovieScraperInfo::Outline;

FYI: Please run ./scripts/run_clang_format.sh and/or ./scripts/quick_checks.sh once. The trailing comment is a "hack" to make clang-format auto-format these lines.

Comment thread src/scrapers/movie/MovieMerger.cpp Outdated
if (!source.outline().isEmpty()) {
target.setOutline(source.outline());
} else if (usePlotForOutline) {
} else if (!source.overview().isEmpty()) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why remove the usePlotForOutline check?

Suggested change
} else if (!source.overview().isEmpty()) {
} else if (target.outline().isEmpty() && usePlotForOutline && !source.overview().isEmpty()) {

{
Movie copy;
original->setOutline("");
copyDetailsToMovie(copy, *original, allMovieScraperInfos(), true, true);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you copy this test case and test:

  • no outline requested
  • "usePlotForOutline" being true

=> ensure that outline isn't set

Comment thread src/scrapers/movie/MovieMerger.cpp Outdated
Comment on lines +210 to +214
if (details.contains(MovieScraperInfo::Outline)) {
copyDetailToMovie(target, source, MovieScraperInfo::Outline, usePlotForOutline, ignoreDuplicateOriginalTitle);
} else if (usePlotForOutline && target.outline().isEmpty() && !target.overview().isEmpty()) {
target.setOutline(target.overview());
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd prefer this logic to be inside copyDetailToMovie instead of here. usePlotForOutline is rather a usePlotForOutlineIfOutlineIsEmpty :D

Christoph Arndt and others added 2 commits March 24, 2026 22:29
Allow users to assign a different scraper for the movie outline (short
summary) than for the plot. The Kodi NFO writer already outputs both
as separate <outline> and <plot> tags — this change exposes that
capability in the Custom Movie Scraper settings.

When no dedicated Outline scraper is configured, the existing "use plot
for outline" fallback setting continues to work as before.

Fixes Komet#1975

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Movie.cpp: add trailing // comment for clang-format alignment
- MovieMerger: restore usePlotForOutline check in Outline case,
  add target.outline().isEmpty() guard, move all logic into
  copyDetailToMovie (remove special handling from caller)
- Tests: add test case for outline-not-requested with
  usePlotForOutline=true

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Arny80Hexa Arny80Hexa force-pushed the feat/custom-scraper-outline branch from d613543 to bd6917a Compare March 24, 2026 21:52
@Arny80Hexa
Copy link
Copy Markdown
Contributor Author

Addressed all review comments:

  • Movie.cpp: added trailing // for clang-format alignment
  • MovieMerger.cpp: restored usePlotForOutline check with target.outline().isEmpty() guard, moved all logic into copyDetailToMovie (removed special handling from the caller)
  • Added test case: outline not requested + usePlotForOutline=true → outline stays empty

Also rebased on current master. Ran run_clang_format.sh and quick_checks.sh — will make sure to run both before every future push.

Side note: we noticed that run_clang_format.sh expects version 19, while current LLVM is at 22. We installed 19 locally, so no issue on our end. If upgrading to a newer clang-format version is something you'd like to do at some point, we'd be happy to take on that reformatting commit.

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.

Custom Movie Scraper: add separate outline/short summary field

2 participants