Skip to content

Commit

Permalink
4.9.0 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
XilinJia committed Apr 18, 2024
1 parent 1f8bb95 commit a40da13
Show file tree
Hide file tree
Showing 49 changed files with 844 additions and 861 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ Even so, the database remains backward compatible, and AntennaPod's db can be ea

* New share notes menu option on various episode views
* Feed info view offers a link for direct search of feeds related to author
* New episode home view with two display modes: webpage or reader
* Text-to-Speech is enabled in reader's mode
* RSS feeds with no playable media can be subscribed and read/listened

### Online feed

Expand Down
16 changes: 10 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ android {
// Version code schema (not used):
// "1.2.3-beta4" -> 1020304
// "1.2.3" -> 1020395
versionCode 3020130
versionName "4.8.0"
versionCode 3020131
versionName "4.9.0"

def commit = ""
try {
Expand Down Expand Up @@ -227,10 +227,11 @@ dependencies {
implementation "androidx.fragment:fragment-ktx:1.6.2"
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation "androidx.media:media:1.7.0"
implementation "androidx.media3:media3-exoplayer:1.2.1"
implementation "androidx.media3:media3-ui:1.2.1"
implementation "androidx.media3:media3-datasource-okhttp:1.2.1"
implementation "androidx.media3:media3-common:1.2.1"
implementation "androidx.media3:media3-exoplayer:1.3.1"
implementation "androidx.media3:media3-ui:1.3.1"
implementation "androidx.media3:media3-datasource-okhttp:1.3.1"
implementation "androidx.media3:media3-common:1.3.1"
implementation "androidx.media3:media3-session:1.3.1"
implementation "androidx.palette:palette-ktx:1.0.0"
implementation "androidx.preference:preference-ktx:1.2.1"
implementation "androidx.recyclerview:recyclerview:1.3.2"
Expand Down Expand Up @@ -269,12 +270,15 @@ dependencies {
implementation 'com.github.xabaras:RecyclerViewSwipeDecorator:1.3'
implementation "com.annimon:stream:1.2.2"

implementation "net.dankito.readability4j:readability4j:1.0.8"

// Non-free dependencies:
playImplementation 'com.google.android.play:core-ktx:1.8.1'
compileOnly "com.google.android.wearable:wearable:2.9.0"

// this one can not be updated?
androidTestImplementation 'com.nanohttpd:nanohttpd:2.1.1'

androidTestImplementation "androidx.test.espresso:espresso-core:3.5.1"
androidTestImplementation "androidx.test.espresso:espresso-contrib:3.5.1"
androidTestImplementation "androidx.test.espresso:espresso-intents:3.5.1"
Expand Down
4 changes: 1 addition & 3 deletions app/src/free/java/ac/mdiq/podcini/playback/cast/CastPsmp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import ac.mdiq.podcini.playback.base.PlaybackServiceMediaPlayer.PSMPCallback
*/
object CastPsmp {
@JvmStatic
fun getInstanceIfConnected(context: Context,
callback: PSMPCallback
): PlaybackServiceMediaPlayer? {
fun getInstanceIfConnected(context: Context, callback: PSMPCallback): PlaybackServiceMediaPlayer? {
return null
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ac.mdiq.podcini.service.playback

import android.support.v4.media.session.MediaSessionCompat
import android.support.v4.media.session.PlaybackStateCompat
import androidx.media3.session.MediaSession

internal object WearMediaSession {
/**
Expand All @@ -11,7 +11,7 @@ internal object WearMediaSession {
// no-op
}

fun mediaSessionSetExtraForWear(mediaSession: MediaSessionCompat?) {
fun mediaSessionSetExtraForWear(mediaSession: MediaSession?) {
// no-op
}
}
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
tools:ignore="ExportedService">

<intent-filter>
<action android:name="androidx.media3.session.MediaLibraryService"/>
<action android:name="android.media.browse.MediaBrowserService"/>
<action android:name="ac.mdiq.podcini.intents.PLAYBACK_SERVICE" />
</intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import kotlin.concurrent.Volatile
* Abstract class that allows for different implementations of the PlaybackServiceMediaPlayer for local
* and remote (cast devices) playback.
*/
abstract class PlaybackServiceMediaPlayer protected constructor(protected val context: Context,
protected val callback: PSMPCallback) {
abstract class PlaybackServiceMediaPlayer protected constructor(protected val context: Context, protected val callback: PSMPCallback) {

@Volatile
private var oldPlayerStatus: PlayerStatus? = null

Expand All @@ -46,6 +46,7 @@ abstract class PlaybackServiceMediaPlayer protected constructor(protected val co
}

abstract fun isStartWhenPrepared(): Boolean

abstract fun setStartWhenPrepared(startWhenPrepared: Boolean)

abstract fun getPlayable(): Playable?
Expand All @@ -68,6 +69,8 @@ abstract class PlaybackServiceMediaPlayer protected constructor(protected val co

abstract fun getSelectedAudioTrack(): Int

abstract fun createMediaPlayer()

/**
* Starts or prepares playback of the specified Playable object. If another Playable object is already being played, the currently playing
* episode will be stopped and replaced with the new Playable object. If the Playable object is already being played, the method will
Expand Down Expand Up @@ -98,11 +101,7 @@ abstract class PlaybackServiceMediaPlayer protected constructor(protected val co
* for playback immediately (see 'prepareImmediately' parameter for more details)
* @param prepareImmediately Set to true if the method should also prepare the episode for playback.
*/
abstract fun playMediaObject(playable: Playable,
stream: Boolean,
startWhenPrepared: Boolean,
prepareImmediately: Boolean
)
abstract fun playMediaObject(playable: Playable, stream: Boolean, startWhenPrepared: Boolean, prepareImmediately: Boolean)

/**
* Resumes playback if the PSMP object is in PREPARED or PAUSED state. If the PSMP object is in an invalid state.
Expand Down Expand Up @@ -279,9 +278,7 @@ abstract class PlaybackServiceMediaPlayer protected constructor(protected val co
*
* @return a Future, just for the purpose of tracking its execution.
*/
protected abstract fun endPlayback(hasEnded: Boolean, wasSkipped: Boolean,
shouldContinue: Boolean, toStoppedState: Boolean
)
protected abstract fun endPlayback(hasEnded: Boolean, wasSkipped: Boolean, shouldContinue: Boolean, toStoppedState: Boolean)

/**
* @return `true` if the WifiLock feature should be used, `false` otherwise.
Expand Down Expand Up @@ -327,9 +324,7 @@ abstract class PlaybackServiceMediaPlayer protected constructor(protected val co
* Will be ignored if given the value of [Playable.INVALID_TIME].
*/
@Synchronized
protected fun setPlayerStatus(newStatus: PlayerStatus,
newMedia: Playable?, position: Int
) {
protected fun setPlayerStatus(newStatus: PlayerStatus, newMedia: Playable?, position: Int) {
Log.d(TAG, this.javaClass.simpleName + ": Setting player status to " + newStatus)

this.oldPlayerStatus = playerStatus
Expand Down
Loading

0 comments on commit a40da13

Please sign in to comment.