A tool to sync music with your favorite devices
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpod: remove from the correct playlist

Gee Sawra c3af4d11 5f35583e

+7 -1
+7 -1
src/gpod/gpod.rs
··· 193 193 194 194 pub fn remove(&self, track: model::Track) -> Result<()> { 195 195 unsafe { 196 - let mpl = itdb_playlist_mpl(self.db_ptr); 196 + let mpl = match track.kind { 197 + model::TrackKind::Unknown => return Err(anyhow!("unknown track kind")), 198 + model::TrackKind::Music => itdb_playlist_mpl(self.db_ptr), 199 + model::TrackKind::Podcast => itdb_playlist_podcasts(self.db_ptr), 200 + }; 201 + 197 202 let mut ti = (*mpl).members as *mut GList; 198 203 199 204 loop { ··· 206 211 if string((*it_track).comment) == track.track_id { 207 212 itdb_playlist_remove_track(mpl, it_track); 208 213 itdb_track_remove(it_track); 214 + itdb_track_free(it_track); 209 215 break; 210 216 } 211 217