Repository navigation
impl(core): editing argument on FileSystemReceiver add, editor-scoped tag replace - #93
Merged
Merged
Conversation
…ut overwriting other editors
- FileSystemReceiver.add accepts an editing argument (editor, overwrite)
- ingest defaults to {editor: receiver.name, overwrite: false} on create and update
Co-authored-by: kaisea.rpi <kaisea.rpi@gmail.com>
Co-authored-by: kaisea.rpi <kaisea.rpi@gmail.com>
andykais
requested changes
Oct 13, 2026
| async #add_media_file(ctx: plugin.FileSystemReceiverContext, filepath: string, media_info?: inputs.MediaInfo, tags?: inputs.TagList): Promise<AddMediaFileAck> { | ||
| async #add_media_file(ctx: plugin.FileSystemReceiverContext, filepath: string, media_info?: inputs.MediaInfo, tags?: inputs.TagList, editing?: plugin.ReceiverEditing): Promise<AddMediaFileAck> { | ||
| const update_editing = { | ||
| editor: editing?.editor ?? ctx.receiver.name, |
Owner
There was a problem hiding this comment.
This is wrong. Do not default an editor. I want the editing block entirely missing if there are no values passed to the function.
…out defaults Co-authored-by: kaisea.rpi <kaisea.rpi@gmail.com>
…s without editing Co-authored-by: kaisea.rpi <kaisea.rpi@gmail.com>
…ss overwrite is set - tags without an editor are no longer removed by an editor's replace - UpdateEditing.overwrite defaults to false when an editor is supplied Co-authored-by: kaisea.rpi <kaisea.rpi@gmail.com>
Co-authored-by: kaisea.rpi <kaisea.rpi@gmail.com>
andykais
approved these changes
Oct 13, 2026
andykais
marked this pull request as ready for review
October 13, 2026 22:22
…stem discover Co-authored-by: kaisea.rpi <kaisea.rpi@gmail.com>
andykais
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
editingargument onFileSystemReceiver.add(ctx, filepath, media_info, tags, series, editing)(new exportedReceiverEditingtype:{editor?, overwrite?})editingis passed through unchanged tomedia.create/media.update/series.update, with no defaults. When a receiver passes nothing, no editing options are sent and the configeditingblock applies{editor: ctx.receiver.name}from the ingest create and series-update pathsmedia.update(id, info, ['my:tag'], {editor: 'foo'})removing tags from other editors and tags written without an editor. An editor's tag replace now only removes tags owned by that editor, unlessoverwrite: trueis passedUpdateEditing.overwritefromdefault(true)to optional; when an editor is supplied, it behaves asfalsefor both tags and media info fields. Updates without an editor still overwrite everything. The configediting.overwritedefault is unchangedfilesystem.discoveron windows not treating backslash-separated globs likeC:\media\*.tifas globs (@std/pathisGlobreads\*as an escaped*)Vision Testing
editor replace ownershiptest inedit_log.test.ts: an editor replace keeps other editors' tags and editor-less tags, replaces its own tags, leaves media info fields owned by other editors alone by default, andoverwrite: true/ no-editor replace still replace everything. Three of these subtests fail against the previous codeingest editing,ingest editing on created media, andingest without editing on created mediatests iningest.test.ts, using a custom receiver (these discover with a*.tifglob, which is what exposed the windows glob bug)deno task lintis clean anddeno task --cwd packages/web buildsucceeds