From 5f97130b706983684ff22342f4223f966f94c08e Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 12 Nov 2013 18:46:19 -0800 Subject: Fixed web commits --- src/github/daneren2005/dsub/fragments/DownloadFragment.java | 4 ++-- src/github/daneren2005/dsub/view/BookmarkAdapter.java | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/src/github/daneren2005/dsub/fragments/DownloadFragment.java index c4597e78..682319f1 100644 --- a/src/github/daneren2005/dsub/fragments/DownloadFragment.java +++ b/src/github/daneren2005/dsub/fragments/DownloadFragment.java @@ -1152,7 +1152,7 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe return; } - DownloadFile currentDownload = downloadService.getCurrentPlaying(); + final DownloadFile currentDownload = downloadService.getCurrentPlaying(); if(currentDownload == null) { return; } @@ -1175,7 +1175,7 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe AlertDialog dialog = builder.create(); dialog.show(); } - private void createBookmark(DownloadFile currentDownload, String comment) { + private void createBookmark(final DownloadFile currentDownload, final String comment) { new SilentBackgroundTask(context) { @Override protected Void doInBackground() throws Throwable { diff --git a/src/github/daneren2005/dsub/view/BookmarkAdapter.java b/src/github/daneren2005/dsub/view/BookmarkAdapter.java index 2ea7bf73..bcddc574 100644 --- a/src/github/daneren2005/dsub/view/BookmarkAdapter.java +++ b/src/github/daneren2005/dsub/view/BookmarkAdapter.java @@ -25,8 +25,12 @@ import java.util.List; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; +import android.widget.TextView; + +import github.daneren2005.dsub.R; import github.daneren2005.dsub.domain.Bookmark; import github.daneren2005.dsub.domain.MusicDirectory; +import github.daneren2005.dsub.util.Util; public class BookmarkAdapter extends ArrayAdapter { private final static String TAG = BookmarkAdapter.class.getSimpleName(); @@ -51,7 +55,7 @@ public class BookmarkAdapter extends ArrayAdapter { // Add current position to duration TextView durationTextView = (TextView) view.findViewById(R.id.song_duration); String duration = durationTextView.getText().toString(); - durationTextView.setText(Util.formatDuration(bookmark.getPosition()) + " / " + duration); + durationTextView.setText(Util.formatDuration(bookmark.getPosition() / 1000) + " / " + duration); return view; } -- cgit v1.2.3