Added scene relations.

This commit is contained in:
2026-11-21 02:54:56 +01:00
parent 5ce4c1f63b
commit 78654a62df
12 changed files with 952 additions and 4 deletions
+20
View File
@@ -0,0 +1,20 @@
// labels per scene relation type, keyed by which side of the relation the related scene is on
// relations point from the derivation or compilation (source) to the original or compilation part (target)
const relationLabels = {
rerelease: { target: 'Rerelease of', source: 'Rereleased as' },
remaster: { target: 'Remaster of', source: 'Remastered as' },
compilation: { target: 'Compilation features', source: 'Featured in compilation' },
};
export function getRelationLabel(type, direction) {
if (relationLabels[type]?.[direction]) {
return relationLabels[type][direction];
}
// fallback for types added later without a label
return direction === 'target'
? `${type.charAt(0).toUpperCase()}${type.slice(1)} of`
: `Has ${type}`;
}
export default relationLabels;