Formatting
This commit is contained in:
parent
e079574879
commit
24c6fcb4f4
4 changed files with 11 additions and 8 deletions
|
@ -112,7 +112,7 @@ fn get_endpoints(db: Arc<DB>, index_channel: Arc<Mutex<Sender<index::Command>>>)
|
|||
auth_api_mount.mount("/recent/",
|
||||
move |request: &mut Request| self::recent(request, db.deref()));
|
||||
}
|
||||
{
|
||||
{
|
||||
let db = db.clone();
|
||||
auth_api_mount.mount("/search/",
|
||||
move |request: &mut Request| self::search(request, db.deref()));
|
||||
|
|
10
src/index.rs
10
src/index.rs
|
@ -382,7 +382,7 @@ pub fn update<T>(db: &T) -> Result<()>
|
|||
clean(db)?;
|
||||
populate(db)?;
|
||||
info!("Library index update took {} seconds",
|
||||
start.elapsed().as_secs());
|
||||
start.elapsed().as_secs());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -579,12 +579,12 @@ pub fn get_recent_albums<T>(db: &T, count: i64) -> Result<Vec<Directory>>
|
|||
pub fn search<T>(db: &T, query: &str) -> Result<Vec<CollectionFile>>
|
||||
where T: ConnectionSource + VFSSource
|
||||
{
|
||||
Ok(vec![])
|
||||
// Find dirs with matching path and parent not matching
|
||||
Ok(vec![])
|
||||
// Find dirs with matching path and parent not matching
|
||||
|
||||
|
||||
// Find songs with matching title/album/artist
|
||||
// Remove songs within a matched directory
|
||||
// Find songs with matching title/album/artist
|
||||
// Remove songs within a matched directory
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -115,7 +115,10 @@ fn run() -> Result<()> {
|
|||
options.optopt("p", "port", "set polaris to run on a custom port", "PORT");
|
||||
options.optopt("d", "database", "set the path to index database", "FILE");
|
||||
options.optopt("w", "web", "set the path to web client files", "DIRECTORY");
|
||||
options.optopt("l", "log", "set the log level to a value between 0 (off) and 3 (debug)", "LEVEL");
|
||||
options.optopt("l",
|
||||
"log",
|
||||
"set the log level to a value between 0 (off) and 3 (debug)",
|
||||
"LEVEL");
|
||||
|
||||
#[cfg(unix)]
|
||||
options.optflag("f",
|
||||
|
|
|
@ -76,7 +76,7 @@ pub fn count<T>(db: &T) -> Result<i64>
|
|||
use db::users::dsl::*;
|
||||
let connection = db.get_connection();
|
||||
let count = users.count().get_result(connection.deref())?;
|
||||
Ok(count)
|
||||
Ok(count)
|
||||
}
|
||||
|
||||
pub fn is_admin<T>(db: &T, username: &str) -> Result<bool>
|
||||
|
|
Loading…
Add table
Reference in a new issue