From 90643ffe79badc378f55630fe559236f5b580aa8 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 6 Feb 2014 18:03:37 -0800 Subject: Fix web commits --- src/github/daneren2005/dsub/service/DownloadFile.java | 12 ++++++------ src/github/daneren2005/dsub/util/Util.java | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/github') 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); -- cgit v1.2.3