From 0927f3815e49036d4e58310996cd98057d6d8344 Mon Sep 17 00:00:00 2001 From: Antoine Gersant Date: Wed, 25 Nov 2020 18:03:02 -0800 Subject: [PATCH] Autoformat --- src/config.rs | 5 +- src/db/schema.rs | 140 +++++++++++++++++++++++------------------------ 2 files changed, 71 insertions(+), 74 deletions(-) diff --git a/src/config.rs b/src/config.rs index 5e19bc3..b470bdc 100644 --- a/src/config.rs +++ b/src/config.rs @@ -85,10 +85,7 @@ pub fn read(db: &DB) -> Result { }; let (art_pattern, sleep_duration) = misc_settings - .select(( - index_album_art_pattern, - index_sleep_duration_seconds, - )) + .select((index_album_art_pattern, index_sleep_duration_seconds)) .get_result(&connection)?; config.album_art_pattern = Some(art_pattern); diff --git a/src/db/schema.rs b/src/db/schema.rs index 69bb788..1bc193f 100644 --- a/src/db/schema.rs +++ b/src/db/schema.rs @@ -1,99 +1,99 @@ table! { - ddns_config (id) { - id -> Integer, - host -> Text, - username -> Text, - password -> Text, - } + ddns_config (id) { + id -> Integer, + host -> Text, + username -> Text, + password -> Text, + } } table! { - directories (id) { - id -> Integer, - path -> Text, - parent -> Nullable, - artist -> Nullable, - year -> Nullable, - album -> Nullable, - artwork -> Nullable, - date_added -> Integer, - } + directories (id) { + id -> Integer, + path -> Text, + parent -> Nullable, + artist -> Nullable, + year -> Nullable, + album -> Nullable, + artwork -> Nullable, + date_added -> Integer, + } } table! { - misc_settings (id) { - id -> Integer, - auth_secret -> Binary, - index_sleep_duration_seconds -> Integer, - index_album_art_pattern -> Text, - } + misc_settings (id) { + id -> Integer, + auth_secret -> Binary, + index_sleep_duration_seconds -> Integer, + index_album_art_pattern -> Text, + } } table! { - mount_points (id) { - id -> Integer, - source -> Text, - name -> Text, - } + mount_points (id) { + id -> Integer, + source -> Text, + name -> Text, + } } table! { - playlist_songs (id) { - id -> Integer, - playlist -> Integer, - path -> Text, - ordering -> Integer, - } + playlist_songs (id) { + id -> Integer, + playlist -> Integer, + path -> Text, + ordering -> Integer, + } } table! { - playlists (id) { - id -> Integer, - owner -> Integer, - name -> Text, - } + playlists (id) { + id -> Integer, + owner -> Integer, + name -> Text, + } } table! { - songs (id) { - id -> Integer, - path -> Text, - parent -> Text, - track_number -> Nullable, - disc_number -> Nullable, - title -> Nullable, - artist -> Nullable, - album_artist -> Nullable, - year -> Nullable, - album -> Nullable, - artwork -> Nullable, - duration -> Nullable, - } + songs (id) { + id -> Integer, + path -> Text, + parent -> Text, + track_number -> Nullable, + disc_number -> Nullable, + title -> Nullable, + artist -> Nullable, + album_artist -> Nullable, + year -> Nullable, + album -> Nullable, + artwork -> Nullable, + duration -> Nullable, + } } table! { - users (id) { - id -> Integer, - name -> Text, - password_hash -> Text, - admin -> Integer, - lastfm_username -> Nullable, - lastfm_session_key -> Nullable, - web_theme_base -> Nullable, - web_theme_accent -> Nullable, - } + users (id) { + id -> Integer, + name -> Text, + password_hash -> Text, + admin -> Integer, + lastfm_username -> Nullable, + lastfm_session_key -> Nullable, + web_theme_base -> Nullable, + web_theme_accent -> Nullable, + } } joinable!(playlist_songs -> playlists (playlist)); joinable!(playlists -> users (owner)); allow_tables_to_appear_in_same_query!( - ddns_config, - directories, - misc_settings, - mount_points, - playlist_songs, - playlists, - songs, - users, + ddns_config, + directories, + misc_settings, + mount_points, + playlist_songs, + playlists, + songs, + users, );