File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -103,8 +103,14 @@ impl LibraryQuery {
103103 . collect ( ) ) ;
104104 }
105105
106- let db = ctx. data :: < Database > ( ) . unwrap ( ) ;
107- let results = ArtistRepository :: new ( db. get_connection ( ) ) ;
106+ let db = ctx. data :: < Database > ( ) . unwrap ( ) ;
107+
108+ let results = ArtistRepository :: new ( db. get_connection ( ) )
109+ . find_all ( filter, offset. map ( |x| x as u64 ) , limit. map ( |x| x as u64 ) )
110+ . await ?;
111+
112+ Ok ( results. into_iter ( ) . map ( Into :: into) . collect ( ) )
113+ }
108114
109115 async fn albums (
110116 & self ,
@@ -143,6 +149,7 @@ impl LibraryQuery {
143149 }
144150
145151 let db = ctx. data :: < Database > ( ) . unwrap ( ) ;
152+
146153 let results = AlbumRepository :: new ( db. get_connection ( ) )
147154 . find_all ( filter, offset. map ( |x| x as u64 ) , limit. map ( |x| x as u64 ) )
148155 . await ?;
You can’t perform that action at this time.
0 commit comments