@shumai-one/shumai-transcode 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shumai-one/shumai-transcode",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Media transcoding worker for the shumai media workspace",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,12 +26,12 @@
26
26
  "zod": "4.4.3"
27
27
  },
28
28
  "optionalDependencies": {
29
- "@shumai-one/shumai-transcode-darwin-arm64": "0.1.1",
30
- "@shumai-one/shumai-transcode-darwin-x64": "0.1.1",
31
- "@shumai-one/shumai-transcode-linux-arm64": "0.1.1",
32
- "@shumai-one/shumai-transcode-linux-x64": "0.1.1",
33
- "@shumai-one/shumai-transcode-win32-arm64": "0.1.1",
34
- "@shumai-one/shumai-transcode-win32-x64": "0.1.1"
29
+ "@shumai-one/shumai-transcode-darwin-arm64": "0.1.3",
30
+ "@shumai-one/shumai-transcode-darwin-x64": "0.1.3",
31
+ "@shumai-one/shumai-transcode-linux-arm64": "0.1.3",
32
+ "@shumai-one/shumai-transcode-linux-x64": "0.1.3",
33
+ "@shumai-one/shumai-transcode-win32-arm64": "0.1.3",
34
+ "@shumai-one/shumai-transcode-win32-x64": "0.1.3"
35
35
  },
36
36
  "repository": {
37
37
  "type": "git",
@@ -0,0 +1,13 @@
1
+ -- Update assets where media->'metadata' is not null, but 'totalFrames' or 'startTimecode' is missing
2
+ UPDATE "assets"
3
+ SET "media" = jsonb_set(
4
+ "media",
5
+ '{metadata}',
6
+ coalesce("media"->'metadata', '{}'::jsonb) || jsonb_build_object(
7
+ 'totalFrames', ROUND(COALESCE(("media"->'metadata'->>'duration')::numeric, ("media"->>'duration')::numeric, 0) * COALESCE(("media"->'metadata'->>'frameRate')::numeric, 30)),
8
+ 'startTimecode', COALESCE("media"->'metadata'->>'startTimecode', '00:00:00:00')
9
+ )
10
+ )
11
+ WHERE "media" IS NOT NULL
12
+ AND "media"->'metadata' IS NOT NULL
13
+ AND ("media"->'metadata'->'totalFrames' IS NULL OR "media"->'metadata'->'startTimecode' IS NULL);