aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadFile.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadFile.java b/src/github/daneren2005/dsub/service/DownloadFile.java
index 3c896693..c3758b01 100644
--- a/src/github/daneren2005/dsub/service/DownloadFile.java
+++ b/src/github/daneren2005/dsub/service/DownloadFile.java
@@ -94,7 +94,15 @@ public class DownloadFile {
return song.getBitRate() == null ? 160 : song.getBitRate();
}
private int getActualBitrate() {
- return song.isVideo() ? Util.getMaxVideoBitrate(context) : Util.getMaxBitrate(context);
+ int br = song.isVideo() ? Util.getMaxVideoBitrate(context) : Util.getMaxBitrate(context);
+ if(br == 0 && "mp3".equals(song.getTranscodedSuffix().toLowerCase())) {
+ if(song.getBitRate() != null) {
+ br = Math.min(320, song.getBitRate());
+ } else {
+ br = 320;
+ }
+ }
+ return br;
}
public Integer getContentLength() {