Move video.rs into its own module
This commit is contained in:
@@ -22,11 +22,11 @@ use crate::{create_thumbnails, AppState};
|
|||||||
use crate::data::SortType::{NameAsc};
|
use crate::data::SortType::{NameAsc};
|
||||||
use crate::error::IntoHttpError;
|
use crate::error::IntoHttpError;
|
||||||
use crate::tags::TagDao;
|
use crate::tags::TagDao;
|
||||||
use crate::video::StreamActor;
|
|
||||||
use path_absolutize::*;
|
use path_absolutize::*;
|
||||||
use rand::prelude::SliceRandom;
|
use rand::prelude::SliceRandom;
|
||||||
use rand::thread_rng;
|
use rand::thread_rng;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
use crate::video::actors::StreamActor;
|
||||||
|
|
||||||
pub async fn list_photos<TagD: TagDao, FS: FileSystemAccess>(
|
pub async fn list_photos<TagD: TagDao, FS: FileSystemAccess>(
|
||||||
_: Claims,
|
_: Claims,
|
||||||
@@ -418,7 +418,6 @@ mod tests {
|
|||||||
use crate::{
|
use crate::{
|
||||||
data::{Claims, PhotosResponse},
|
data::{Claims, PhotosResponse},
|
||||||
testhelpers::BodyReader,
|
testhelpers::BodyReader,
|
||||||
video::StreamActor,
|
|
||||||
AppState,
|
AppState,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ use crate::service::ServiceBuilder;
|
|||||||
use crate::state::AppState;
|
use crate::state::AppState;
|
||||||
use crate::tags::*;
|
use crate::tags::*;
|
||||||
use crate::video::*;
|
use crate::video::*;
|
||||||
|
use crate::video::actors::{
|
||||||
|
create_playlist, generate_video_thumbnail, ProcessMessage, ScanDirectoryMessage,
|
||||||
|
};
|
||||||
|
|
||||||
mod auth;
|
mod auth;
|
||||||
mod data;
|
mod data;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
use crate::video::{PlaylistGenerator, VideoPlaylistManager};
|
|
||||||
use crate::StreamActor;
|
|
||||||
use actix::{Actor, Addr};
|
use actix::{Actor, Addr};
|
||||||
use std::{env, sync::Arc};
|
use std::{env, sync::Arc};
|
||||||
|
use crate::video::actors::{PlaylistGenerator, StreamActor, VideoPlaylistManager};
|
||||||
|
|
||||||
pub struct AppState {
|
pub struct AppState {
|
||||||
pub stream_manager: Arc<Addr<StreamActor>>,
|
pub stream_manager: Arc<Addr<StreamActor>>,
|
||||||
|
|||||||
Reference in New Issue
Block a user