From 73640ed4ab06452b510fa00590223f177d38fae3 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Tue, 28 May 2019 02:36:10 -0700 Subject: [PATCH] database: Add column video_id for storing upload-location-specific metadata for identifying video ie. for youtube, the video id. --- DATABASE.md | 3 ++- common/common/database.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/DATABASE.md b/DATABASE.md index 7f61ab3..c3e7130 100644 --- a/DATABASE.md +++ b/DATABASE.md @@ -143,4 +143,5 @@ columns | type | role | `state` | `ENUM NOT NULL DEFAULT 'UNEDITED'` | state | See "The state machine" above. `uploader` | `TEXT` | state | The name of the cutter node performing the cut and upload. Set when transitioning from `EDITED` to `CLAIMED` and cleared on a retryable error. Left uncleared on non-retryable errors to provide information to the operator. Cleared on a re-edit if set. `error` | `TEXT` | state | A human-readable error message, set if a non-retryable error occurs. Its presence indicates operator intervention is required. Cleared on a re-edit if set. -`video_link` | `TEXT` | output | A link to the uploaded video. Only set when state is `UPLOADED`. +`video_id` | `TEXT` | state | An id that can be used to refer to the video to check if transcoding is complete. Often the video_link can be generated from this, but not nessecarily. +`video_link` | `TEXT` | output | A link to the uploaded video. Only set when state is `TRANSCODING` or `DONE`. diff --git a/common/common/database.py b/common/common/database.py index 018122c..ce3cfd8 100644 --- a/common/common/database.py +++ b/common/common/database.py @@ -50,6 +50,7 @@ CREATE TABLE IF NOT EXISTS events ( state event_state NOT NULL DEFAULT 'UNEDITED', uploader TEXT, error TEXT, + video_id TEXT, video_link TEXT );