Commit graph

25 commits

Author SHA1 Message Date
Natanel Shitrit
8b747bf037
refactor: remove cleanUpOldDownloads (#529)
* Remove `cleanUpOldDownloads`

* refactor: remove `downloadsMigrated` preference

---------

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-10-28 12:38:35 +02:00
jarnedemeulemeester
e32b4eec7d
refactor: clean up 2023-10-23 13:24:26 +02:00
jarnedemeulemeester
e210691705
refactor: move compileSdk, buildTools, minSdk, targetSdk and java to buildSrc Versions 2023-10-23 13:00:24 +02:00
Jarne Demeulemeester
16dd40d489
build: move app and ktlint version to buildSrc Versions 2023-10-15 15:43:55 +02:00
Cd16d
d28e80d68e
feat: picture-in-picture (#277)
* add pip

* fixed OnResume() OnStop()
add picture in picture button
add pip settings

* fixed sourceRectHint
add aspectRatio

* fix import

* improve hide playerControls

* add onNewIntent()

* Home button/gesture settings

* add summary

* add GESTURE_EXCLUSION_AREA_SIDE

* remove if else in sourceRectHint
fix onStop() behavior

* fix behavior when using pip button, now go home

* test

* fix onStop()

* fix: mpv aspect ratio

* fix when in PiP mode and starting new playback

* refactor: pip implementation

Remove option to disable pip button, always show the button when pip is supported
Remove the option to completely disable pip
Format using ktlint

* fix when in pip mode and play a new video

* fix recent app behavior

* lint

* Some adjustments

* fix: Aspect ratio is too extreme

* fix: Activity recreation

* fix merge issues

* fix merge issues

* ktlintFormat

* Add Picture in Picture

* fix

* fix sourceRectHint, updateZoomMode before entering pip

* lint

* fix: disable pip when player is locked

* lint

* lint

* fix: sourceRectHint

* fix: replace media items in mpv

* fix: don't show skip intro button in pip

* chore: remove `android:resizeableActivity` from manifest since the default is already `true`

* refactor: remove option to force 16:9 aspect ratio

* refactor: update strings

---------

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-08-14 22:47:42 +02:00
Jarne Demeulemeester
0717103895
build: up min sdk to 28 (#456)
* build: bump min sdk to 28

* refactor: remove unnecessary checks

* refactor: remove unused import
2023-07-30 16:08:36 +02:00
Jarne Demeulemeester
75ea33fd33
feat: target sdk 34 (#405) 2023-07-30 14:50:58 +02:00
renovate[bot]
80a86e2dfc
chore(deps): update dependency org.jlleitschuh.gradle.ktlint to v11.5.0 (#426)
* chore(deps): update dependency org.jlleitschuh.gradle.ktlint to v11.5.0

* feat: bump to ktlint 0.50.0

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-07-08 00:36:23 +02:00
Jarne Demeulemeester
b426a920c3
lint: run ktlintFormat 2023-06-19 23:44:42 +02:00
renovate[bot]
07efae6f4c
chore(deps): update dependency org.jlleitschuh.gradle.ktlint to v11.4.0 (#293)
* chore(deps): update dependency org.jlleitschuh.gradle.ktlint to v11.4.0

* fix: use .editorconfig

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jarnedemeulemeester <jarnedemeulemeester@gmail.com>
2023-06-19 23:16:02 +02:00
Jarne Demeulemeester
3f8f657573
feat: always show extended episode title
Remove the option to display extended title
2023-05-22 00:14:33 +02:00
Jarne Demeulemeester
fd33d52bba
feat: add product flavors libre and huawei
Huawei requires a different app icon. They don't like the Android Robot :(
2023-05-14 18:32:46 +02:00
Jarne Demeulemeester
00c84fa9d5
Items and downloads rework (#329)
* refactor WIP: stop using `BaseItemDto` but use custom items specific to Findroid

This will make it easier to support downloaded items

* refactor: split `MediaInfoFragment` into `MovieFragment` and `ShowFragment`

* feat: add download icons to items

* feat WIP: download movies

* feat: download movie and play local file

* fix: remove `VideoVersionDialogFragment` from `ShowFragment`

* feat: select which version you want to download

* feat: delete downloaded movie

* feat: download progress indicator

* refactor: rename JellyfinItems to FindroidItems

* feat: offline mode (movies only)

* feat: offline mode card

* feat: download external files

* feat: toggle played on downloads

* feat: convert intros to `FindroidIntro`

* refactor: add itemId and sourceId to external downloaded subtitle filenames

* refactor: simplify `onMediaItemTransition`

* refactor: clean up some player item logic

* feat: download trickPlay data

* refactor: downloading of item to only require the item and a source id

* fix: external subtitle title

* feat: add `DownloadsFragment`

* feat: download episodes

* fix: cascade deletion if last item

* feat: download intro timestamps

* feat WIP: add storage activity

* feat: user data in separate table

* feat: add buttons to season fragment

* fix: improve responsiveness of the watched and favorite buttons

* fix: move `ic_database.xml` to main

* perf: optimize home fragment by limiting the number of items

* fix: database improvements

- use compound primary key for FindroidUserDataDto instead of id
- set played to false when playback percentage is below 90%
- capitalize SQL keywords
- update favorite in userdata
- set primary key of TrickPlayManifestDto to itemId
- prepare to sync data back to server

* feat: sync playback progress

This includes playback position, played and favorite

* fix: use non-transitive r classes

* lint: ktlint fix

* refactor: centralize item buttons in `item_actions.xml`

* feat: show intermediate progress when progress is less than 5

Also remove delete button from item_actions.xml

* feat: remove intros

* feat: check available storage space before downloading

* fix: trailer button

* refactor: make indexNumberEnd nullable

* feat: add offline mode toggle in settings

* fix: download over mobile data and roaming

* feat: immediately show spinner when tapping download

* revert: season fragment buttons

* feat: snackbar in downloads fragment

This snackbar is displayed when there is no connection to the server but the app is not in Offline Mode (Offline Mode is required to play content when the server is unavailable)

* refactor: make onReceive arguments non nullable

* fix: handle download finished / failed when BroadcastReceiver does not work

* fix: download multiple episodes

* feat: download to external storage (SD card)

* fix: reset download button when dialog is dismissed

* feat(offline): show "continue watching" episodes on home

* fix: watch progress bar on episode item in season

* feat(offline): next up items

* lint: fix some linting issues

* lint: fix some linting issues

* lint: fix some linting issues

* feat: remove StorageActivity

StorageActivity is not ready yet and out of scope for this PR

* fix: collection types that are not known crash the media fragment

* fix: downloading trick play data

* fix: sort downloaded items

* fix: navigate back if item is deleted instead of showing error

Navigate back based on NullPointerException in loadData method of viewmodels. This may not be the best approach but it works well enough.

Navigating back from BottomSheetFragment does not trigger onResume of previous fragment which in turn does not refresh its contents.

* fix: play from local storage instead of server when downloaded

* fix: missing items

* fix: `SyncWorker` using the app JellyfinApi instance instead of it's own

* fix: only show downloaded items when navigating from `DownloadsFragment`

* fix: make chips horizontal scrollable

* feat: migrate database (retain) and downloads (wipe)

Also add indexes on seriesId and seasonId

* fix: remove temp testing in downloadsMigrated

* lint: fix some linting issues

* fix: add error handling to downloading item

* feat: add "Preparing download" dialog to make sure the user waits for the download to start

* refactor: first show dialog then start downloading

* fix: add error handling to user configuration in `PlayerViewModel`

* feat: allow downloads to be cancelled

* fix: "View details" is cut off when text is too long

* lint: fix indent
2023-05-07 16:05:40 +02:00
renovate[bot]
2e6d069136
chore(deps): update dependency gradle to v8.1 (#332)
* Update dependency gradle to v8.1

* fix: remove @Suppress("DSL_SCOPE_VIOLATION") from build.gradle files

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-04-15 01:01:41 +02:00
renovate[bot]
22542614cd
chore(deps): update android-plugin to v8 (major) (#333)
* Update android-plugin to v8

* ci: upgrade to java 17

* fix: transitive R classes and buildconfig

* lint: fix ktlint issues

* lint: fix ktlint issues

* lint: fix ktlint issues

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jarnedemeulemeester <jarnedemeulemeester@gmail.com>
2023-04-15 00:43:42 +02:00
Faywyrr
01d8c11a2c
feat: scrubbing preview (#295)
* Scrubbing Preview

Add Jellyscrub plugin support

* Fix syntax

* Some adjustments

Rounded corners
Fix switch

* refactor: switch to `StateFlow`

* refactor: remove `FrameLayout`

* refactor: move trick play retrieval to `onMediaItemTransition`

Only load trick play data for current item
Make it async

---------

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-02-21 19:46:00 +01:00
renovate[bot]
86abe204f9
Update dependency gradle to v8 (#289)
* Update dependency gradle to v8

* fix: add compatibility with AGP 7.4 and remove some kotlin jvmTarget

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-02-13 21:58:05 +01:00
Anil Kumar Beesetti
e32a390d1a
fix: Implementation of Mandatory System Gesture Insets to Avoid Conflicts with System Gestures (#286)
* fix: gesture conflict in seek gesture

* fix: gesture conflict in volume and brightness gestures

* refactor: move to separate method and add implementation for previous Android versions

* lint: run ktlintFormat

---------

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-02-13 21:23:12 +01:00
Xavier Xiong
2049a857a3
feat: AMOLED dark theme (#282)
* Add AMOLED dark theme

* Minor Fix

* Add compatibility with dynamic colors

* remove onused switch logic

Co-authored-by: Yash Garg <ben10.yashgarg@gmail.com>

* Remove unnecessary statements

* refactor: rename unused variable to `_`

---------

Co-authored-by: Yash Garg <ben10.yashgarg@gmail.com>
Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-02-11 15:03:48 +01:00
Jarne Demeulemeester
3c2b751df2
lint: fix errors 2023-02-11 12:09:51 +01:00
Yash Garg
a6570d8a02
feat(media): add detailed metadata for file on MediaInfoFragment (#246)
* feat: add video file metadata on `MediaInfoFragment`

* feat(metadata): add chips within a chipgroup to showcase major parameters

Set a "temp" text as default for chips since without it, the style resets when text is changed through code
(kind of a hacky fix)

* feat(parser): implement data model for VideoMetadata and parse function

* feat(metadata): show dolby/dts audio codecs and hide SDR display profile

* feat(dolby): add a dolby logo after the rating and per-theme color

* feat(settings): add a preference switch for showing detailed A/V & Subs info

* feat: add dolby logo for video and audio profile inside chip

* feat: handle different audio profiles and change raw names

* feat(audio): add atmos text with the audio codec itself

* feat: only parse metadata when item is a movie

Also correct spacing when there are no chips

* fix(metadata): check for DoVi title since codec shows as HDR10

* fixup!: parsing of audio codecs and display name

---------

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-02-07 22:24:16 +01:00
Jarne Demeulemeester
2bb6cb9b14
feat(settings): add option to toggle seek gesture (#269)
* feat(settings): add option to toggle seek gesture

* Simplify the seek setting summary

* Fix typo in summary
2023-02-04 01:13:58 +01:00
js6pak
31fd1e3fdc
Add intro skipper support (#219)
* Add intro skipper support

* Fix checking for 404

* Add back missing Intro class and dependencies due to rebase

* Add preference

* Clean up visibility logic

* Update skip intro button design

* Add proguard file to keep Serializable classes

* Move introCheck to a separate Runnable and fix Runnables are never cleaned up

* Simplify check before starting runnable

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-01-15 15:20:56 +01:00
renovate[bot]
e0f07a3a96
Update android-plugin to v7.4.0 (#233)
* Update android-plugin to v7.4.0

* Set Java version to 11

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-01-14 20:21:37 +01:00
Jarne Demeulemeester
76121925d7
Modularize the codebase (#230)
* Split app into core and app:phone

* Use global versionCode and versionName

* Clean up gradle dependencies

* Use string formatting inside getString function

* Move proguard file to app:phone

* Move app_navigation and BasePlayerActivity to app:phone

* Add buildTypes to core gradle and remove buildFeatures

* Add suffix core to core namespace

* Split code into 4 more modules: data, preferences, player:core and player:video

* Clean up some gradle files

* Clean up data gradle

* Remove duplicate Constants.kt

* Use AppPreferences in more places

* Split off strings

* Remove unused animations

* Make about_libraries strings non-translatable

* Move mpv assets to player:video module

* Make AppPreferences a Singleton
2023-01-13 23:51:20 +01:00