mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
Merge pull request #6802 from FineFindus/fix/rotate-crash
fix: check if streams is initialized
This commit is contained in:
commit
a5162380ae
@ -141,11 +141,11 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
||||
private lateinit var streams: Streams
|
||||
val isShort
|
||||
get() = run {
|
||||
val heightGreaterThanWidth = streams.videoStreams.firstOrNull()?.let {
|
||||
val heightGreaterThanWidth = ::streams.isInitialized && streams.videoStreams.firstOrNull()?.let {
|
||||
(it.height ?: 0) > (it.width ?: 0)
|
||||
}
|
||||
} == true
|
||||
|
||||
PlayingQueue.getCurrent()?.isShort == true || heightGreaterThanWidth == true
|
||||
PlayingQueue.getCurrent()?.isShort == true || heightGreaterThanWidth
|
||||
}
|
||||
|
||||
// if null, it's been set to automatic
|
||||
|
Loading…
x
Reference in New Issue
Block a user