| 142 | #[tracing::instrument(level = "debug", skip(setter))] |
| 143 | #[cfg(not(feature = "mock"))] |
| 144 | pub fn get_playlists_local<T>(setter: T) |
| 145 | where |
| 146 | T: Set<Value = Vec<QueryablePlaylist>> + Update<Value = Vec<QueryablePlaylist>> + 'static, |
| 147 | { |
| 148 | spawn_local(async move { |
| 149 | let songs = serde_wasm_bindgen::from_value( |
| 150 | super::invoke::get_entity_by_options(GetEntityOptions { |
| 151 | playlist: Some(QueryablePlaylist::default()), |
| 152 | ..Default::default() |
| 153 | }) |
| 154 | .await |
| 155 | .unwrap(), |
| 156 | ) |
| 157 | .unwrap(); |
| 158 | setter.set(songs); |
| 159 | }); |
| 160 | } |
| 161 | |
| 162 | #[tracing::instrument(level = "debug", skip(options, setter))] |
| 163 | #[cfg(not(feature = "mock"))] |