Formatting
This commit is contained in:
parent
6044fbb029
commit
f9a27895b4
14 changed files with 1457 additions and 1454 deletions
2
.rustfmt.toml
Normal file
2
.rustfmt.toml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
write_mode = "Overwrite"
|
||||||
|
hard_tabs = true
|
|
@ -589,7 +589,8 @@ impl Index {
|
||||||
pub fn get_random_albums(&self, count: u32) -> Result<Vec<Directory>> {
|
pub fn get_random_albums(&self, count: u32) -> Result<Vec<Directory>> {
|
||||||
let db = self.connect()?;
|
let db = self.connect()?;
|
||||||
let mut select =
|
let mut select =
|
||||||
db.prepare("SELECT path, artwork, year, artist, album FROM directories WHERE album IS NOT NULL ORDER BY RANDOM() LIMIT ?")?;
|
db.prepare("SELECT path, artwork, year, artist, album FROM directories WHERE album \
|
||||||
|
IS NOT NULL ORDER BY RANDOM() LIMIT ?")?;
|
||||||
select.bind(1, &Value::Integer(count as i64))?;
|
select.bind(1, &Value::Integer(count as i64))?;
|
||||||
self.select_directories(&mut select)
|
self.select_directories(&mut select)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue