From 12e957b6df87440007dd1d723c0a174e3bcc91c7 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Tue, 12 Jun 2012 10:28:19 +0200 Subject: [PATCH] Minor improvements to Mediaplayer --- src/de/podfetcher/activity/MediaplayerActivity.java | 4 ++-- src/de/podfetcher/feed/FeedMedia.java | 4 ++-- src/de/podfetcher/service/PlaybackService.java | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/de/podfetcher/activity/MediaplayerActivity.java b/src/de/podfetcher/activity/MediaplayerActivity.java index 52d95e347..24dc29acc 100644 --- a/src/de/podfetcher/activity/MediaplayerActivity.java +++ b/src/de/podfetcher/activity/MediaplayerActivity.java @@ -153,8 +153,8 @@ public class MediaplayerActivity extends SherlockActivity { if (media != null) { MediaPlayer player = playbackService.getPlayer(); - getSupportActionBar().setTitle(media.getItem().getTitle()); - getSupportActionBar().setSubtitle( + getSupportActionBar().setSubtitle(media.getItem().getTitle()); + getSupportActionBar().setTitle( media.getItem().getFeed().getTitle()); imgvCover.setImageBitmap( diff --git a/src/de/podfetcher/feed/FeedMedia.java b/src/de/podfetcher/feed/FeedMedia.java index 51eaf9c7b..a74947411 100644 --- a/src/de/podfetcher/feed/FeedMedia.java +++ b/src/de/podfetcher/feed/FeedMedia.java @@ -28,7 +28,7 @@ public class FeedMedia extends FeedFile{ this.download_url = download_url; } - public long getDuration() { + public int getDuration() { return duration; } @@ -36,7 +36,7 @@ public class FeedMedia extends FeedFile{ this.duration = duration; } - public long getPosition() { + public int getPosition() { return position; } diff --git a/src/de/podfetcher/service/PlaybackService.java b/src/de/podfetcher/service/PlaybackService.java index 81889462e..1ae6a9b4e 100644 --- a/src/de/podfetcher/service/PlaybackService.java +++ b/src/de/podfetcher/service/PlaybackService.java @@ -129,6 +129,7 @@ public class PlaybackService extends Service { if (status == PlayerStatus.PAUSED || status == PlayerStatus.PREPARED) { Log.d(TAG, "Resuming/Starting playback"); player.start(); + player.seekTo((int) media.getPosition()); setStatus(PlayerStatus.PLAYING); setupPositionSaver(); } else if (status == PlayerStatus.STOPPED) {