* Add multiple addresses per server
* Clean up
* Change icon to globe
* Fix AddServerAddressDialog crashing on tv
* Fix navigation to main activity on tv
* Hide nav bar in UsersFragment and ServerAddressesFragment
* Add hint for server address
* Add multiple users per server
* Remove unnecessary longClickListener
* Check if user is selected on startup
* Still create JellyfinApi even if no user is selected
* Already fill in the username when needing to re-login
* Add new network settings with socket timeout option
* Add socketTimeout to AppPreferences
* Format with ktlint
* Add request timeout and connect timeout as options
* New server db schema
Adds support for multiple addresses and users per server
* Fix crash when the only available server is deleted and app is restarted
* Set serverId as foreign key in User and ServerAddress
* Format using ktlint
* Bump ServerDatabase version to 2
* Upgrade ExoPlayer to 2.18
* Change the position polling from every 2 to every 5 sec
* Make internalMediaItems non-nullable
* Clean up mpv track names
* Reduce explayer ffmpeg extension size by not including all decoders
Removed decoders vorbis, opus, flac, pcm_mulaw, pcm_alaw, mp3, aac because these are already supported by Android.
* Clean up preferredLanguage preferences
* Provide better error messages with stacktrace
+ clean up
+ fix error details popup in MediaInfoFragment
* Simplify exception passing by sending complete exception to the dialog
* Use viewLifecycleOwner with repeatOnLifecycle
* add empty subtitle track
* toggle selected variable
* does this work
* Revert "toggle selected variable"
This reverts commit 87589f1d34e741205674e66855b53d79a1f70adb.
* this should work
* this should work 2.0
* remove empty track if there are no subtitle tracks
* Add basic leanback support
* Add TV home fragment
Adds basic media browsing screen for TV. Shows Home screen media.
* Fix double emit when loading user views
* Fix bug when going back to this screen would duplicate menu items
* Add basic media detail fragment
* Add ability to navigate to detail fragment
* Fix imports and null safe calls
* Fix displaying of home item view type media files
* Playback refactor
* Add basic Tv player controls and split PlayerActivity
* Update strings
* Add progress bar to partially played items on TV home screen
* Track selection dialog PoC
* Update track selection WIP
* Show track selection of focus change
* Fix series display from home
* Minor updates
* Add back button to media detail
* Zero effort add server and login
* Fix colors
* Fix back button from home going back to init fragment
* Add settings button to home screen
* Fix crash after goig back from media detail fragment
* Show seasons and cast
* Merge branch 'develop' into add_basic_tv_support
# Conflicts:
# app/src/main/java/dev/jdtech/jellyfin/MainActivity.kt
# app/src/main/java/dev/jdtech/jellyfin/dialogs/VideoVersionDialogFragment.kt
# app/src/main/res/navigation/app_navigation.xml
* Fix cast title being shown with empty cast list
* Remove useless method
* Remove unused parameter
* Fix crash due to colorOnPrimary not existing in Leanback styles
* Remove unused theme
* Fix home to addserver fragment navigation
* Reuse home item layouts
This creates some duplicate code which will probably be cleaned up later
* Ignore more MissingDefaultResource
* Add banner
Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
* Refactor playback code
* Fix back state when playing media and rotating device
Problem was playerItems were re-emitted on fragment creation after config change. LiveData by design emit on every subscribe (observe) so to avoid that there are several possibilities.
1) easiest, observe playerItems not in onCreate but in playButton.clickListener. Stupid, since then we need to remember to only observe in this special place.
2) SingleLiveData - kind of hacky since LiveData were designed to behave this way so we don't want to go against their design.
3) Use Kotlin flow instead.
I chose the flow approach since it's Kotlin native and modern way to do things and behaves much more Rx-like. Since now we need to call collect instead of observe and launch in coroutine, I added utility method to make this easier. Also, in the future we might want to improve this further, either by coming up with new way entirely or by at least moving this to parent fragment from which all fragments that want to play media will inherit and thus making it easy to use and maintain.
Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
* add playback speed control to MPV player
* add playback speed control to exoplayer
* remove unnecessary method
* remove unused import
* use gauge icon from lucide
* use gauge icon from lucide
* fix the gauge icon