forked from recloudstream/cloudstream
added setting for skip op and changed key for player seek amount
This commit is contained in:
parent
60bcbf0060
commit
8fa00f4ca9
3 changed files with 112 additions and 94 deletions
|
@ -187,6 +187,7 @@ class GeneratorPlayer : FullScreenPlayer() {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sameEpisode)
|
if (!sameEpisode)
|
||||||
player.addTimeStamps(listOf()) // clear stamps
|
player.addTimeStamps(listOf()) // clear stamps
|
||||||
}
|
}
|
||||||
|
@ -874,7 +875,15 @@ class GeneratorPlayer : FullScreenPlayer() {
|
||||||
if (duration <= 0L) return // idk how you achieved this, but div by zero crash
|
if (duration <= 0L) return // idk how you achieved this, but div by zero crash
|
||||||
if (!hasRequestedStamps) {
|
if (!hasRequestedStamps) {
|
||||||
hasRequestedStamps = true
|
hasRequestedStamps = true
|
||||||
viewModel.loadStamps(duration)
|
val fetchStamps = context?.let { ctx ->
|
||||||
|
val settingsManager = PreferenceManager.getDefaultSharedPreferences(ctx)
|
||||||
|
settingsManager.getBoolean(
|
||||||
|
ctx.getString(R.string.enable_skip_op_from_database),
|
||||||
|
true
|
||||||
|
)
|
||||||
|
} ?: true
|
||||||
|
if (fetchStamps)
|
||||||
|
viewModel.loadStamps(duration)
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.getId()?.let {
|
viewModel.getId()?.let {
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<string name="pip_enabled_key" translatable="false">pip_enabled_key</string>
|
<string name="pip_enabled_key" translatable="false">pip_enabled_key</string>
|
||||||
<string name="double_tap_enabled_key" translatable="false">double_tap_enabled_key</string>
|
<string name="double_tap_enabled_key" translatable="false">double_tap_enabled_key</string>
|
||||||
<string name="double_tap_pause_enabled_key" translatable="false">double_tap_pause_enabled_key</string>
|
<string name="double_tap_pause_enabled_key" translatable="false">double_tap_pause_enabled_key</string>
|
||||||
<string name="double_tap_seek_time_key" translatable="false">double_tap_seek_time_key</string>
|
<string name="double_tap_seek_time_key" translatable="false">double_tap_seek_time_key2</string>
|
||||||
<string name="swipe_vertical_enabled_key" translatable="false">swipe_vertical_enabled_key</string>
|
<string name="swipe_vertical_enabled_key" translatable="false">swipe_vertical_enabled_key</string>
|
||||||
<string name="autoplay_next_key" translatable="false">autoplay_next_key</string>
|
<string name="autoplay_next_key" translatable="false">autoplay_next_key</string>
|
||||||
<string name="display_sub_key" translatable="false">display_sub_key</string>
|
<string name="display_sub_key" translatable="false">display_sub_key</string>
|
||||||
|
@ -57,6 +57,7 @@
|
||||||
<string name="filter_sub_lang_key" translatable="false">filter_sub_lang_key</string>
|
<string name="filter_sub_lang_key" translatable="false">filter_sub_lang_key</string>
|
||||||
<string name="pref_filter_search_quality_key" translatable="false">pref_filter_search_quality_key</string>
|
<string name="pref_filter_search_quality_key" translatable="false">pref_filter_search_quality_key</string>
|
||||||
<string name="enable_nsfw_on_providers_key" translatable="false">enable_nsfw_on_providers_key</string>
|
<string name="enable_nsfw_on_providers_key" translatable="false">enable_nsfw_on_providers_key</string>
|
||||||
|
<string name="enable_skip_op_from_database" translatable="false">enable_skip_op_from_database</string>
|
||||||
|
|
||||||
<!-- FORMAT MIGHT TRANSLATE, WILL CAUSE CRASH IF APPLIED WRONG -->
|
<!-- FORMAT MIGHT TRANSLATE, WILL CAUSE CRASH IF APPLIED WRONG -->
|
||||||
<string name="extra_info_format" formatted="true" translatable="false">%d %s | %s</string>
|
<string name="extra_info_format" formatted="true" translatable="false">%d %s | %s</string>
|
||||||
|
@ -650,4 +651,6 @@
|
||||||
|
|
||||||
<string name="clear_history">Clear history</string>
|
<string name="clear_history">Clear history</string>
|
||||||
<string name="history">History</string>
|
<string name="history">History</string>
|
||||||
|
<string name="enable_skip_op_from_database_des">Show skip popups for opening/ending</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,126 +1,132 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/subtitle_settings_key"
|
android:icon="@drawable/ic_outline_subtitles_24"
|
||||||
android:title="@string/player_subtitles_settings"
|
android:key="@string/subtitle_settings_key"
|
||||||
android:icon="@drawable/ic_outline_subtitles_24"
|
android:title="@string/player_subtitles_settings"
|
||||||
app:summary="@string/player_subtitles_settings_des" />
|
app:summary="@string/player_subtitles_settings_des" />
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/subtitle_settings_chromecast_key"
|
android:icon="@drawable/ic_outline_subtitles_24"
|
||||||
android:title="@string/chromecast_subtitles_settings"
|
android:key="@string/subtitle_settings_chromecast_key"
|
||||||
android:icon="@drawable/ic_outline_subtitles_24"
|
android:title="@string/chromecast_subtitles_settings"
|
||||||
app:summary="@string/chromecast_subtitles_settings_des" />
|
app:summary="@string/chromecast_subtitles_settings_des" />
|
||||||
|
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/quality_pref_key"
|
android:icon="@drawable/ic_baseline_hd_24"
|
||||||
android:title="@string/watch_quality_pref"
|
android:key="@string/quality_pref_key"
|
||||||
android:icon="@drawable/ic_baseline_hd_24" />
|
android:title="@string/watch_quality_pref" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/player_pref_key"
|
android:icon="@drawable/netflix_play"
|
||||||
android:title="@string/player_pref"
|
android:key="@string/player_pref_key"
|
||||||
android:icon="@drawable/netflix_play" />
|
android:title="@string/player_pref" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/prefer_limit_title_key"
|
android:icon="@drawable/ic_baseline_text_format_24"
|
||||||
android:title="@string/limit_title"
|
android:key="@string/prefer_limit_title_key"
|
||||||
android:icon="@drawable/ic_baseline_text_format_24" />
|
android:title="@string/limit_title" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/prefer_limit_title_rez_key"
|
android:icon="@drawable/ic_baseline_text_format_24"
|
||||||
android:title="@string/limit_title_rez"
|
android:key="@string/prefer_limit_title_rez_key"
|
||||||
android:icon="@drawable/ic_baseline_text_format_24" />
|
android:title="@string/limit_title_rez" />
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:icon="@drawable/ic_baseline_picture_in_picture_alt_24"
|
android:icon="@drawable/ic_baseline_picture_in_picture_alt_24"
|
||||||
app:key="@string/pip_enabled_key"
|
android:summary="@string/picture_in_picture_des"
|
||||||
android:title="@string/picture_in_picture"
|
android:title="@string/picture_in_picture"
|
||||||
android:summary="@string/picture_in_picture_des"
|
app:defaultValue="true"
|
||||||
app:defaultValue="true" />
|
app:key="@string/pip_enabled_key" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:icon="@drawable/ic_baseline_aspect_ratio_24"
|
android:icon="@drawable/ic_baseline_aspect_ratio_24"
|
||||||
app:key="@string/player_resize_enabled_key"
|
android:summary="@string/player_size_settings_des"
|
||||||
android:title="@string/player_size_settings"
|
android:title="@string/player_size_settings"
|
||||||
android:summary="@string/player_size_settings_des"
|
app:defaultValue="true"
|
||||||
app:defaultValue="true" />
|
app:key="@string/player_resize_enabled_key" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:icon="@drawable/ic_baseline_speed_24"
|
android:icon="@drawable/ic_baseline_speed_24"
|
||||||
app:key="@string/playback_speed_enabled_key"
|
android:summary="@string/eigengraumode_settings_des"
|
||||||
android:title="@string/eigengraumode_settings"
|
android:title="@string/eigengraumode_settings"
|
||||||
android:summary="@string/eigengraumode_settings_des"
|
app:defaultValue="false"
|
||||||
app:defaultValue="false" />
|
app:key="@string/playback_speed_enabled_key" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:icon="@drawable/ic_baseline_ondemand_video_24"
|
android:icon="@drawable/ic_baseline_ondemand_video_24"
|
||||||
app:key="@string/swipe_enabled_key"
|
android:summary="@string/swipe_to_seek_settings_des"
|
||||||
android:title="@string/swipe_to_seek_settings"
|
android:title="@string/swipe_to_seek_settings"
|
||||||
android:summary="@string/swipe_to_seek_settings_des"
|
app:defaultValue="true"
|
||||||
app:defaultValue="true" />
|
app:key="@string/swipe_enabled_key" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:icon="@drawable/ic_baseline_ondemand_video_24"
|
android:icon="@drawable/ic_baseline_ondemand_video_24"
|
||||||
app:key="@string/swipe_vertical_enabled_key"
|
android:summary="@string/swipe_to_change_settings_des"
|
||||||
android:title="@string/swipe_to_change_settings"
|
android:title="@string/swipe_to_change_settings"
|
||||||
android:summary="@string/swipe_to_change_settings_des"
|
app:defaultValue="true"
|
||||||
app:defaultValue="true" />
|
app:key="@string/swipe_vertical_enabled_key" />
|
||||||
<SwitchPreference
|
|
||||||
android:icon="@drawable/ic_baseline_skip_next_24"
|
|
||||||
app:key="@string/autoplay_next_key"
|
|
||||||
android:title="@string/autoplay_next_settings"
|
|
||||||
android:summary="@string/autoplay_next_settings_des"
|
|
||||||
app:defaultValue="true" />
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:icon="@drawable/ic_baseline_touch_app_24"
|
android:icon="@drawable/ic_baseline_skip_next_24"
|
||||||
app:key="@string/double_tap_enabled_key"
|
android:summary="@string/autoplay_next_settings_des"
|
||||||
android:title="@string/double_tap_to_seek_settings"
|
android:title="@string/autoplay_next_settings"
|
||||||
android:summary="@string/double_tap_to_seek_settings_des"
|
app:defaultValue="true"
|
||||||
app:defaultValue="false" />
|
app:key="@string/autoplay_next_key" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:icon="@drawable/netflix_pause"
|
android:icon="@drawable/ic_baseline_skip_next_24"
|
||||||
app:key="@string/double_tap_pause_enabled_key"
|
android:title="@string/video_skip_op"
|
||||||
android:title="@string/double_tap_to_pause_settings"
|
app:defaultValue="true"
|
||||||
android:summary="@string/double_tap_to_pause_settings_des"
|
android:summary="@string/enable_skip_op_from_database_des"
|
||||||
app:defaultValue="false" />
|
app:key="@string/enable_skip_op_from_database" />
|
||||||
|
<SwitchPreference
|
||||||
|
android:icon="@drawable/ic_baseline_touch_app_24"
|
||||||
|
android:summary="@string/double_tap_to_seek_settings_des"
|
||||||
|
android:title="@string/double_tap_to_seek_settings"
|
||||||
|
app:defaultValue="false"
|
||||||
|
app:key="@string/double_tap_enabled_key" />
|
||||||
|
<SwitchPreference
|
||||||
|
android:icon="@drawable/netflix_pause"
|
||||||
|
android:summary="@string/double_tap_to_pause_settings_des"
|
||||||
|
android:title="@string/double_tap_to_pause_settings"
|
||||||
|
app:defaultValue="false"
|
||||||
|
app:key="@string/double_tap_pause_enabled_key" />
|
||||||
|
|
||||||
<SeekBarPreference
|
<SeekBarPreference
|
||||||
app:icon="@drawable/go_forward_30"
|
android:defaultValue="10"
|
||||||
app:adjustable="true"
|
android:max="60"
|
||||||
android:defaultValue="10"
|
android:title="@string/double_tap_to_seek_amount_settings"
|
||||||
app:min="5"
|
app:adjustable="true"
|
||||||
app:seekBarIncrement="5"
|
app:defaultValue="10"
|
||||||
app:showSeekBarValue="true"
|
app:icon="@drawable/go_forward_30"
|
||||||
android:max="60"
|
app:key="@string/double_tap_seek_time_key"
|
||||||
app:key="@string/double_tap_seek_time_key"
|
app:min="5"
|
||||||
android:title="@string/double_tap_to_seek_amount_settings"
|
app:seekBarIncrement="5"
|
||||||
app:defaultValue="false" />
|
app:showSeekBarValue="true" />
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:icon="@drawable/baseline_sync_24"
|
android:icon="@drawable/baseline_sync_24"
|
||||||
app:key="@string/episode_sync_enabled_key"
|
android:summary="@string/episode_sync_settings_des"
|
||||||
android:title="@string/episode_sync_settings"
|
android:title="@string/episode_sync_settings"
|
||||||
android:summary="@string/episode_sync_settings_des"
|
app:defaultValue="true"
|
||||||
app:defaultValue="true" />
|
app:key="@string/episode_sync_enabled_key" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/video_buffer_disk_key"
|
android:icon="@drawable/ic_baseline_storage_24"
|
||||||
android:title="@string/video_buffer_disk_settings"
|
android:key="@string/video_buffer_disk_key"
|
||||||
android:summary="@string/video_disk_description"
|
android:summary="@string/video_disk_description"
|
||||||
android:icon="@drawable/ic_baseline_storage_24" />
|
android:title="@string/video_buffer_disk_settings" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/video_buffer_size_key"
|
android:icon="@drawable/ic_baseline_storage_24"
|
||||||
android:title="@string/video_buffer_size_settings"
|
android:key="@string/video_buffer_size_key"
|
||||||
android:summary="@string/video_ram_description"
|
android:summary="@string/video_ram_description"
|
||||||
android:icon="@drawable/ic_baseline_storage_24" />
|
android:title="@string/video_buffer_size_settings" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/video_buffer_length_key"
|
android:icon="@drawable/ic_baseline_storage_24"
|
||||||
android:title="@string/video_buffer_length_settings"
|
android:key="@string/video_buffer_length_key"
|
||||||
android:summary="@string/video_ram_description"
|
android:summary="@string/video_ram_description"
|
||||||
android:icon="@drawable/ic_baseline_storage_24" />
|
android:title="@string/video_buffer_length_settings" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="@string/video_buffer_clear_key"
|
android:icon="@drawable/ic_baseline_delete_outline_24"
|
||||||
android:title="@string/video_buffer_clear_settings"
|
android:key="@string/video_buffer_clear_key"
|
||||||
android:icon="@drawable/ic_baseline_delete_outline_24" />
|
android:title="@string/video_buffer_clear_settings" />
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
Loading…
Reference in a new issue