Skip to content

Commit

Permalink
Don't request hevc transcode on Fire TV 1st Gen
Browse files Browse the repository at this point in the history
Not ideal as "*** Does NOT support HEVC" is already being logged, so
unsure why this is necessary.
  • Loading branch information
PriceChild committed Aug 10, 2024
1 parent ef899f9 commit a602194
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/src/main/java/org/jellyfin/androidtv/util/DeviceUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ object DeviceUtils {
@JvmStatic
val isFireTv: Boolean = Build.MODEL.startsWith(FIRE_TV_PREFIX)

@JvmStatic
val isFireTvGen1: Boolean = Build.MODEL.equals(FIRE_TV_MODEL_GEN_1)

@JvmStatic
val isFireTv4k: Boolean = Build.MODEL in listOf(
TOSHIBA_4K_2022,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import org.jellyfin.androidtv.util.profile.ProfileHelper.max1080pProfileConditio
import org.jellyfin.androidtv.util.profile.ProfileHelper.maxAudioChannelsCodecProfile
import org.jellyfin.androidtv.util.profile.ProfileHelper.photoDirectPlayProfile
import org.jellyfin.androidtv.util.profile.ProfileHelper.subtitleProfile
import org.jellyfin.androidtv.util.DeviceUtils
import org.jellyfin.apiclient.model.dlna.CodecProfile
import org.jellyfin.apiclient.model.dlna.CodecType
import org.jellyfin.apiclient.model.dlna.DeviceProfile
Expand Down Expand Up @@ -76,7 +77,7 @@ class ExoPlayerProfile(
this.context = EncodingContext.Streaming
container = Codec.Container.TS
videoCodec = buildList {
if (deviceHevcCodecProfile.ContainsCodec(Codec.Video.HEVC, Codec.Container.TS)) add(Codec.Video.HEVC)
if (deviceHevcCodecProfile.ContainsCodec(Codec.Video.HEVC, Codec.Container.TS) && !DeviceUtils.isFireTvGen1) add(Codec.Video.HEVC)
add(Codec.Video.H264)
}.joinToString(",")
audioCodec = when (downMixAudio) {
Expand Down

0 comments on commit a602194

Please sign in to comment.