(song: &Song)
| 149 | |
| 150 | #[tracing::instrument(level = "debug", skip(song))] |
| 151 | pub 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))] |
| 180 | pub fn get_high_img(song: &Song) -> String { |
no test coverage detected