mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 08:20:32 +05:30
Merge branch 'master' into icon
This commit is contained in:
commit
519149ce08
@ -46,7 +46,9 @@ class MainActivity : AppCompatActivity() {
|
||||
RetrofitInstance.url =
|
||||
sharedPreferences.getString("instance", "https://pipedapi.kavin.rocks/")!!
|
||||
SponsorBlockSettings.sponsorBlockEnabled =
|
||||
sharedPreferences.getBoolean("sponsorblock_enabled_key", false)
|
||||
sharedPreferences.getBoolean("sb_enabled_key", false)
|
||||
SponsorBlockSettings.sponsorNotificationsEnabled =
|
||||
sharedPreferences.getBoolean("sb_notifications_key", false)
|
||||
SponsorBlockSettings.introEnabled =
|
||||
sharedPreferences.getBoolean("intro_category_key", false)
|
||||
SponsorBlockSettings.selfPromoEnabled =
|
||||
|
@ -306,7 +306,6 @@ class PlayerFragment : Fragment() {
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
try {
|
||||
exoPlayer.stop()
|
||||
exoPlayer.release()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
@ -317,7 +316,7 @@ class PlayerFragment : Fragment() {
|
||||
|
||||
exoPlayerView.postDelayed(this::checkForSegments, 100)
|
||||
|
||||
if (segmentData.segments.isEmpty())
|
||||
if (!::segmentData.isInitialized || segmentData.segments.isEmpty())
|
||||
return
|
||||
|
||||
segmentData.segments.forEach { segment: Segment ->
|
||||
|
@ -111,4 +111,6 @@
|
||||
<string name="material_you">Material You</string>
|
||||
<string name="sponsorblock_notifications">Notifications</string>
|
||||
<string name="app_icon">App Icon</string>
|
||||
<string name="enabled">Enabled</string>
|
||||
<string name="disabled">Disabled</string>
|
||||
</resources>
|
@ -1,17 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory app:title="@string/sponsorblock">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="sb_enabled_key"
|
||||
app:title="@string/sponsorblock_state"/>
|
||||
app:title="@string/sponsorblock"
|
||||
android:summaryOff="@string/disabled"
|
||||
android:summaryOn="@string/enabled"/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="sb_notifications_key"
|
||||
app:title="@string/sponsorblock_notifications"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
app:title="@string/sponsorblock_notifications"
|
||||
android:summaryOff="@string/disabled"
|
||||
android:summaryOn="@string/enabled"/>
|
||||
|
||||
<PreferenceCategory app:title="@string/category_segments">
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user