fix fetching OGG_VORBIS_96

This commit is contained in:
Lorenzo Pistone 2019-02-14 12:10:50 +01:00
parent b397349f1f
commit db2162e1ac
1 changed files with 1 additions and 1 deletions

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();