Commit Graph

148 Commits

Author SHA1 Message Date
Niels van Velzen
346c21c0b4 Migrate to AGP9 2026-01-17 13:27:28 +01:00
Niels van Velzen
184b966491 Add design tokens 2025-12-29 14:40:05 +01:00
Niels van Velzen
ffb74649e6 Add navigation support to settings 2025-12-02 16:25:56 +01:00
Niels van Velzen
05180de3b4 Enable Proguard 2025-11-04 15:35:09 +01:00
Niels van Velzen
ef53924ccd Remove libass library 2025-10-19 20:42:40 +02:00
Niels van Velzen
83f95c9c74 Update app build script for Gradle 9 compatibility 2025-07-31 22:53:25 +02:00
Niels van Velzen
d53c4bc810 New search design 2025-06-06 22:13:52 +02:00
Niels van Velzen
694ed15dde Add experimental ASS direct play using libass 2025-05-20 08:41:50 +02:00
Niels van Velzen
170d14a107 Use OkHttp for networking in media3 2025-04-02 21:48:52 +02:00
Niels van Velzen
1f55126008 Replace androidx.tv with own theme implementation 2025-03-16 19:54:03 +01:00
Niels van Velzen
e696f3f944 Remove aboutLibraries config (now default) 2025-02-16 21:32:57 +01:00
Niels van Velzen
bc6336c376 Remove org.jellyfin.apiclient dependency 2025-02-13 21:57:52 +01:00
Pascal Weidenhammer
51cedee9b3 Upgrade ConnectHelpAlertFragment to Jetpack Compose (#3596)
* Add AndroidX TV Material implementation

* Upgrade ConnectHelpAlertFragment to Jetpack Compose

* Add Jellyfin blue Material Theme

* Add Material Theme and remove back button from ConnectHelpAlert

There should be no onscreen back buttons, because the tv remote has a dedicated back button: https://developer.android.com/design/ui/tv/guides/foundations/navigation-on-tv#dont-display-a-back-button

* Add "Got it" button back to ConnectHelp

* Remove duplicate tv-material library inclusion

* Revert "Add Jellyfin blue Material Theme"

This reverts commit 1c16039208.

* Remove custom theme in ConnectHelp

* Hardcode colors in ConnectHelpAlert

* Refactor ConnectHelpAlertFragment

---------

Co-authored-by: Niels van Velzen <git@ndat.nl>
2024-09-10 12:59:51 +00:00
Niels van Velzen
2d451e51a0 Update targetSdk to 34 2024-07-25 19:16:30 +02:00
Niels van Velzen
b2939bfe38 Split "playback/exoplayer" Gradle module into two (#3781)
* Split media3-session to own Gradle module

* Rename playback.exoplayer to playback.media3-exoplayer

* Use submodule for media3
2024-07-22 07:52:31 +02:00
Christophe Beyls
352a3af46e Replace Kotlin Multiplatform BlurHash library with faster local implementation 2024-07-16 13:54:37 +02:00
Niels van Velzen
2b5f72eb0b Drop unused playback-ui module 2024-06-12 22:20:53 +02:00
Niels van Velzen
87c8ae525b Use Kotlin compose compiler 2024-06-11 13:32:35 +02:00
Niels van Velzen
c1b651d6c6 Remove LibVLC 2024-06-02 17:10:57 +02:00
Niels van Velzen
5ef7bbc573 Use androidx fragment-compose 2024-05-04 16:22:09 +02:00
Niels van Velzen
e6b990cd42 Remove leakcanary 2024-04-18 22:09:09 +02:00
Niels van Velzen
4e203323e5 Remove baseline workaround 2024-01-27 14:04:02 +01:00
Niels van Velzen
bd204fdf87 Replace ExoPlayer with androidx.media3 2023-12-24 18:36:20 +01:00
Niels van Velzen
4cdc555b6d Use Android 14 SDK (API 34) 2023-09-08 20:47:34 +02:00
Niels van Velzen
387baf93b6 Replace Glide with Coil 2023-07-11 21:21:38 +02:00
Niels van Velzen
a237c4205e Enable buildConfig for app module 2023-04-13 22:21:18 +02:00
Niels van Velzen
eada9ea21c Add workaround for non reproducible baseline profiles in AGP 2023-03-05 10:08:08 +01:00
Niels van Velzen
13796cdd02 Remove KenBurns dependency 2023-02-16 21:59:02 +01:00
Niels van Velzen
9ad1ff0cde Update build files 2022-12-29 09:55:34 +01:00
Niels van Velzen
8ac5606f06 Remove direct GSON dependency
We don't use it in the app anymore, it's still added indirectly because the old apiclient uses it.
2022-10-25 14:30:42 +02:00
Niels van Velzen
62c1e816b6 Add compose support 2022-10-22 10:13:45 +02:00
Niels van Velzen
9830c12fac Replace Kapt with KSP 2022-09-30 12:17:46 +02:00
Niels van Velzen
82177db96d Replace BlurHashDecoder with com.vanniktech.blurhash dependency 2022-09-17 16:28:25 +02:00
Niels van Velzen
d984792e2d Bump Android compile & target version to 33 (Android 13) 2022-09-10 14:07:02 +02:00
Niels van Velzen
fdb18aca8c Add empty playback modules for rewrite 2022-09-01 07:12:21 +02:00
Niels van Velzen
2b2569772c Bump Android compile and target SDK to 32 (Android 12L)
Required for the new appcompat version
2022-08-11 19:40:49 +02:00
Niels van Velzen
d61829e11a Remove generation timestamp from AboutLibraries data file 2022-08-05 08:17:03 +02:00
Niels van Velzen
0e9281388a Move preference code to new preference module 2022-04-13 09:40:06 +02:00
Niels van Velzen
808d055c9a Add markdown support for item and server overviews 2022-03-26 14:31:38 +01:00
Niels van Velzen
3501038aa9 Explicitly set namespace and application id in build file 2022-03-03 08:41:38 +01:00
Niels van Velzen
22c50d50f5 Rewrite all unit tests using kotest 2022-02-19 19:01:41 +01:00
Niels van Velzen
2cfd134a83 Remove unused koin-test dependencies 2022-02-19 19:01:41 +01:00
DavidFair
9e74f2dc7a Include Jellyfin Exoplayer FFmpeg dep (#1369)
* Include Jellyfin Exoplayer FFmpeg dep

Port the includes from the Android repo as-is into this repo to include
the dependency

Convert our initialisation to prefer the built in extensions. This
should avoid flaky device logic and matches the Android app choice too.

* Drop check for DCS / DCA on firestick gen 1

FFmpeg should handle the decoding on these devices for us natively, and
likely uses the same codepath as libVLC. This should help us stick with
the native player instead of VLC where possible

* Replace TvApp.getApplication with getting context from activity

This removes another deprecated usage of TvApp by the reviewer

* Add new codecs to list of supported profiles

Adds the new codecs to reflect the new capabilities available from our
FFmpeg extensions.

* Refactor duplicated audio codec list into method

Refactor the duplicated audio codecs. Whilst I can't think of a case
where a user might play say DTS / TrueHD audio files, I equally can't
think of a reason why not to support it.

This simplifies the code, whilst allowing us to still extend the list
with some Audio only codecs for audio direct-play

* Lowercase PCM formats

This matches the format found on the server and the Android mobile
implementation to be safe

* AudioDirectPlayProfile: Replace vaarg with Array<String>

This allows us to easily combine two arrays together without having to
create copies with spread operators.
Internally the copies still function the same as we have an interable
type we are applying joinToString(",") with

* Switch to using EXTENSION_RENDERER_MODE_ON

This will use the system core renderers first. To get the fallback
behaviour we simply needed to add `setEnabledDecoderFallback`. This
allows Exoplayer to try the first decoder, then silently fallback on
error to ffmpeg.

Functionally this matches the implementation goals in the Android Mobile where
they will manually fallback instead. Since we can't access / restart the
media queue easily in this repo.

* Code cleanup from PR review

Addresses various comments where we can improve the readability around
the various changes we've made

* Drop ExoPlayerProfileTests

Since it only check hardcoded values which rarely change are there

* Whitespace tidy up + manual reformatting

Some various tidy ups and manual reformatting as pointed out from the
PR. This helps reduce down the amount of empty whitespace in the file

* Formatting fixes

Various hand-fixes where the formatter hasn't quite got it right
2022-02-03 19:37:31 -08:00
Niels van Velzen
6e5919d35a Fix searchable.xml not supporting ${applicationId} 2022-01-30 17:50:40 +01:00
Niels van Velzen
ea080fed7a Upgrade Android Gradle Plugin to 7.1.0 2022-01-29 10:36:24 +01:00
Niels van Velzen
13b8ce2c5b Replace slf4j-android with slf4j-timber 2021-12-30 19:16:10 +01:00
DavidFair
926a2b7a4b Add Mockk and one test to exercise the new dep (#1312)
* Add Mockk to test framework deps

Add Mockk as this is aware of Kotlin inheritence unlike Mockito.
This primarily shows up where classes are not marked open. We can
either:
- Mark all unit tested classes open (least viable option)
- Add boilerplate to Mockito each time we test a Kotlin class
- Add a mocking framework that is Kotlin aware.

In this case I've opted for the latter, since it also avoids us having
to look up the boilerplate for static mocks...etc.

* Stub out testing Android.utils.log

Slf4j will try to invoke IsLoggable, despite stubbing out everything
else, which is explicitly disabled within the Android SDK.

We could revert to hacks, such as using Android -> returnDefaultValue=true in the
testing options. But according to the docs this should be a last resort.

Instead we can simply stub out the logging to forward calls to println,
allowing us to mock / init anything that uses SLF4J implicitly.

* Add tests and null checks for DeviceUtils

This commit does two things to help testing going forwards:

- It adds a null check for Build.MODEL, typically found in unit tests.
Allowing us to simply avoid having to mock all the various capability
tests which were throwing NPEs in unit tests.

- Adds tests for the existing functionality. This requires Mockk to
easily overwrite static class methods. We also add a small shim method
to make mocking much easier too.

* Run CustomSeekProvider through automatic Java->Kotlin

Convert the file to Kotlin. This means all of our unit tests that use
Mockk will have the same syntax inside, making it much easier for future
developers to reason with.

* Convert Mockito to Mockk

Converts the single usage of Mockito to Mockk, so we can use the same
mocking framework throughout the codebase.

* Drop Mockito in favour of Mockk

Drops Mockito to use Mockk throughout the project.
This is because we have a mix between Java and Kotlin. The latter is
"harder" to mock as classes are not marked open by default.

This means Mockito requires boilerplate in comparison to Mockk.
Additionally, using a single framework lowers the burden on developers
to known multiple tools

* Run Android Studio formatter over code

Despite having format on save enabled, many lines were missed (probably
from the cherry-pick).
Run formatter over the code to address PR reviewer comments.

* Return string instead of null from getBuildModel

This removes a number of null checks from the implementation, and allows
us to mark the method as nonNull too.
2021-12-30 18:44:21 +01:00
David Fairbrother
2990ffad09 Add Koin unit testing deps implementation
This allows Koin to do DI during unit tests and allows us to establish
Junit rules which involve Koin
This is essential for testing some classes as the playback code, where
DI is used heavily
2021-12-25 12:17:24 +01:00
Niels van Velzen
a8564c53aa Target API 31 2021-12-20 09:33:42 +01:00
Niels van Velzen
ced03b82de Move Gradle plugins to plugin catalog (#1296)
* Move Gradle plugins to plugin catalog

* Fix linter config for playback module
2021-12-19 14:44:28 +01:00