Commit d989fa56 authored by Geoffrey Métais's avatar Geoffrey Métais

Add an option for subs auto loading

parent 71a587ef
......@@ -338,6 +338,7 @@
<string name="subtitles_color_green">Green</string>
<string name="subtitles_background_title">Subtitles Background</string>
<string name="subtitles_bold_title">Bold subtitles</string>
<string name="subtitles_autoload_title">Auto load subtitles</string>
<string name="audio_prefs_category">Audio</string>
<string name="lockscreen_cover_title">Media cover on Lockscreen</string>
......
......@@ -4,6 +4,10 @@
android:key="subtitles_category"
android:title="@string/subtitles_prefs_category">
<CheckBoxPreference
android:defaultValue="true"
android:key="subtitles_autoload"
android:title="@string/subtitles_autoload_title" />
<ListPreference
android:defaultValue="16"
android:entries="@array/subtitles_size_entries"
......
......@@ -197,10 +197,9 @@ public class VLCOptions {
}
} /* else automatic: use default options */
if (noVideo)
media.addOption(":no-video");
if (paused)
media.addOption(":start-paused");
if (noVideo) media.addOption(":no-video");
if (paused) media.addOption(":start-paused");
if (!PreferenceManager.getDefaultSharedPreferences(context).getBoolean("subtitles_autoload", true)) media.addOption(":sub-language=none");
}
private static MediaPlayer.Equalizer getEqualizerSetFromSettings(SharedPreferences pref) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment