@@ -81,7 +81,7 @@ export async function createExport(input: CreateExportInput) {
|
||||
const shot = await db.shot.findUnique({
|
||||
where: { id: manifest.shotId },
|
||||
include: {
|
||||
project: { select: { id: true, code: true, showId: true } },
|
||||
project: { select: { id: true, code: true, showId: true, projectType: true } },
|
||||
tasks: { where: { type: "COMP" }, orderBy: { sortOrder: "asc" }, take: 1, select: { id: true } },
|
||||
},
|
||||
});
|
||||
@@ -150,9 +150,15 @@ export async function createExport(input: CreateExportInput) {
|
||||
const versionString = freshShot.shotVersion ?? formatVersionString(versionNumber);
|
||||
const exrBase = nextExrOutputBase(freshShot.exrOutput, shot.shotCode, versionString);
|
||||
|
||||
// {root}/{showId}/[{episode} for episodic]/{shotCode}/{version}
|
||||
const showSegment = shot.project.showId || shot.project.code;
|
||||
const episodeSegment =
|
||||
shot.project.projectType === "EPISODIC" && shot.episode?.trim() ? shot.episode.trim() : null;
|
||||
const outputDir =
|
||||
manifest.outputDir === "auto"
|
||||
? [outputRoot, shot.project.code, ...(shot.episode ? [shot.episode] : []), shot.shotCode, versionString].join("/")
|
||||
? [outputRoot, showSegment, episodeSegment, shot.shotCode, versionString]
|
||||
.filter(Boolean)
|
||||
.join("/")
|
||||
: manifest.outputDir;
|
||||
const outputPattern =
|
||||
manifest.outputPattern === "auto"
|
||||
|
||||
Reference in New Issue
Block a user