(song: &Song)
| 178 | |
| 179 | #[tracing::instrument(level = "debug", skip(song))] |
| 180 | pub 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 | |
| 208 | macro_rules! fetch_infinite { |
| 209 | ($provider:expr, $fetch_content:ident, $update_signal:expr, $next_page_signal:ident, $is_loading:ident, $($arg:expr),*) => { |
no test coverage detected