1
0
mirror of https://github.com/pisto/oggify synced 2024-11-14 17:27:29 +00:00

fix fetching OGG_VORBIS_96

This commit is contained in:
Lorenzo Pistone 2019-02-14 12:10:50 +01:00
parent b397349f1f
commit db2162e1ac

View File

@ -60,7 +60,7 @@ fn main() {
debug!("File formats: {}", track.files.keys().map(|filetype|format!("{:?}", filetype)).collect::<Vec<_>>().join(" "));
let file_id = track.files.get(&FileFormat::OGG_VORBIS_320)
.or(track.files.get(&FileFormat::OGG_VORBIS_160))
.or(track.files.get(&FileFormat::OGG_VORBIS_320))
.or(track.files.get(&FileFormat::OGG_VORBIS_96))
.expect("Could not find a OGG_VORBIS format for the track.");
let key = core.run(session.audio_key().request(track.id, *file_id)).expect("Cannot get audio key");
let mut encrypted_file = core.run(AudioFile::open(&session, *file_id)).unwrap();