Commit graph

34 commits

Author SHA1 Message Date
Jcuhfehl
45ccea57af
Improve downloads management (#179)
* Fix deleted downloads

This commit fixes downloads getting deleted after a few weeks by android's cleanup system. This is fixed by downloading the files under the .download extension and renaming them when the download is completed.

* Add retry download feature

* Add indicator when download is ongoing

* Refactor download code

* Disable button on retry and clean up

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2022-10-29 15:08:43 +02:00
Jarne Demeulemeester
e40543c0f7
Add series name to episode sheet with navigation (#173)
Also limit the episode name to 3 lines
2022-09-25 23:58:50 +02:00
Jarne Demeulemeester
8552f0c469
Refactor the lifecycle state (#135) 2022-07-25 12:57:09 +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
6d000882ea
Make extension functions setTintColor and setTintColorAttribute 2022-04-10 14:38:28 +02:00
Jarne Demeulemeester
d36ec1eb62
Fix played and favorite button changing color 2022-04-09 20:46:07 +02: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
1afeb54802
EpisodeBottomSheetFragment expanded by default (#76) 2022-02-12 16:19:24 +01:00
Jarne Demeulemeester
3a41ba6882
Add missing check for canDownload in episode bottom sheet
Fix #75
2022-01-22 10:38:44 +01:00
Jarne Demeulemeester
93d6eb9b17
Fix delete button sometimes not visible 2022-01-21 18:28:06 +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
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
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
jarnedemeulemeester
25ac5524d7
Rework how player items are created
Add support for intros and improve loading speed
2021-08-26 15:36:56 +02:00
jarnedemeulemeester
d53fbf3369
Handle empty mediaSources 2021-08-25 11:00:58 +02:00
jarnedemeulemeester
a067b6b13d
New error panel with details dialog 2021-08-22 18:47:25 +02:00
jarnedemeulemeester
f2ce030856
View detailed error message for playerItemsError 2021-08-22 11:47:25 +02:00
jarnedemeulemeester
d67e3fb39c
Add error handling to preparePlayerItems 2021-08-08 12:42:15 +02:00
jarnedemeulemeester
10e89a2df5
Load episodes mediasources when play button pressed in EpisodeBottomSheet 2021-08-06 15:15:01 +02:00
jarnedemeulemeester
d67f195789
Rework player to allow for playing multiple episodes in a row 2021-08-05 16:09:08 +02:00
jarnedemeulemeester
ea927793e3
Allow http connections + fix lifecycle warning 2021-08-02 18:14:41 +02:00
Jarne Demeulemeester
b3af3e5aeb
Improve community rating visually 2021-07-20 17:25:58 +02:00
Jarne Demeulemeester
dbc2582724
Mark item as played 2021-07-16 17:07:45 +02:00
Jarne Demeulemeester
6cf1f5cc49
Mark items as favorite 2021-07-16 14:45:35 +02:00
Jarne Demeulemeester
be8402fb37
Set starting playback position 2021-07-12 13:26:51 +02:00
Jarne Demeulemeester
5ee1cbf340
Play episodes 2021-07-11 17:41:36 +02:00
Jarne Demeulemeester
e79731f21b
First JellyfinRepository implementation 2021-07-06 14:24:53 +02:00
Jarne Demeulemeester
16bc87969d
Add more progress bars and check marks + general layout improvements 2021-07-06 12:30:19 +02:00
Jarne Demeulemeester
cb005e1cf6
Add more dependency injection 2021-07-06 11:39:35 +02:00
Jarne Demeulemeester
f460c25a92
Big cleanup and refactoring 2021-07-05 22:38:20 +02:00
Jarne Demeulemeester
5e6099de93
Change how ViewModels get created 2021-07-05 15:25:30 +02:00
Jarne Demeulemeester
a3cfe35c13
Add EpisodeBottomSheet
Work in progress
2021-07-03 14:01:54 +02:00