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: don't shuffle and remember track position for podcasts

Gee Sawra 5f35583e 65947ab7

+9 -6
+9 -6
src/gpod/gpod.rs
··· 155 155 log::warn!("could not add album art bytes (embedded in track) to ipod") 156 156 } 157 157 } 158 - itdb_track_add(self.db_ptr, ipod_track, -1); 159 158 160 - match track.kind { 159 + let dest_playlist = match track.kind { 161 160 model::TrackKind::Unknown => panic!("unknown track kind, impossible!"), 162 - model::TrackKind::Music => { 163 - itdb_playlist_add_track(itdb_playlist_mpl(self.db_ptr), ipod_track, -1) 164 - } 161 + model::TrackKind::Music => itdb_playlist_mpl(self.db_ptr), 165 162 model::TrackKind::Podcast => { 166 - itdb_playlist_add_track(itdb_playlist_podcasts(self.db_ptr), ipod_track, -1) 163 + (*ipod_track).remember_playback_position = 0x01; 164 + (*ipod_track).skip_when_shuffling = 0x01; 165 + (*ipod_track).flag4 = 0x02; 166 + itdb_playlist_podcasts(self.db_ptr) 167 167 } 168 168 }; 169 + 170 + itdb_track_add(self.db_ptr, ipod_track, -1); 171 + itdb_playlist_add_track(dest_playlist, ipod_track, -1); 169 172 170 173 let copy_success = itdb_cp_finalize(ipod_track, mp.as_ptr(), path.as_ptr(), &mut error); 171 174 if copy_success.is_null() {