Browse Source

Merge pull request 'release 0.4.1' (#37) from develop into master

Reviewed-on: #37
master
Jannik 1 year ago
parent
commit
49e0b1ec29
  1. 10
      app/build.gradle
  2. 1
      app/src/main/java/org/mosad/teapod/parser/AoDParser.kt
  3. 2
      app/src/main/java/org/mosad/teapod/ui/activity/main/fragments/MediaFragment.kt
  4. 37
      app/src/main/java/org/mosad/teapod/ui/activity/player/PlayerActivity.kt
  5. 7
      app/src/main/java/org/mosad/teapod/util/DataTypes.kt
  6. 1
      fastlane/metadata/android/de/changelogs/4100.txt
  7. BIN
      fastlane/metadata/android/de/images/phoneScreenshots/Teapod_Home.jpg
  8. BIN
      fastlane/metadata/android/de/images/phoneScreenshots/Teapod_Library.jpg
  9. BIN
      fastlane/metadata/android/de/images/phoneScreenshots/Teapod_Search.jpg
  10. BIN
      fastlane/metadata/android/de/images/phoneScreenshots/Teapod_media.jpg
  11. 1
      fastlane/metadata/android/en-US/changelogs/4100.txt

10
app/build.gradle

@ -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'

1
app/src/main/java/org/mosad/teapod/parser/AoDParser.kt

@ -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)

2
app/src/main/java/org/mosad/teapod/ui/activity/main/fragments/MediaFragment.kt

@ -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

37
app/src/main/java/org/mosad/teapod/ui/activity/player/PlayerActivity.kt

@ -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()
}

7
app/src/main/java/org/mosad/teapod/util/DataTypes.kt

@ -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
)
/**

1
fastlane/metadata/android/de/changelogs/4100.txt

@ -0,0 +1 @@
* Ein Fehler beim laden einiger Serien wurde behoben (#36)

BIN
fastlane/metadata/android/de/images/phoneScreenshots/Teapod_Home.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

BIN
fastlane/metadata/android/de/images/phoneScreenshots/Teapod_Library.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

BIN
fastlane/metadata/android/de/images/phoneScreenshots/Teapod_Search.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 KiB

BIN
fastlane/metadata/android/de/images/phoneScreenshots/Teapod_media.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

1
fastlane/metadata/android/en-US/changelogs/4100.txt

@ -0,0 +1 @@
* fixed a issue where some tv shows could not be loaded (#36)
Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close