diff --git a/src/components/cardview.rs b/src/components/cardview.rs index c3a08f9e..c306a7fc 100644 --- a/src/components/cardview.rs +++ b/src/components/cardview.rs @@ -3,11 +3,13 @@ use std::rc::Rc; use crate::{ components::provider_icon::ProviderIcon, icons::{play_hover_icon::PlayHoverIcon, song_default_icon::SongDefaultIcon}, + utils::common::convert_file_src, }; use leptos::{component, create_rw_signal, view, IntoView, SignalGet, SignalSet}; use leptos_router::A; use leptos_virtual_scroller::VirtualGridScroller; use serde::Serialize; +use types::errors::MoosyncError; type CardContextMenu = Option>>; @@ -82,9 +84,14 @@ where } else { view! { } .into_view() diff --git a/src/components/prefs/components.rs b/src/components/prefs/components.rs index cf2622e2..0aa00a72 100644 --- a/src/components/prefs/components.rs +++ b/src/components/prefs/components.rs @@ -55,7 +55,6 @@ pub fn PathsPref( }); let start_scan = move |_| { - tracing::info!("Starting scan"); spawn_local(async move { let _ = crate::utils::invoke::start_scan(None, true).await; }) diff --git a/src/pages/albums.rs b/src/pages/albums.rs index a7e46ccc..e97a64f3 100644 --- a/src/pages/albums.rs +++ b/src/pages/albums.rs @@ -7,7 +7,7 @@ use crate::components::songview::SongView; use crate::dyn_provider_songs; use crate::store::player_store::PlayerStore; use crate::store::provider_store::ProviderStore; -use crate::utils::common::fetch_infinite; +use crate::utils::common::{convert_file_src, fetch_infinite}; use crate::utils::songs::get_songs_from_indices; use leptos::{ component, create_effect, create_memo, create_rw_signal, create_write_slice, expect_context, @@ -53,7 +53,7 @@ pub fn SingleAlbum() -> impl IntoView { if let Some(album) = album { default_details.update(|d| { d.title = album.album_name.clone(); - d.icon = album.album_coverpath_high.clone(); + d.icon = album.album_coverpath_high.clone().map(convert_file_src); }); get_songs_by_option( diff --git a/src/pages/artists.rs b/src/pages/artists.rs index 145fcc6b..2be64ca1 100644 --- a/src/pages/artists.rs +++ b/src/pages/artists.rs @@ -5,7 +5,7 @@ use crate::components::songlist::ShowProvidersArgs; use crate::dyn_provider_songs; use crate::store::player_store::PlayerStore; use crate::store::provider_store::ProviderStore; -use crate::utils::common::fetch_infinite; +use crate::utils::common::{convert_file_src, fetch_infinite}; use crate::utils::db_utils::get_artists_by_option; use crate::utils::songs::get_songs_from_indices; use leptos::{ @@ -54,7 +54,7 @@ pub fn SingleArtist() -> impl IntoView { if let Some(artist) = artist { default_details.update(|d| { d.title = artist.artist_name.clone(); - d.icon = artist.artist_coverpath.clone(); + d.icon = artist.artist_coverpath.clone().map(convert_file_src); }); get_songs_by_option( diff --git a/src/pages/playlists.rs b/src/pages/playlists.rs index 240df7ba..00097f57 100644 --- a/src/pages/playlists.rs +++ b/src/pages/playlists.rs @@ -7,7 +7,7 @@ use crate::components::songview::SongView; use crate::store::modal_store::{ModalStore, Modals}; use crate::store::player_store::PlayerStore; use crate::store::ui_store::{PlaylistSortByColumns, UiStore}; -use crate::utils::common::fetch_infinite; +use crate::utils::common::{convert_file_src, fetch_infinite}; use crate::utils::db_utils::{ create_playlist, export_playlist, get_songs_by_option, remove_playlist, }; @@ -139,7 +139,7 @@ pub fn SinglePlaylist() -> impl IntoView { if let Some(playlist) = playlist { default_details.update(|d| { d.title = Some(playlist.playlist_name.clone()); - d.icon = playlist.playlist_coverpath.clone(); + d.icon = playlist.playlist_coverpath.clone().map(convert_file_src); }); let playlist_id = playlist.playlist_id.clone().unwrap();