MCPcopy Create free account
hub / github.com/Moosync/Moosync / get_playlists_local

Function get_playlists_local

src/utils/db_utils.rs:144–160  ·  view source on GitHub ↗
(setter: T)

Source from the content-addressed store, hash-verified

142#[tracing::instrument(level = "debug", skip(setter))]
143#[cfg(not(feature = "mock"))]
144pub fn get_playlists_local<T>(setter: T)
145where
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"))]

Callers 2

SongListFunction · 0.85
ExploreFunction · 0.85

Calls 1

setMethod · 0.80

Tested by

no test coverage detected