release 0.4.1 #37
|
@ -10,8 +10,8 @@ android {
|
|||
applicationId "org.mosad.teapod"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 30
|
||||
versionCode 4000 //00.04.000
|
||||
versionName "0.4.0"
|
||||
versionCode 4100 //00.04.100
|
||||
versionName "0.4.1"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
resValue "string", "build_time", buildTime()
|
||||
|
@ -41,13 +41,13 @@ android {
|
|||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3'
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.3.2'
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.3'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.3.3'
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.4'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.3.4'
|
||||
implementation 'androidx.security:security-crypto:1.1.0-alpha03'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
|
||||
|
|
|
@ -395,6 +395,7 @@ object AoDParser {
|
|||
.ignoreContentType(true)
|
||||
.cookies(sessionCookies)
|
||||
.headers(headers)
|
||||
.timeout(120000) // loading the playlist can take some time
|
||||
.execute()
|
||||
|
||||
//Gson().fromJson(res.body(), AoDObject::class.java)
|
||||
|
|
|
@ -48,7 +48,7 @@ class MediaFragment(private val mediaId: Int) : Fragment() {
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
binding.frameLoading.visibility = View.VISIBLE
|
||||
|
||||
// tab layout and pager TODO
|
||||
// tab layout and pager
|
||||
pagerAdapter = ScreenSlidePagerAdapter(requireActivity())
|
||||
// fix material components issue #1878, if more tabs are added increase
|
||||
binding.pagerEpisodesSimilar.offscreenPageLimit = 2
|
||||
|
|
|
@ -50,9 +50,6 @@ class PlayerActivity : AppCompatActivity() {
|
|||
private lateinit var timerUpdates: TimerTask
|
||||
|
||||
private var wasInPiP = false
|
||||
private var playWhenReady = true
|
||||
private var currentWindow = 0
|
||||
private var playbackPosition: Long = 0
|
||||
private var remainingTime: Long = 0
|
||||
|
||||
private val rwdTime: Long = 10000.unaryMinus()
|
||||
|
@ -64,12 +61,6 @@ class PlayerActivity : AppCompatActivity() {
|
|||
setContentView(R.layout.activity_player)
|
||||
hideBars() // Initial hide the bars
|
||||
|
||||
savedInstanceState?.let {
|
||||
currentWindow = it.getInt(getString(R.string.state_resume_window))
|
||||
playbackPosition = it.getLong(getString(R.string.state_resume_position))
|
||||
playWhenReady = it.getBoolean(getString(R.string.state_is_playing))
|
||||
}
|
||||
|
||||
model.loadMedia(
|
||||
intent.getIntExtra(getString(R.string.intent_media_id), 0),
|
||||
intent.getIntExtra(getString(R.string.intent_episode_id), 0)
|
||||
|
@ -110,34 +101,21 @@ class PlayerActivity : AppCompatActivity() {
|
|||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
if (isInPiPMode()) { return }
|
||||
|
||||
if (Util.SDK_INT <= 23) {
|
||||
video_view?.onPause()
|
||||
releasePlayer()
|
||||
}
|
||||
if (isInPiPMode()) { return }
|
||||
if (Util.SDK_INT <= 23) { onPauseOnStop() }
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
super.onStop()
|
||||
if (Util.SDK_INT > 23) {
|
||||
video_view?.onPause()
|
||||
releasePlayer()
|
||||
}
|
||||
|
||||
if (Util.SDK_INT > 23) { onPauseOnStop() }
|
||||
// if the player was in pip, it's on a different task
|
||||
if (wasInPiP) { navToLauncherTask() }
|
||||
// if the player is in pip, remove the task, else we'll get a zombie
|
||||
if (isInPiPMode()) { finishAndRemoveTask() }
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
outState.putInt(getString(R.string.state_resume_window), currentWindow)
|
||||
outState.putLong(getString(R.string.state_resume_position), playbackPosition)
|
||||
outState.putBoolean(getString(R.string.state_is_playing), playWhenReady)
|
||||
super.onSaveInstanceState(outState)
|
||||
}
|
||||
|
||||
/**
|
||||
* used, when the player is in pip and the user selects a new media
|
||||
*/
|
||||
|
@ -209,7 +187,6 @@ class PlayerActivity : AppCompatActivity() {
|
|||
* set play when ready and listeners
|
||||
*/
|
||||
private fun initExoPlayer() {
|
||||
model.player.playWhenReady = playWhenReady
|
||||
model.player.addListener(object : Player.EventListener {
|
||||
override fun onPlaybackStateChanged(state: Int) {
|
||||
super.onPlaybackStateChanged(state)
|
||||
|
@ -233,7 +210,7 @@ class PlayerActivity : AppCompatActivity() {
|
|||
})
|
||||
|
||||
// start playing the current episode, after all needed player components have been initialized
|
||||
model.playEpisode(model.currentEpisode, true, playbackPosition)
|
||||
model.playEpisode(model.currentEpisode, true)
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
|
@ -308,10 +285,8 @@ class PlayerActivity : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun releasePlayer() {
|
||||
playbackPosition = model.player.currentPosition
|
||||
currentWindow = model.player.currentWindowIndex
|
||||
playWhenReady = model.player.playWhenReady
|
||||
private fun onPauseOnStop() {
|
||||
video_view?.onPause()
|
||||
model.player.pause()
|
||||
timerUpdates.cancel()
|
||||
}
|
||||
|
|
|
@ -55,7 +55,9 @@ data class Media(
|
|||
fun getEpisodeById(id: Int) = episodes.first { it.id == id }
|
||||
}
|
||||
|
||||
// TODO all val?
|
||||
/**
|
||||
* uses var, since the values are written in different steps
|
||||
*/
|
||||
data class Info(
|
||||
var title: String = "",
|
||||
var posterUrl: String = "",
|
||||
|
@ -98,7 +100,6 @@ data class Stream(
|
|||
|
||||
/**
|
||||
* this class is used for tmdb responses
|
||||
* TODO why is runtime var?
|
||||
*/
|
||||
data class TMDBResponse(
|
||||
val id: Int = 0,
|
||||
|
@ -106,7 +107,7 @@ data class TMDBResponse(
|
|||
val overview: String = "",
|
||||
val posterUrl: String = "",
|
||||
val backdropUrl: String = "",
|
||||
var runtime: Int = 0
|
||||
val runtime: Int = 0
|
||||
)
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
* Ein Fehler beim laden einiger Serien wurde behoben (#36)
|
After Width: | Height: | Size: 401 KiB |
After Width: | Height: | Size: 419 KiB |
After Width: | Height: | Size: 393 KiB |
After Width: | Height: | Size: 261 KiB |
|
@ -0,0 +1 @@
|
|||
* fixed a issue where some tv shows could not be loaded (#36)
|