diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-02-06 18:03:37 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-02-06 18:03:37 -0800 |
commit | 90643ffe79badc378f55630fe559236f5b580aa8 (patch) | |
tree | e50f780a97ff641b35bf2654bdd61f9c3b57e87d /src/github | |
parent | 04dea2ee1d7fddf143f6690ab95e71754628e346 (diff) | |
download | dsub-90643ffe79badc378f55630fe559236f5b580aa8.tar.gz dsub-90643ffe79badc378f55630fe559236f5b580aa8.tar.bz2 dsub-90643ffe79badc378f55630fe559236f5b580aa8.zip |
Fix web commits
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadFile.java | 12 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/util/Util.java | 2 |
2 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 cfadced5..fb5122ba 100644 --- a/src/github/daneren2005/dsub/service/DownloadFile.java +++ b/src/github/daneren2005/dsub/service/DownloadFile.java @@ -63,7 +63,7 @@ public class DownloadFile { private boolean saveWhenDone = false; private boolean completeWhenDone = false; private Integer contentLength = null; - private int currentSpeed = 0; + private long currentSpeed = 0; public DownloadFile(Context context, MusicDirectory.Entry song, boolean save) { this.context = context; @@ -111,7 +111,7 @@ public class DownloadFile { return contentLength; } - public int getCurrentSize() { + public long getCurrentSize() { if(partialFile.exists()) { return partialFile.length(); } else { @@ -119,12 +119,12 @@ public class DownloadFile { if(file.exists()) { return file.length(); } else { - return 0; + return 0L; } } } - public int getEstimatedSize() { + public long getEstimatedSize() { if(contentLength != null) { return contentLength; } @@ -135,13 +135,13 @@ public class DownloadFile { } else if(song.getDuration() == null) { return 0; } else { - int br = getBitrate(); + int br = getBitRate(); int duration = song.getDuration(); return br * duration; } } - public int getBytesPerSecond() { + public long getBytesPerSecond() { return currentSpeed; } diff --git a/src/github/daneren2005/dsub/util/Util.java b/src/github/daneren2005/dsub/util/Util.java index fe8b6eae..05dbb1c3 100644 --- a/src/github/daneren2005/dsub/util/Util.java +++ b/src/github/daneren2005/dsub/util/Util.java @@ -1122,7 +1122,7 @@ public final class Util { .setProgress(10, 5, true) .setOngoing(true) .addAction(R.drawable.notification_close, - context.getResources().getString(R.string.common_cancel, + context.getResources().getString(R.string.common_cancel), cancelPI); Intent notificationIntent = new Intent(context, SubsonicFragmentActivity.class); |