mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
feat: read hls data source
This commit is contained in:
parent
263d9ebc5f
commit
92fd6b01e4
4 changed files with 11 additions and 9 deletions
|
|
@ -88,6 +88,7 @@ dependencies {
|
||||||
implementation 'androidx.media3:media3-common:1.3.1'
|
implementation 'androidx.media3:media3-common:1.3.1'
|
||||||
implementation 'androidx.media3:media3-exoplayer:1.3.1'
|
implementation 'androidx.media3:media3-exoplayer:1.3.1'
|
||||||
implementation 'androidx.media3:media3-ui:1.3.1'
|
implementation 'androidx.media3:media3-ui:1.3.1'
|
||||||
|
implementation 'androidx.media3:media3-exoplayer-hls:1.3.1'
|
||||||
tempoImplementation 'androidx.media3:media3-cast:1.3.1'
|
tempoImplementation 'androidx.media3:media3-cast:1.3.1'
|
||||||
|
|
||||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
|
annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
|
||||||
|
|
||||||
long currentSizeMb = DownloadUtil.getStreamingCacheSize(requireActivity()) / (1024 * 1024);
|
long currentSizeMb = DownloadUtil.getStreamingCacheSize(requireActivity()) / (1024 * 1024);
|
||||||
|
|
||||||
return getString(R.string.settings_summary_streaming_cache_size, entry, currentSizeMb);
|
return getString(R.string.settings_summary_streaming_cache_size, entry, String.valueOf(currentSizeMb));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ public final class DownloadUtil {
|
||||||
public static synchronized DataSource.Factory getDataSourceFactory(Context context) {
|
public static synchronized DataSource.Factory getDataSourceFactory(Context context) {
|
||||||
if (dataSourceFactory == null) {
|
if (dataSourceFactory == null) {
|
||||||
context = context.getApplicationContext();
|
context = context.getApplicationContext();
|
||||||
|
|
||||||
DefaultDataSource.Factory upstreamFactory = new DefaultDataSource.Factory(context, getHttpDataSourceFactory());
|
DefaultDataSource.Factory upstreamFactory = new DefaultDataSource.Factory(context, getHttpDataSourceFactory());
|
||||||
|
|
||||||
if (Preferences.getStreamingCacheSize() > 0) {
|
if (Preferences.getStreamingCacheSize() > 0) {
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,14 @@
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory app:title="@string/settings_title_data">
|
<PreferenceCategory app:title="@string/settings_title_data">
|
||||||
|
<ListPreference
|
||||||
|
app:defaultValue="256"
|
||||||
|
app:dialogTitle="@string/settings_streaming_cache_size"
|
||||||
|
app:entries="@array/streaming_cache_size_titles"
|
||||||
|
app:entryValues="@array/streaming_cache_size_values"
|
||||||
|
app:key="streaming_cache_size"
|
||||||
|
app:title="@string/settings_streaming_cache_size" />
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
app:defaultValue="500"
|
app:defaultValue="500"
|
||||||
app:dialogTitle="@string/settings_covers_cache"
|
app:dialogTitle="@string/settings_covers_cache"
|
||||||
|
|
@ -101,14 +109,6 @@
|
||||||
app:title="@string/settings_image_size"
|
app:title="@string/settings_image_size"
|
||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
|
||||||
<ListPreference
|
|
||||||
app:defaultValue="256"
|
|
||||||
app:dialogTitle="@string/settings_streaming_cache_size"
|
|
||||||
app:entries="@array/streaming_cache_size_titles"
|
|
||||||
app:entryValues="@array/streaming_cache_size_values"
|
|
||||||
app:key="streaming_cache_size"
|
|
||||||
app:title="@string/settings_streaming_cache_size" />
|
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:title="@string/settings_wifi_only_title"
|
android:title="@string/settings_wifi_only_title"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue