diff --git a/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java b/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java
index b89ed891..719a7ebf 100644
--- a/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java
+++ b/app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java
@@ -1029,7 +1029,7 @@ public class StoryViewerFragment extends Fragment {
if (context == null) return;
player = new SimpleExoPlayer.Builder(context).build();
binding.playerView.setPlayer(player);
- player.setPlayWhenReady(settingsHelper.getBoolean(PreferenceKeys.AUTOPLAY_VIDEOS));
+ player.setPlayWhenReady(settingsHelper.getBoolean(PreferenceKeys.AUTOPLAY_VIDEOS_STORIES));
final Uri uri = Uri.parse(url);
final MediaItem mediaItem = MediaItem.fromUri(uri);
@@ -1130,7 +1130,7 @@ public class StoryViewerFragment extends Fragment {
if (context == null) return;
player = new SimpleExoPlayer.Builder(context).build();
binding.playerView.setPlayer(player);
- player.setPlayWhenReady(settingsHelper.getBoolean(PreferenceKeys.AUTOPLAY_VIDEOS));
+ player.setPlayWhenReady(settingsHelper.getBoolean(PreferenceKeys.AUTOPLAY_VIDEOS_STORIES));
final Uri uri = Uri.parse(url);
final MediaItem mediaItem = MediaItem.fromUri(uri);
diff --git a/app/src/main/java/awais/instagrabber/fragments/settings/PreferenceKeys.kt b/app/src/main/java/awais/instagrabber/fragments/settings/PreferenceKeys.kt
index 6b824217..a2a9649d 100644
--- a/app/src/main/java/awais/instagrabber/fragments/settings/PreferenceKeys.kt
+++ b/app/src/main/java/awais/instagrabber/fragments/settings/PreferenceKeys.kt
@@ -30,8 +30,7 @@ object PreferenceKeys {
const val TOGGLE_KEYWORD_FILTER = "toggle_keyword_filter"
const val DOWNLOAD_PREPEND_USER_NAME = "download_user_name"
const val PLAY_IN_BACKGROUND = "play_in_background"
- const val FOLDER_SAVE_TO = "saved_to"
- const val AUTOPLAY_VIDEOS = "autoplay_videos"
+ const val AUTOPLAY_VIDEOS_STORIES = "autoplay_videos"
const val MUTED_VIDEOS = "muted_videos"
const val SHOW_CAPTIONS = "show_captions"
const val CUSTOM_DATE_TIME_FORMAT_ENABLED = "data_time_custom_enabled"
diff --git a/app/src/main/java/awais/instagrabber/fragments/settings/StoriesPreferencesFragment.java b/app/src/main/java/awais/instagrabber/fragments/settings/StoriesPreferencesFragment.java
index e027389d..2983d216 100644
--- a/app/src/main/java/awais/instagrabber/fragments/settings/StoriesPreferencesFragment.java
+++ b/app/src/main/java/awais/instagrabber/fragments/settings/StoriesPreferencesFragment.java
@@ -18,6 +18,7 @@ public class StoriesPreferencesFragment extends BasePreferencesFragment {
screen.addPreference(getStorySortPreference(context));
screen.addPreference(getHideMutedReelsPreference(context));
screen.addPreference(getMarkStoriesSeenPreference(context));
+ screen.addPreference(getAutoPlayPreference(context));
}
private Preference getStorySortPreference(@NonNull final Context context) {
@@ -53,4 +54,12 @@ public class StoriesPreferencesFragment extends BasePreferencesFragment {
preference.setIconSpaceReserved(false);
return preference;
}
+
+ private Preference getAutoPlayPreference(@NonNull final Context context) {
+ final SwitchPreferenceCompat preference = new SwitchPreferenceCompat(context);
+ preference.setKey(PreferenceKeys.AUTOPLAY_VIDEOS_STORIES);
+ preference.setTitle(R.string.autoplay_stories_setting);
+ preference.setIconSpaceReserved(false);
+ return preference;
+ }
}
diff --git a/app/src/main/java/awais/instagrabber/utils/SettingsHelper.kt b/app/src/main/java/awais/instagrabber/utils/SettingsHelper.kt
index ef71a5fb..826710ab 100755
--- a/app/src/main/java/awais/instagrabber/utils/SettingsHelper.kt
+++ b/app/src/main/java/awais/instagrabber/utils/SettingsHelper.kt
@@ -7,7 +7,6 @@ import androidx.annotation.StringDef
import androidx.appcompat.app.AppCompatDelegate
import java.util.*
-import awais.instagrabber.utils.Constants
import awais.instagrabber.fragments.settings.PreferenceKeys
class SettingsHelper(context: Context) {
@@ -117,8 +116,7 @@ class SettingsHelper(context: Context) {
@StringDef(
PreferenceKeys.DOWNLOAD_USER_FOLDER,
PreferenceKeys.DOWNLOAD_PREPEND_USER_NAME,
- PreferenceKeys.FOLDER_SAVE_TO,
- PreferenceKeys.AUTOPLAY_VIDEOS,
+ PreferenceKeys.AUTOPLAY_VIDEOS_STORIES,
PreferenceKeys.MUTED_VIDEOS,
PreferenceKeys.SHOW_CAPTIONS,
PreferenceKeys.CUSTOM_DATE_TIME_FORMAT_ENABLED,
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 7e033dc3..88785de5 100755
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -32,6 +32,7 @@
Hide muted stories from feed
Mark DM as seen after viewing
Other members will know you viewed it
+ Autoplay video stories
Enable activity notifications
Feed stories sort
Error loading profile! Is the username valid? If so, you may be ratelimited.