add preference for "Time respects playback speed"

This commit is contained in:
Cédric Cabessa 2019-03-03 18:28:43 +01:00
parent 7c4d4656f8
commit 743ec1927c
3 changed files with 12 additions and 0 deletions

View File

@ -71,6 +71,11 @@
android:key="prefPlaybackSpeedLauncher" android:key="prefPlaybackSpeedLauncher"
android:summary="@string/pref_playback_speed_sum" android:summary="@string/pref_playback_speed_sum"
android:title="@string/pref_playback_speed_title"/> android:title="@string/pref_playback_speed_title"/>
<SwitchPreference
android:defaultValue="false"
android:key="prefPlaybackTimeRespectsSpeed"
android:summary="@string/pref_playback_time_respects_speed_sum"
android:title="@string/pref_playback_time_respects_speed_title"/>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:title="@string/queue_label"> <PreferenceCategory android:title="@string/queue_label">

View File

@ -73,6 +73,7 @@ public class UserPreferences {
private static final String PREF_PAUSE_PLAYBACK_FOR_FOCUS_LOSS = "prefPauseForFocusLoss"; private static final String PREF_PAUSE_PLAYBACK_FOR_FOCUS_LOSS = "prefPauseForFocusLoss";
private static final String PREF_RESUME_AFTER_CALL = "prefResumeAfterCall"; private static final String PREF_RESUME_AFTER_CALL = "prefResumeAfterCall";
public static final String PREF_VIDEO_BEHAVIOR = "prefVideoBehavior"; public static final String PREF_VIDEO_BEHAVIOR = "prefVideoBehavior";
private static final String PREF_TIME_RESPECTS_SPEED = "prefPlaybackTimeRespectsSpeed";
// Network // Network
private static final String PREF_ENQUEUE_DOWNLOADED = "prefEnqueueDownloaded"; private static final String PREF_ENQUEUE_DOWNLOADED = "prefEnqueueDownloaded";
@ -871,4 +872,8 @@ public class UserPreferences {
.putString(PREF_BACK_BUTTON_GO_TO_PAGE, tag) .putString(PREF_BACK_BUTTON_GO_TO_PAGE, tag)
.apply(); .apply();
} }
public static boolean timeRespectsSpeed() {
return prefs.getBoolean(PREF_TIME_RESPECTS_SPEED, false);
}
} }

View File

@ -472,6 +472,8 @@
<string name="pref_gpodnet_notifications_sum">This setting does not apply to authentication errors.</string> <string name="pref_gpodnet_notifications_sum">This setting does not apply to authentication errors.</string>
<string name="pref_playback_speed_title">Playback Speeds</string> <string name="pref_playback_speed_title">Playback Speeds</string>
<string name="pref_playback_speed_sum">Customize the speeds available for variable speed audio playback</string> <string name="pref_playback_speed_sum">Customize the speeds available for variable speed audio playback</string>
<string name="pref_playback_time_respects_speed_title">Adjust media info to playback speed</string>
<string name="pref_playback_time_respects_speed_sum">Displayed position and duration are adapted to playback speed</string>
<string name="pref_fast_forward">Fast Forward Skip Time</string> <string name="pref_fast_forward">Fast Forward Skip Time</string>
<string name="pref_fast_forward_sum">Customize the number of seconds to jump forward when the fast forward button is clicked</string> <string name="pref_fast_forward_sum">Customize the number of seconds to jump forward when the fast forward button is clicked</string>
<string name="pref_rewind">Rewind Skip Time</string> <string name="pref_rewind">Rewind Skip Time</string>