Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb046c26c5 | ||
|
|
3d97b5abb0 | ||
|
|
da8c7c2837 | ||
|
|
d9c11d86ad | ||
|
|
b9172845d8 | ||
|
|
3d3fa76771 | ||
|
|
521183d427 |
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user