Compare commits

...

7 Commits

Author SHA1 Message Date
Niels van Velzen
cb046c26c5 Change opening menu to ACTION_UP instead of ACTION_DOWN
(cherry picked from commit 22b4ecf0ec)
2023-01-24 21:23:20 +01:00
Niels van Velzen
3d97b5abb0 Use HEADER_ACCEPT from SDK as Glide Accept header value
(cherry picked from commit a7b06d39e1)
2023-01-24 21:23:18 +01:00
Niels van Velzen
da8c7c2837 Set Accept header in Glide requests
(cherry picked from commit 3839d1c5d1)
2023-01-24 21:23:17 +01:00
renovate[bot]
d9c11d86ad Update dependency org.jellyfin.sdk:jellyfin-core to v1.4.1
(cherry picked from commit 80a2dd5ac1)
2023-01-24 21:23:15 +01:00
Niels van Velzen
b9172845d8 Increase amount of logs added to crash reports
Some stacktraces with Kotlin coroutines can get big. Right now we have 100 lines and this often is not enough to see what happened before the exception. Increasing the count to 250 should hopefully fix that.

(cherry picked from commit 5b83a6de9a)
2023-01-24 21:23:15 +01:00
Niels van Velzen
3d3fa76771 Remove experimental audio codecs from transcoding profile
(cherry picked from commit 3c70b8abf5)
2023-01-10 13:45:37 +01:00
Niels van Velzen
521183d427 Fix BrowseGridFragment focus not restoring when going back
(cherry picked from commit b5b87fb625)
2023-01-10 13:45:36 +01:00
7 changed files with 25 additions and 30 deletions

View File

@@ -32,6 +32,7 @@ object TelemetryService {
buildConfigClass = BuildConfig::class.java
sharedPreferencesName = TelemetryPreferences.SHARED_PREFERENCES_NAME
pluginLoader = AcraPluginLoader(AcraReportSenderFactory::class.java)
applicationLogFileLines = 250
toast {
text = context.getString(R.string.crash_report_toast)

View File

@@ -10,11 +10,14 @@ import androidx.core.view.doOnAttach
import androidx.lifecycle.findViewTreeLifecycleOwner
import androidx.lifecycle.lifecycleScope
import com.bumptech.glide.Glide
import com.bumptech.glide.load.model.GlideUrl
import com.bumptech.glide.load.model.LazyHeaders
import com.vanniktech.blurhash.BlurHash
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.jellyfin.androidtv.R
import org.jellyfin.sdk.api.client.ApiClient
import kotlin.math.round
import kotlin.time.Duration.Companion.milliseconds
@@ -69,15 +72,23 @@ class AsyncImageView @JvmOverloads constructor(
}
// Start loading image or placeholder
Glide.with(this@AsyncImageView)
.load(url ?: placeholder).apply {
if (url == null) {
Glide.with(this@AsyncImageView).load(placeholder).apply {
if (circleCrop) circleCrop()
}.into(this@AsyncImageView)
} else {
val glideUrl = GlideUrl(url, LazyHeaders.Builder().apply {
setHeader("Accept", ApiClient.HEADER_ACCEPT)
}.build())
Glide.with(this@AsyncImageView).load(glideUrl).apply {
placeholder(placeholderOrBlurHash)
error(placeholder)
if (circleCrop) circleCrop()
// FIXME: Glide is unable to scale the image when transitions are enabled
//transition(DrawableTransitionOptions.withCrossFade(crossFadeDuration.inWholeMilliseconds.toInt()))
}
.into(this@AsyncImageView)
}.into(this@AsyncImageView)
}
}
}
}

View File

@@ -188,27 +188,6 @@ public class BrowseGridFragment extends Fragment implements View.OnKeyListener {
// Hide the description because we don't have room for it
binding.npBug.showDescription(false);
// NOTE: we only get the 100% correct grid size if we render it once, so hook into it here
binding.rowsFragment.post(() -> {
if (binding.rowsFragment.getHeight() > 0 && binding.rowsFragment.getWidth() > 0) {
if (mGridView == null) {
return;
}
// prevent adaption on minor size delta's
if (Math.abs(mGridHeight - binding.rowsFragment.getHeight()) > MIN_GRIDSIZE_CHANGE_DELTA || Math.abs(mGridWidth - binding.rowsFragment.getWidth()) > MIN_GRIDSIZE_CHANGE_DELTA) {
mGridHeight = Math.round(binding.rowsFragment.getHeight() / getResources().getDisplayMetrics().density);
mGridWidth = Math.round(binding.rowsFragment.getWidth() / getResources().getDisplayMetrics().density);
Timber.d("Auto-Adapting grid size to height <%s> width <%s>", binding.rowsFragment.getHeight(), binding.rowsFragment.getWidth());
mDirty = true;
determiningPosterSize = true;
setAutoCardGridValues();
createGrid();
loadGrid();
determiningPosterSize = false;
}
}
});
return binding.getRoot();
}
@@ -223,7 +202,7 @@ public class BrowseGridFragment extends Fragment implements View.OnKeyListener {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (event.getAction() != KeyEvent.ACTION_DOWN) return false;
if (event.getAction() != KeyEvent.ACTION_UP) return false;
if (keyCode == KeyEvent.KEYCODE_MEDIA_PLAY || keyCode == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE) {
mediaManager.getValue().setCurrentMediaAdapter(mAdapter);

View File

@@ -339,7 +339,7 @@ public class EnhancedBrowseFragment extends Fragment implements RowLoader, View.
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (event.getAction() != KeyEvent.ACTION_DOWN) return false;
if (event.getAction() != KeyEvent.ACTION_UP) return false;
return KeyProcessor.HandleKey(keyCode, mCurrentItem, requireActivity());
}

View File

@@ -162,7 +162,7 @@ class HomeRowsFragment : RowsSupportFragment(), AudioEventListener, View.OnKeyLi
}
override fun onKey(v: View?, keyCode: Int, event: KeyEvent?): Boolean {
if (event?.action != KeyEvent.ACTION_DOWN) return false
if (event?.action != KeyEvent.ACTION_UP) return false
return KeyProcessor.HandleKey(keyCode, currentItem, activity)
}

View File

@@ -53,6 +53,10 @@ class ExoPlayerProfile(
add(Codec.Audio.PCM_MULAW)
}.toTypedArray()
private val allSupportedAudioCodecsWithoutFFmpegExperimental = allSupportedAudioCodecs
.filterNot { it == Codec.Audio.DCA || it == Codec.Audio.TRUEHD }
.toTypedArray()
init {
name = "AndroidTV-ExoPlayer"
@@ -68,7 +72,7 @@ class ExoPlayerProfile(
}.joinToString(",")
audioCodec = when {
Utils.downMixAudio(context) -> downmixSupportedAudioCodecs
else -> allSupportedAudioCodecs
else -> allSupportedAudioCodecsWithoutFFmpegExperimental
}.joinToString(",")
protocol = "hls"
copyTimestamps = false

View File

@@ -29,7 +29,7 @@ glide = "4.14.2"
gson = "2.8.9"
jellyfin-apiclient = "v0.7.10"
jellyfin-exoplayer-ffmpegextension = "2.18.2+1"
jellyfin-sdk = "1.4.0"
jellyfin-sdk = "1.4.1"
junit = "4.13.2"
kenburnsview = "1.0.7"
koin = "3.3.0"