Skip to content

Use the default source for files without one (mediatheque 1.1 jobs) - #38

Merged
dmongeau merged 1 commit into
mainfrom
fix/37-v1-null-source
Nov 23, 2026
Merged

dmongeau merged 1 commit into
mainfrom
fix/37-v1-null-source

Conversation

@dmongeau

Copy link
Copy Markdown
Member

Closes #37

The mediatheque 1.1 jobs read the file's source column directly. Files stored by older versions of the mediatheque have none (null), and the mediatheque then uses config('mediatheque.source'); the jobs threw Eclair reads the files of filesystem sources only: the source "" … before sending anything to Eclair.

  • Job::sourceName() gives the file's source, or the default source when it is empty, as the mediatheque does.
  • Used for the location of the input, the source's path prefix, the visibility, and the source of the files the job creates.
  • A local source is still refused (test_a_local_source_is_refused).

Checks

  • composer lint, composer analyse, composer test (default dependencies): pass, 98 tests (18 skipped: the mediatheque 1.1 suite).
  • With folklore/laravel-mediatheque:^1.1.3, as the mediatheque-v1 CI job: composer analyse:v1 and composer test:v1 pass, 9 tests.
  • The new test test_a_file_without_a_source_uses_the_default_source fails without the fix, with the error above.

🤖 Generated with Claude Code

Files stored by older versions of the mediatheque have no source: the
mediatheque then uses its default source, and so do the jobs now, for
the location, the prefix, the visibility and the files they create.

Closes #37

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmongeau
dmongeau merged commit 3220c4b into main Nov 23, 2026
10 checks passed
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.

MediathequeV1 jobs fail on files whose source is null

1 participant