aboutsummaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-12-22 23:57:03 +0100
committermetamuffin <metamuffin@disroot.org>2023-12-22 23:57:03 +0100
commit75949cebdd61dd8f0d06f2e47081c460e2a442f0 (patch)
treeea0fc2ff003b7694ee06555d731bce1f08199136 /common/src
parentc4682c231cbfa2bd4b44e14548800a64cc9cdbb8 (diff)
downloadjellything-75949cebdd61dd8f0d06f2e47081c460e2a442f0.tar
jellything-75949cebdd61dd8f0d06f2e47081c460e2a442f0.tar.bz2
jellything-75949cebdd61dd8f0d06f2e47081c460e2a442f0.tar.zst
rework import system pt. 8: federated streams & change jhls
Diffstat (limited to 'common/src')
-rw-r--r--common/src/jhls.rs10
-rw-r--r--common/src/user.rs13
2 files changed, 13 insertions, 10 deletions
diff --git a/common/src/jhls.rs b/common/src/jhls.rs
index eadf9a2..33c67d2 100644
--- a/common/src/jhls.rs
+++ b/common/src/jhls.rs
@@ -3,20 +3,12 @@
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2023 metamuffin <metamuffin.org>
*/
-use crate::SourceTrack;
use serde::{Deserialize, Serialize};
use std::ops::Range;
#[derive(Debug, Clone, Deserialize, Serialize)]
-pub struct JhlsMetadata {
- pub duration: f64,
+pub struct JhlsTrackIndex {
pub extra_profiles: Vec<EncodingProfile>,
- pub tracks: Vec<JhlsTrack>,
-}
-
-#[derive(Debug, Clone, Deserialize, Serialize)]
-pub struct JhlsTrack {
- pub info: SourceTrack,
pub segments: Vec<Range<f64>>,
}
diff --git a/common/src/user.rs b/common/src/user.rs
index 466423c..7e654a9 100644
--- a/common/src/user.rs
+++ b/common/src/user.rs
@@ -7,7 +7,10 @@ use crate::{stream::StreamFormat, user};
#[cfg(feature = "rocket")]
use rocket::{FromFormField, UriDisplayQuery};
use serde::{Deserialize, Serialize};
-use std::{collections::HashMap, fmt::Display};
+use std::{
+ collections::{HashMap, HashSet},
+ fmt::Display,
+};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct User {
@@ -32,6 +35,14 @@ pub enum WatchedState {
Watched,
}
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CreateSessionParams {
+ pub username: String,
+ pub password: String,
+ pub expire: Option<i64>,
+ pub drop_permissions: Option<HashSet<UserPermission>>,
+}
+
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq)]
#[cfg_attr(feature = "rocket", derive(FromFormField, UriDisplayQuery))]
#[serde(rename_all = "snake_case")]