Commit graph

139 commits

Author SHA1 Message Date
Jarne Demeulemeester
6ed2f2ff7b
Fix player crashing when no PlayerItems are passed 2022-08-30 10:13:02 +02:00
Jarne Demeulemeester
08ca3ef860
Fix only showing 1 discovered server 2022-08-27 19:31:04 +02:00
Jarne Demeulemeester
9813ff3ed7
Fix navigation reset on configuration change
For example when rotating
2022-08-21 22:01:38 +02:00
Jarne Demeulemeester
8f117ccacb
Disable input elements in LoginFragment and AddServerFragment when loading
Fix a bug when adding a server keeps loading
Fix "Invalid username or password" error message
2022-08-21 16:59:33 +02:00
Jarne Demeulemeester
7b85df6e69
Display discovered servers on AddServerFragment (#143) 2022-08-21 16:45:57 +02:00
Jarne Demeulemeester
5d2409c93e
Display public users on login fragment (#142)
* Add public users to login fragment

* Display user image and hide recyclerview if no public users
2022-08-21 14:22:07 +02:00
Jarne Demeulemeester
3b7473b7a5
Bring Android TV back (#141)
* Merge MainActivity and MainActivityTv

* Merge AddServerFragment and TvAddServerFragment

* Merge LoginFragment and TvLoginFragment

* Add new focus effect

* Add libraries to tv home

* Fix home empty when navigating back on mobile

* Add loading indicator to home fragment

* Add empty LibraryFragment

* Add focus outline to settings button

* Use DiffCallback for updating home fragment

* Visually upgrade MediaDetailFragment

* Make all home items focusable in touch mode

* Add new focus border to person item

* Add LibraryFragment layout for TV

(Whilst also making a clusterfuck of the navigation)

* Add missing try-catch in HomeViewModel

* Don't show CancellationException on AddServerFragment

* Fix a few crashes plus errors
2022-08-20 14:41:38 +02:00
Jarne Demeulemeester
cc0ab920fd
Move servers check to Activity (#136)
Remove MainViewModel
Change startDestination when no servers are found
2022-07-25 13:44:15 +02:00
Jarne Demeulemeester
8552f0c469
Refactor the lifecycle state (#135) 2022-07-25 12:57:09 +02:00
Jarne Demeulemeester
6bb784b2fe
Add error handling to device name updating
This fixes a crash
2022-07-09 13:57:25 +02:00
Jarne Demeulemeester
f400571e04
Customize the seeking increments (#128)
* Add the ability to customize the seeking increments

* Fix number keyboard image cache size

* Clean up fragment_settings_player.xml
2022-07-05 09:06:26 +02:00
Jarne Demeulemeester
8e4c8d1f13
Use repeatOnLifecycle api in MainActivity 2022-07-03 14:57:46 +02:00
Jarne Demeulemeester
2b2041c569
Disable the connect and login buttons when the app is connecting / logging in 2022-07-03 14:29:23 +02:00
Jarne Demeulemeester
bcdada538d
Upgrade ExoPlayer to 2.18 (#126)
* 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
2022-07-03 14:02:32 +02:00
Jarne Demeulemeester
6f0d5a13a8
Add support for external subtitles (#118)
* Add support for external subtitles in exoplayer

* Enable ASS/SSA external subtitles

* Enable VTT external subtitles

* Clean up

* Fix srt and vtt

Jellyfin currently converts vtt to srt without changing the codec tag. This makes the player unable to decode the subs because it thinks the file is vtt while in fact it is srt.

* Fix for vtt subs

Jellyfin return a srt stream when it should return a vtt stream
2022-07-02 17:00:00 +02:00
Jarne Demeulemeester
16c2cd634d
Add paging support to LibraryFragment (#124)
* Add paging support to the LibraryFragment

* Fix error handling
2022-06-17 15:16:29 +02:00
Jarne Demeulemeester
7467f89f82
Clean up some code 2022-06-11 21:51:30 +02:00
Jarne Demeulemeester
8c039a3c81
Upgrade to jellyfin-sdk 1.3.0 (#122)
Uses BaseItemKind to specify the item type
2022-06-11 21:39:08 +02:00
Jcuhfehl
c1740c1b68
Display downloaded episodes by series (#80)
* Display downloaded episodes by series

* Add offline playback to readme

* Remove accidentally commited changes

* Remove duplicate movie section in downloadviewmodel

* Fix issues with merging upstream

* Notify on download completion

* Fix trash icon color

* Update DownloadSeriesFragment to use new UiState system

* Clean up unused code

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2022-06-11 13:35:52 +02:00
Jarne Demeulemeester
751ee75c3e
Provide better error messages with stacktrace (#119)
* 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
2022-06-06 14:41:37 +02:00
Jarne Demeulemeester
a785d6d3f8
Upgrade ExoPlayer to 2.16.1 (#115)
* Upgrade ExoPlayer to 2.26.1 and fix mpv player

* Re-enable ffmpeg extension
2022-05-02 21:44:22 +02:00
NIK679
92e4b8eafc
Add option to disable subtitle in mpv (#110)
* 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
2022-04-23 19:46:06 +02:00
Jarne Demeulemeester
c8b6848e28
Don't display production year when it is null 2022-04-11 20:37:29 +02:00
Jarne Demeulemeester
c941326742
Fix episode bottom sheet error when premiereDate is null 2022-03-15 17:26:18 +01:00
Jarne Demeulemeester
4b47d3b8de
Target SDK 32, up minimum to 26 (#97)
minSdk 24 -> 26
targetSdk 31 -> 32
compileSdk 31 -> 32
2022-02-26 16:06:47 +01:00
Jarne Demeulemeester
ebdb00f311
Redesign settings to two pane layout (#90)
* 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
2022-02-19 17:33:58 +01:00
NIK679
3f37318c05
Add option to display extended episode title (SXX:EXX - Title) in player (#78)
* 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>
2022-02-12 17:15:05 +01:00
Jarne Demeulemeester
99a10446d5
Fix nullable 2022-01-30 20:30:02 +01:00
Jarne Demeulemeester
dca9902e10
Only show download button when user is allow to download
Fix #75
2022-01-21 17:39:28 +01:00
Jarne Demeulemeester
4b2dd6c672
Save downloads metadata to database (#81)
* Change downloads from metadata files to room database (WIP)

* Disable download progress

* Add file available check + clean up
2022-01-21 17:34:50 +01:00
Jarne Demeulemeester
7f1a3f6f90
Move unsupportedCollections to CollectionType 2022-01-01 21:45:57 +01:00
Jarne Demeulemeester
9a4f846023
Clean up JellyfinRepositoryImpl 2022-01-01 18:43:54 +01:00
Jarne Demeulemeester
8e3c4a3a37
Add error handling to played and favorite buttons 2022-01-01 17:57:49 +01:00
Jarne Demeulemeester
e9aca103d8
Simplify HomeItem diff checking with ids 2022-01-01 17:45:56 +01:00
Jarne Demeulemeester
1e9ddd1173
Clean up 2021-12-28 18:26:43 +01:00
Jarne Demeulemeester
c645ee3b81
New UI state system (#71)
* 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
2021-12-19 15:35:36 +01:00
Jcuhfehl
598c11f299
Improve offline playback (#68)
* 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>
2021-11-27 12:18:41 +01:00
lsrom
8c5d0bebf0
Add strm support (#66)
Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
2021-11-16 19:44:49 +01:00
lsrom
d7a47b0a3e
Add refresh (#59)
* 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>
2021-11-14 18:44:33 +01:00
Jarne Demeulemeester
98cb038c24
Server setup improvements (#67)
* 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
2021-11-14 18:20:19 +01:00
lsrom
f711d21f6a
Fix add server strings (#62)
* 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>
2021-10-31 16:09:39 +01:00
lsrom
8c90031165
Add customizable device name (#61)
* 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>
2021-10-31 11:43:02 +01:00
lsrom
07a9e2a853
Add basic tv support (#58)
* 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>
2021-10-30 19:46:51 +02:00
Jcuhfehl
532e9adac1
Add offline playback (#51)
* 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>
2021-10-29 21:11:01 +02:00
lsrom
308d97068f
Refactor playback code (#55)
* 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>
2021-10-26 18:11:22 +02:00
lsrom
62d09b3566
Add person detail screen (#47)
* Add person detail screen

Displays actor/actresses portrait and text info + list of movies/show this person starred in. Text info is max 5 lines with View More button if ellipsized. View More toggle is reset upon orientation change since in landscape mode ellipsize might not be necessary.

* Remove useless StarredInAdapter.kt

* Fix image view shape

* Improve UI

Not exactly how I would like it but will do for now

* Add error handling

Adds a lot of LiveData which may not be ideal, but is better than crashing due to connection errors.

Co-authored-by: jarnedemeulemeester <jarnedemeulemeester@gmail.com>
2021-10-24 17:45:59 +02:00
Jarne Demeulemeester
e9e849d9e4
Update dependencies and improve server discovery 2021-10-23 17:39:46 +02:00
jarnedemeulemeester
aa1ef5ca5b
Add sorting options to library (collection) 2021-10-23 11:29:22 +02:00
NIK679
11ff3b4e16
Add playback speed control to the player (#46)
* 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
2021-10-20 20:16:43 +02:00
jarnedemeulemeester
8984493bb0
Remove InitializingFragment 2021-10-10 22:00:02 +02:00