* 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
* Update new strings
Refactored to match with default string file, minor fiexs and new strings translated.
* Use normal string items instead of string-arrays
Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
* Redesign settings to two pane layout
* Add downloads settings
* Suppress unused settings fragments warnings
* Fix download icon in other places
Also removes the filled download drawable
* Add option to display extended episode title (SXX:EXX - Title) in player
* ocd fix
* add null check condition
* Move setting to player category
Yeah this would fit in either Appearance or Player. But I lean more towards Player.
Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
* implemented pan/panStop on a GestureListener to detect the entry location and exclude top status bar area.
* remember last brightness set for players [ Exoplayer , MPV]
* Pinch to zoom and auto rotate feature for Exoplayer
* Only save the brightness when the overlay disappears instead of on every scroll
Also clean up some files
* removed unnecessary configChanges from Manifest
Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
* Convert MediaFragment to use new UiState
* Convert PersonDetailFragment to use new UiState
* Load PersonDetail data on start
* Convert FavoriteFragment to use new UiState
* Convert SeasonFragment to use new UiState
* Convert SearchResultFragment to use new UiState
* Convert EpisodeBottomSheetFragment to use new UiState (WIP)
* Convert EpisodeBottomSheetFragment to use new UiState (Part 2)
* Convert LibraryFragment to use new UiState
* Convert DownloadFragment to use new UiState
* Convert HomeFragment to use new UiState
* Convert MediaInfoFragment to use new UiState (WIP)
* Convert MediaInfoViewModel to use new UiState (Part 2)
* Convert ServerSelectViewModel to use new UiState (Semi)
* Fix MediaInfoFragment for downloaded movies
* Add caching to settings with ability to choose cache size
* Remove unused parameter from Api
* Add glide module for cache setup
* Clean up image handling in adapters
* Move caching to it's own category
Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
* Add brightness swipe control
* Add background to the overlays
Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
* Fix download playback tracking bug
* Remove unused permission
* Add overview text to downloadmetadata
* Add visual indicator of whether item is downloaded
* Use downloaded item when available
* Fix "null" overview text in download metadata
* Fix crash when playing downloaded file with mpv
* Clean up
Co-authored-by: jarnedemeulemeester <jarnedemeulemeester@gmail.com>
* Add refresh to home fragment
* Remove forgotten code
* Remove unnecessary condition and fix HomeSection equality check
* Make HomeFragment fragment view model again
* Add order dependent check for home items equality
* Fix loading state overwriting error state on home refresh
* Revert to older swiperefreshlayout version
* Fixing error and loading state
Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
* Improve AddServer fragment
* Improve login fragment
With other general improvements
* Resize the addserver and login fragments when the soft keyboard appears
* Upgrade androidx.core to 1.7.0 and add lifecycle deps
* New UI state system for AddServerFragment
This uses StateFlow for the state and SharedFlow for navigation
* Remove public flows and use collector functions
* Update Login ViewModel and Fragment
* Speed up server discovery
* Better login error message
* Add strings for errors when adding server
* Use add_server_error_version string instead of version
Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
* Add ability to name your device
* Update device name real time
* Remove unnecessary deviceInfo and apiClientFactory
Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
* 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>
* Add offline playback
* Remove unused values
* Replace downloadutilities extension functions with normal functions
This is to not polute the namespace of fragment and context.
* Replace default Android icons with those from lucide
* Fix deleting downloaded movie
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>