From 968868b8260dbd914d1b3475704afb69cd7f27cf Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sat, 11 Jan 2014 13:20:42 -0800 Subject: Fix bitrate estimation --- src/github/daneren2005/dsub/service/DownloadFile.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/service/DownloadFile.java b/src/github/daneren2005/dsub/service/DownloadFile.java index 27fc0708..d7a05da7 100644 --- a/src/github/daneren2005/dsub/service/DownloadFile.java +++ b/src/github/daneren2005/dsub/service/DownloadFile.java @@ -95,13 +95,13 @@ public class DownloadFile { } private int getActualBitrate() { int br = song.isVideo() ? Util.getMaxVideoBitrate(context) : Util.getMaxBitrate(context); - if (br == 0 && song.getTranscodedSuffix() != null && - "mp3".equals(song.getTranscodedSuffix().toLowerCase()) && - song.getBitRate() != null) { - br = Math.min(320, song.getBitRate()); - } else { - br = 320; - } + if(br == 0 && song.getTranscodedSuffix() != null && "mp3".equals(song.getTranscodedSuffix().toLowerCase())) { + if(song.getBitRate() != null) { + br = Math.min(320, song.getBitRate()); + } else { + br = 320; + } + } return br; } -- cgit v1.2.3