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

Function get_low_img

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

Source from the content-addressed store, hash-verified

149
150#[tracing::instrument(level = "debug", skip(song))]
151pub fn get_low_img(song: &Song) -> String {
152 if let Some(cover) = &song.song.song_cover_path_low {
153 return convert_file_src(cover.to_string());
154 }
155
156 if let Some(cover) = song
157 .album
158 .as_ref()
159 .and_then(|a| a.album_coverpath_low.clone())
160 {
161 return convert_file_src(cover.to_string());
162 }
163
164 if let Some(cover) = &song.song.song_cover_path_high {
165 return convert_file_src(cover.to_string());
166 }
167
168 if let Some(cover) = song
169 .album
170 .as_ref()
171 .and_then(|a| a.album_coverpath_high.clone())
172 {
173 return convert_file_src(cover.to_string());
174 }
175
176 String::new()
177}
178
179#[tracing::instrument(level = "debug", skip(song))]
180pub fn get_high_img(song: &Song) -> String {

Callers 1

DetailsFunction · 0.85

Calls 2

convert_file_srcFunction · 0.85
cloneMethod · 0.80

Tested by

no test coverage detected