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

Function get_playlists_by_option

src/utils/db_utils.rs:73–87  ·  view source on GitHub ↗
(
    options: QueryablePlaylist,
    setter: impl Set<Value = Vec<QueryablePlaylist>> + 'static,
)

Source from the content-addressed store, hash-verified

71#[tracing::instrument(level = "debug", skip(options, setter))]
72#[cfg(feature = "mock")]
73pub fn get_playlists_by_option(
74 options: QueryablePlaylist,
75 setter: impl Set<Value = Vec<QueryablePlaylist>> + 'static,
76) {
77 let mut songs = vec![];
78 for i in 0..1000 {
79 let mut playlist = QueryablePlaylist::default();
80 playlist.playlist_id = Some(format!("playlist_id_{}", i));
81 playlist.playlist_name = format!("Playlist {}", i);
82 playlist.playlist_coverpath = Some("https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/SMPTE_Color_Bars.svg/200px-SMPTE_Color_Bars.svg.png".to_string());
83 songs.push(playlist);
84 }
85
86 setter.set(songs);
87}
88
89#[tracing::instrument(level = "debug", skip(options, setter))]
90#[cfg(feature = "mock")]

Callers 1

AllPlaylistsFunction · 0.85

Calls 2

setMethod · 0.80
get_provider_keysMethod · 0.45

Tested by

no test coverage detected