Autoformat

This commit is contained in:
Antoine Gersant 2020-11-25 18:03:02 -08:00
parent bcebaf499e
commit 0927f3815e
2 changed files with 71 additions and 74 deletions

View file

@ -85,10 +85,7 @@ pub fn read(db: &DB) -> Result<Config> {
}; };
let (art_pattern, sleep_duration) = misc_settings let (art_pattern, sleep_duration) = misc_settings
.select(( .select((index_album_art_pattern, index_sleep_duration_seconds))
index_album_art_pattern,
index_sleep_duration_seconds,
))
.get_result(&connection)?; .get_result(&connection)?;
config.album_art_pattern = Some(art_pattern); config.album_art_pattern = Some(art_pattern);

View file

@ -1,99 +1,99 @@
table! { table! {
ddns_config (id) { ddns_config (id) {
id -> Integer, id -> Integer,
host -> Text, host -> Text,
username -> Text, username -> Text,
password -> Text, password -> Text,
} }
} }
table! { table! {
directories (id) { directories (id) {
id -> Integer, id -> Integer,
path -> Text, path -> Text,
parent -> Nullable<Text>, parent -> Nullable<Text>,
artist -> Nullable<Text>, artist -> Nullable<Text>,
year -> Nullable<Integer>, year -> Nullable<Integer>,
album -> Nullable<Text>, album -> Nullable<Text>,
artwork -> Nullable<Text>, artwork -> Nullable<Text>,
date_added -> Integer, date_added -> Integer,
} }
} }
table! { table! {
misc_settings (id) { misc_settings (id) {
id -> Integer, id -> Integer,
auth_secret -> Binary, auth_secret -> Binary,
index_sleep_duration_seconds -> Integer, index_sleep_duration_seconds -> Integer,
index_album_art_pattern -> Text, index_album_art_pattern -> Text,
} }
} }
table! { table! {
mount_points (id) { mount_points (id) {
id -> Integer, id -> Integer,
source -> Text, source -> Text,
name -> Text, name -> Text,
} }
} }
table! { table! {
playlist_songs (id) { playlist_songs (id) {
id -> Integer, id -> Integer,
playlist -> Integer, playlist -> Integer,
path -> Text, path -> Text,
ordering -> Integer, ordering -> Integer,
} }
} }
table! { table! {
playlists (id) { playlists (id) {
id -> Integer, id -> Integer,
owner -> Integer, owner -> Integer,
name -> Text, name -> Text,
} }
} }
table! { table! {
songs (id) { songs (id) {
id -> Integer, id -> Integer,
path -> Text, path -> Text,
parent -> Text, parent -> Text,
track_number -> Nullable<Integer>, track_number -> Nullable<Integer>,
disc_number -> Nullable<Integer>, disc_number -> Nullable<Integer>,
title -> Nullable<Text>, title -> Nullable<Text>,
artist -> Nullable<Text>, artist -> Nullable<Text>,
album_artist -> Nullable<Text>, album_artist -> Nullable<Text>,
year -> Nullable<Integer>, year -> Nullable<Integer>,
album -> Nullable<Text>, album -> Nullable<Text>,
artwork -> Nullable<Text>, artwork -> Nullable<Text>,
duration -> Nullable<Integer>, duration -> Nullable<Integer>,
} }
} }
table! { table! {
users (id) { users (id) {
id -> Integer, id -> Integer,
name -> Text, name -> Text,
password_hash -> Text, password_hash -> Text,
admin -> Integer, admin -> Integer,
lastfm_username -> Nullable<Text>, lastfm_username -> Nullable<Text>,
lastfm_session_key -> Nullable<Text>, lastfm_session_key -> Nullable<Text>,
web_theme_base -> Nullable<Text>, web_theme_base -> Nullable<Text>,
web_theme_accent -> Nullable<Text>, web_theme_accent -> Nullable<Text>,
} }
} }
joinable!(playlist_songs -> playlists (playlist)); joinable!(playlist_songs -> playlists (playlist));
joinable!(playlists -> users (owner)); joinable!(playlists -> users (owner));
allow_tables_to_appear_in_same_query!( allow_tables_to_appear_in_same_query!(
ddns_config, ddns_config,
directories, directories,
misc_settings, misc_settings,
mount_points, mount_points,
playlist_songs, playlist_songs,
playlists, playlists,
songs, songs,
users, users,
); );