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

Function get_high_img

src/utils/common.rs:180–206  ·  view source on GitHub ↗
(song: &Song)

Source from the content-addressed store, hash-verified

178
179#[tracing::instrument(level = "debug", skip(song))]
180pub fn get_high_img(song: &Song) -> String {
181 if let Some(cover) = &song.song.song_cover_path_high {
182 return convert_file_src(cover.to_string());
183 }
184
185 if let Some(cover) = song
186 .album
187 .as_ref()
188 .and_then(|a| a.album_coverpath_high.clone())
189 {
190 return convert_file_src(cover.to_string());
191 }
192
193 if let Some(cover) = &song.song.song_cover_path_low {
194 return convert_file_src(cover.to_string());
195 }
196
197 if let Some(cover) = song
198 .album
199 .as_ref()
200 .and_then(|a| a.album_coverpath_low.clone())
201 {
202 return convert_file_src(cover.to_string());
203 }
204
205 String::new()
206}
207
208macro_rules! fetch_infinite {
209 ($provider:expr, $fetch_content:ident, $update_signal:expr, $next_page_signal:ident, $is_loading:ident, $($arg:expr),*) => {

Callers 2

MusicInfoMobileFunction · 0.85
SongDetailsFunction · 0.85

Calls 2

convert_file_srcFunction · 0.85
cloneMethod · 0.80

Tested by

no test coverage detected