feat: add movie download support using Media3 DownloadService

Implement media downloading with foreground notification showing progress
percentage and speed. Uses Media3's DownloadManager + SimpleCache with
OkHttp datasource for authenticated Jellyfin downloads. Downloaded movies
are saved to the offline database and the player reads from cache
automatically via CacheDataSource.
This commit is contained in:
2026-02-17 20:18:23 +01:00
parent 9c83c3629b
commit be456d4d6c
14 changed files with 491 additions and 5 deletions

View File

@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<application
android:name=".PurefinApplication"
android:allowBackup="true"
@@ -28,6 +32,10 @@
android:screenOrientation="landscape"
android:exported="false"
android:theme="@style/Theme.Purefin" />
<service
android:name=".download.PurefinDownloadService"
android:exported="false"
android:foregroundServiceType="dataSync" />
</application>
</manifest>