This commit is contained in:
parent
2d2f7c5522
commit
4a4ae89b1b
6 changed files with 238 additions and 22 deletions
|
@ -1,5 +1,6 @@
|
|||
use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
use walkdir::WalkDir;
|
||||
|
||||
use func::is_video_file;
|
||||
|
@ -96,7 +97,7 @@ impl Library {
|
|||
|
||||
pub async fn get_video_by_id(&self, id: &str) -> Option<Video> {
|
||||
sqlx::query_as("SELECT * FROM videos WHERE id = $1")
|
||||
.bind(id)
|
||||
.bind(uuid::Uuid::from_str(id).unwrap())
|
||||
.fetch_optional(&self.conn)
|
||||
.await
|
||||
.unwrap()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue