Compare commits
3 Commits
3a7ba689ed
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 633301c491 | |||
| 83aad38053 | |||
| a4d5777e1d |
+1
-1
@@ -23,7 +23,7 @@ Dockerfile*
|
||||
.github
|
||||
migrations
|
||||
README.md
|
||||
uploads
|
||||
uploads*
|
||||
.git
|
||||
*.tar
|
||||
*.sql
|
||||
@@ -30,14 +30,11 @@ async function getAssignableArtists() {
|
||||
});
|
||||
}
|
||||
|
||||
const shotCodeCollator = new Intl.Collator(undefined, { numeric: true, sensitivity: "base" });
|
||||
|
||||
async function getShotsForProject(projectId: string) {
|
||||
const shots = await db.shot.findMany({
|
||||
where: { projectId },
|
||||
orderBy: [
|
||||
{ episode: { sort: "asc", nulls: "last" } },
|
||||
{ scene: "asc" },
|
||||
{ shotNumber: "asc" },
|
||||
],
|
||||
select: {
|
||||
id: true,
|
||||
shotCode: true,
|
||||
@@ -90,6 +87,16 @@ async function getShotsForProject(projectId: string) {
|
||||
},
|
||||
});
|
||||
|
||||
// Sorted by shot code rather than scene + shotNumber: imports and the
|
||||
// external API assign shotNumber as "max + 10" (or 0), which needn't match
|
||||
// the number in the code, so new shots could sink to the bottom.
|
||||
shots.sort(
|
||||
(a, b) =>
|
||||
(a.episode === null ? 1 : 0) - (b.episode === null ? 1 : 0) ||
|
||||
shotCodeCollator.compare(a.episode ?? "", b.episode ?? "") ||
|
||||
shotCodeCollator.compare(a.shotCode, b.shotCode)
|
||||
);
|
||||
|
||||
return shots.map(({ exports, ...shot }) => ({
|
||||
...shot,
|
||||
delivery: summariseShotDelivery({
|
||||
|
||||
+2
-1
@@ -11,7 +11,8 @@ services:
|
||||
- .env
|
||||
|
||||
volumes:
|
||||
- ./uploads:/app/uploads
|
||||
# Uploads live on the Hetzner volume, not the root disk (uid 1001 must own it)
|
||||
- /mnt/HC_Volume_105945736/vfxreview-uploads:/app/uploads
|
||||
|
||||
depends_on:
|
||||
postgres:
|
||||
|
||||
Reference in New Issue
Block a user