feat: add 'unregistered' status — all incomplete files migrated to unregistered
This commit is contained in:
@@ -141,6 +141,7 @@ pub struct StorageStatus {
|
||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum VideoStatus {
|
||||
Unregistered,
|
||||
Registered,
|
||||
Pending,
|
||||
Processing,
|
||||
@@ -151,6 +152,7 @@ pub enum VideoStatus {
|
||||
impl VideoStatus {
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
VideoStatus::Unregistered => "unregistered",
|
||||
VideoStatus::Registered => "registered",
|
||||
VideoStatus::Pending => "pending",
|
||||
VideoStatus::Processing => "processing",
|
||||
@@ -161,6 +163,7 @@ impl VideoStatus {
|
||||
|
||||
pub fn from_db_str(s: &str) -> Option<Self> {
|
||||
match s {
|
||||
"unregistered" => Some(VideoStatus::Unregistered),
|
||||
"registered" => Some(VideoStatus::Registered),
|
||||
"pending" => Some(VideoStatus::Pending),
|
||||
"processing" => Some(VideoStatus::Processing),
|
||||
|
||||
Reference in New Issue
Block a user