This commit is contained in:
@@ -451,10 +451,19 @@ async function registerSubtitle(
|
||||
opts: SubtitleOpts,
|
||||
): Promise<void> {
|
||||
// 1. Companion subtitle-file record (fileType=subtitle, lang, video backref).
|
||||
//
|
||||
// `source/gateway:opensubtitles` is the SAME label meta-feeder-opensubtitles
|
||||
// stamps on the records it mints (METADATA_KEYS.md §5), deliberately: a
|
||||
// subtitle's provenance must not depend on which of the two paths fetched
|
||||
// it, and meta-watch already reads that one prefix to name the provider.
|
||||
// It belongs on the subtitle's own record rather than on the video's,
|
||||
// because a subtitle fetched over the swarm by CID arrives without the
|
||||
// video record — anything stored there does not travel with the file.
|
||||
const companion: Record<string, string> = {
|
||||
fileType: 'subtitle',
|
||||
extension: opts.extension,
|
||||
subtitleLanguage: lang3,
|
||||
'source/gateway:opensubtitles': 'true',
|
||||
[`videos/${videoCid}`]: 'true',
|
||||
};
|
||||
if (opts.fileName) companion.fileName = opts.fileName;
|
||||
|
||||
Reference in New Issue
Block a user