aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-01-11 13:20:42 -0800
committerScott Jackson <daneren2005@gmail.com>2014-01-11 13:20:42 -0800
commit968868b8260dbd914d1b3475704afb69cd7f27cf (patch)
treeee9d8660406ae63d15f41a9b76c4d5d52e2ef4ce /src/github/daneren2005
parentac3b53f6fd64a00a121dfa19c489fe251f141362 (diff)
downloaddsub-968868b8260dbd914d1b3475704afb69cd7f27cf.tar.gz
dsub-968868b8260dbd914d1b3475704afb69cd7f27cf.tar.bz2
dsub-968868b8260dbd914d1b3475704afb69cd7f27cf.zip
Fix bitrate estimation
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadFile.java14
1 files changed, 7 insertions, 7 deletions
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;
}