Skip to content

feat: podcast improvements - #20

Open
RadNotRed wants to merge 8 commits into
maxrave-dev:multiplatformfrom
RadNotRed:feat/better-podcasts
Open

feat: podcast improvements#20
RadNotRed wants to merge 8 commits into
maxrave-dev:multiplatformfrom
RadNotRed:feat/better-podcasts

Conversation

@RadNotRed

@RadNotRed RadNotRed commented Aug 6, 2026

Copy link
Copy Markdown

I've improved the podcast player and it makes it easier to control for longer episodes. I use this for my daily and this was just one of the things I felt was missing since I'm a big podcast listener

  • Added forward and backward seek buttons for podcasts
  • Added settings for 5, 10, 15, 30, or 60 second seek intervals on podcasts
  • Added previous and next episode controls
  • Podcasts now save playback progress
  • Added download options for one episode or all episodes
  • Added playback speed controls for podcasts that ignore crossfade settings since podcasts shouldn't crossfade
  • Hid music only menu such as adding podcast episodes to playlists in the player menu
  • Player and mini player show correct controls as well
  • Android notifications, lock screen controls, and the One UI Now Bar now show podcast seek buttons instead of previous and next

Tested using android debug

  • S24 Ultra (SM-S928U)
  • Android 16
  • SDK 36

Tested podcast playback, seeking, playback speed, episode progress, and switching between podcasts and music

Links to: maxrave-dev/SimpMusic#2303

Copilot AI lite review requested due to automatic review settings August 6, 2026 22:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the player stack to treat podcasts as a distinct media type, improving long-form playback ergonomics (seek controls/intervals), disabling crossfade behaviors that don’t fit podcasts, and persisting per-episode progress across sessions.

Changes:

  • Added podcast media-type detection and propagation across Track/GenericMediaItem/SongEntity, plus seek-interval normalization and tests.
  • Updated Android (Media3/ExoPlayer) and JVM (mpv) adapters to avoid crossfading podcasts and to apply podcast-specific audio handling (audio-session reporting / speech boost).
  • Implemented podcast playback-position persistence and restore logic in both Android and JVM media handlers.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
media/media3/src/main/java/com/maxrave/media3/exoplayer/CrossfadeExoPlayerAdapter.kt Reports active audio session changes and prevents crossfade/auto-meta behaviors for podcasts.
media/media-jvm/src/main/java/com/simpmusic/media_jvm/mpv/MpvPlayerAdapter.kt Enables podcast-specific playback behavior (speech boost) and skips crossfade meta loading for podcasts.
media/media-jvm/src/main/java/com/simpmusic/media_jvm/mpv/MpvPlayer.kt Adds a software gain “speech boost” factor into mpv volume application.
domain/src/commonTest/kotlin/com/maxrave/domain/extension/PodcastMediaTypeTest.kt Adds unit coverage for podcast media-type propagation and seek-interval normalization.
domain/src/commonMain/kotlin/com/maxrave/domain/mediaservice/player/MediaPlayerListener.kt Adds an audio-session callback hook for Android audio effects attachment timing.
domain/src/commonMain/kotlin/com/maxrave/domain/mediaservice/handler/MediaPlayerHandler.kt Introduces SeekBy event and a PODCAST playlist type helper.
domain/src/commonMain/kotlin/com/maxrave/domain/manager/DataStoreManager.kt Adds podcast seek interval settings and normalization utilities.
domain/src/commonMain/kotlin/com/maxrave/domain/extension/AllExt.kt Adds isPodcast helpers and preserves podcast type during entity/item conversions.
data/src/jvmMain/kotlin/com/maxrave/data/mediaservice/JvmMediaPlayerHandlerImpl.kt Implements podcast progress save/restore and adds support for SeekBy.
data/src/commonMain/kotlin/com/maxrave/data/dataStore/DataStoreManagerImpl.kt Persists podcast seek interval preferences (forward/rewind).
data/src/androidMain/kotlin/com/maxrave/data/mediaservice/MediaServiceHandlerImpl.kt Implements podcast progress save/restore, SeekBy, and audio-session-driven normalization behavior.
common/src/commonMain/kotlin/com/maxrave/common/Config.kt Adds the PODCAST media type constant and a DataStore key prefix for episode progress.
Suppressed comments (2)

data/src/androidMain/kotlin/com/maxrave/data/mediaservice/MediaServiceHandlerImpl.kt:2166

  • clearPodcastPosition writes to DataStore via putString on coroutineScope (often Main). Because putString does not dispatch to Dispatchers.IO, this can do disk-backed work on the main thread. Run this write on Dispatchers.IO (or backgroundScope) instead.
        coroutineScope.launch {
            dataStoreManager.putString("$PODCAST_PROGRESS_KEY_PREFIX${mediaItem.mediaId}", "0")

data/src/jvmMain/kotlin/com/maxrave/data/mediaservice/JvmMediaPlayerHandlerImpl.kt:2249

  • clearPodcastPosition performs a DataStore write via putString on coroutineScope. Since putString does not switch to Dispatchers.IO, doing this on the handler scope can introduce avoidable blocking/latency. Run the write on Dispatchers.IO (or backgroundScope) instead.
        coroutineScope.launch {
            dataStoreManager.putString("$PODCAST_PROGRESS_KEY_PREFIX${mediaItem.mediaId}", "0")
        }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RadNotRed
RadNotRed marked this pull request as ready for review August 6, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants