Skip to content
Snippets Groups Projects
Commit a6bbbabb authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Add a setting to disable the force SMB 1 option + fix custom libvlc option bug

(cherry picked from commit 8c88b12c)
parent a035451f
No related branches found
No related tags found
No related merge requests found
......@@ -772,5 +772,7 @@
<string name="timeout_normal">Normal</string>
<string name="timeout_long">Long</string>
<string name="video_hud_timeout">Video player controls hiding delay</string>
<string name="prefersmbv1">Prefer SMB 1</string>
<string name="prefersmbv1_summary">Uncheck this setting if you have some difficulties browsing your SMB server</string>
</resources>
......@@ -148,8 +148,7 @@ class PreferencesAdvanced : BasePreferenceFragment(), SharedPreferences.OnShared
activity?.let { Toast.makeText(it, R.string.network_caching_popup, Toast.LENGTH_SHORT).show() }
}
}
VLCInstance.restart()
(activity as? PreferencesActivity)?.restartMediaPlayer()
restartLibVLC()
}
"custom_libvlc_options" -> {
try {
......@@ -160,12 +159,16 @@ class PreferencesAdvanced : BasePreferenceFragment(), SharedPreferences.OnShared
} finally {
(activity as? PreferencesActivity)?.restartMediaPlayer()
}
restartLibVLC()
}
// No break because need VLCInstance.restart();
"opengl", "chroma_format", "deblocking", "enable_frame_skip", "enable_time_stretching_audio", "enable_verbose_mode" -> {
VLCInstance.restart()
(activity as? PreferencesActivity)?.restartMediaPlayer()
"opengl", "chroma_format", "deblocking", "enable_frame_skip", "enable_time_stretching_audio", "enable_verbose_mode", "prefer_smbv1" -> {
restartLibVLC()
}
}
}
fun restartLibVLC() {
VLCInstance.restart()
(activity as? PreferencesActivity)?.restartMediaPlayer()
}
}
......@@ -11,6 +11,13 @@
android:summary="@string/network_caching_summary"
android:title="@string/network_caching"/>
<CheckBoxPreference
app:singleLineTitle="false"
android:defaultValue="true"
android:key="prefer_smbv1"
android:summary="@string/prefersmbv1_summary"
android:title="@string/prefersmbv1"/>
<Preference
android:enabled="true"
android:key="dump_media_db"
......
......@@ -150,8 +150,7 @@ class PreferencesAdvanced : BasePreferenceFragment(), SharedPreferences.OnShared
UiTools.snacker(requireView(), R.string.network_caching_popup)
}
}
VLCInstance.restart()
(activity as? PreferencesActivity)?.restartMediaPlayer()
restartLibVLC()
}
// No break because need VLCInstance.restart();
"custom_libvlc_options" -> {
......@@ -163,12 +162,16 @@ class PreferencesAdvanced : BasePreferenceFragment(), SharedPreferences.OnShared
} finally {
(activity as? PreferencesActivity)?.restartMediaPlayer()
}
restartLibVLC()
}
"opengl", "chroma_format", "deblocking", "enable_frame_skip", "enable_time_stretching_audio", "enable_verbose_mode" -> {
"opengl", "chroma_format", "deblocking", "enable_frame_skip", "enable_time_stretching_audio", "enable_verbose_mode", "prefer_smbv1" -> {
VLCInstance.restart()
(activity as? PreferencesActivity)?.restartMediaPlayer()
}
}
}
fun restartLibVLC() {
VLCInstance.restart()
(activity as? PreferencesActivity)?.restartMediaPlayer()
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment