SponsorBlock: Made string resource names consistent
Renamed "sponsorblock" to "sponsor_block" where applicable. Also cleaned up some related debug logging.
This commit is contained in:
parent
bf78cbb63e
commit
2da3dead0d
13 changed files with 187 additions and 190 deletions
|
@ -238,7 +238,7 @@ public abstract class BasePlayer implements
|
||||||
|
|
||||||
this.mPrefs = PreferenceManager.getDefaultSharedPreferences(App.getApp());
|
this.mPrefs = PreferenceManager.getDefaultSharedPreferences(App.getApp());
|
||||||
|
|
||||||
isBlockingSponsors = mPrefs.getBoolean(context.getString(R.string.sponsorblock_enable_key),
|
isBlockingSponsors = mPrefs.getBoolean(context.getString(R.string.sponsor_block_enable_key),
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -733,7 +733,7 @@ public abstract class BasePlayer implements
|
||||||
|
|
||||||
if (isBlockingSponsors
|
if (isBlockingSponsors
|
||||||
&& mPrefs.getBoolean(
|
&& mPrefs.getBoolean(
|
||||||
context.getString(R.string.sponsorblock_enable_key), false)) {
|
context.getString(R.string.sponsor_block_enable_key), false)) {
|
||||||
final VideoSegment segment = getSkippableSegment(currentProgress);
|
final VideoSegment segment = getSkippableSegment(currentProgress);
|
||||||
if (segment == null) {
|
if (segment == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -744,33 +744,33 @@ public abstract class BasePlayer implements
|
||||||
seekTo(skipTo);
|
seekTo(skipTo);
|
||||||
|
|
||||||
if (mPrefs.getBoolean(
|
if (mPrefs.getBoolean(
|
||||||
context.getString(R.string.sponsorblock_notifications_key), false)) {
|
context.getString(R.string.sponsor_block_notifications_key), false)) {
|
||||||
String toastText = "";
|
String toastText = "";
|
||||||
|
|
||||||
switch (segment.category) {
|
switch (segment.category) {
|
||||||
case "sponsor":
|
case "sponsor":
|
||||||
toastText = context
|
toastText = context
|
||||||
.getString(R.string.sponsorblock_skip_sponsor_message);
|
.getString(R.string.sponsor_block_skip_sponsor_message);
|
||||||
break;
|
break;
|
||||||
case "intro":
|
case "intro":
|
||||||
toastText = context
|
toastText = context
|
||||||
.getString(R.string.sponsorblock_skip_intro_message);
|
.getString(R.string.sponsor_block_skip_intro_message);
|
||||||
break;
|
break;
|
||||||
case "outro":
|
case "outro":
|
||||||
toastText = context
|
toastText = context
|
||||||
.getString(R.string.sponsorblock_skip_outro_message);
|
.getString(R.string.sponsor_block_skip_outro_message);
|
||||||
break;
|
break;
|
||||||
case "interaction":
|
case "interaction":
|
||||||
toastText = context
|
toastText = context
|
||||||
.getString(R.string.sponsorblock_skip_interaction_message);
|
.getString(R.string.sponsor_block_skip_interaction_message);
|
||||||
break;
|
break;
|
||||||
case "selfpromo":
|
case "selfpromo":
|
||||||
toastText = context
|
toastText = context
|
||||||
.getString(R.string.sponsorblock_skip_self_promo_message);
|
.getString(R.string.sponsor_block_skip_self_promo_message);
|
||||||
break;
|
break;
|
||||||
case "music_offtopic":
|
case "music_offtopic":
|
||||||
toastText = context
|
toastText = context
|
||||||
.getString(R.string.sponsorblock_skip_non_music_message);
|
.getString(R.string.sponsor_block_skip_non_music_message);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -778,7 +778,7 @@ public abstract class BasePlayer implements
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.d("SPONSOR_BLOCK", "Skipped sponsor: currentProgress = ["
|
Log.d("SPONSOR_BLOCK", "Skipped segment: currentProgress = ["
|
||||||
+ currentProgress + "], skipped to = [" + skipTo + "]");
|
+ currentProgress + "], skipped to = [" + skipTo + "]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1167,44 +1167,44 @@ public abstract class BasePlayer implements
|
||||||
|
|
||||||
if (info.getUrl().startsWith("https://www.youtube.com")) {
|
if (info.getUrl().startsWith("https://www.youtube.com")) {
|
||||||
final String apiUrl = mPrefs
|
final String apiUrl = mPrefs
|
||||||
.getString(context.getString(R.string.sponsorblock_api_url_key), null);
|
.getString(context.getString(R.string.sponsor_block_api_url_key), null);
|
||||||
final boolean isSponsorBlockEnabled = mPrefs
|
final boolean isSponsorBlockEnabled = mPrefs
|
||||||
.getBoolean(context.getString(R.string.sponsorblock_enable_key), false);
|
.getBoolean(context.getString(R.string.sponsor_block_enable_key), false);
|
||||||
|
|
||||||
if (apiUrl != null && !apiUrl.isEmpty() && isSponsorBlockEnabled) {
|
if (apiUrl != null && !apiUrl.isEmpty() && isSponsorBlockEnabled) {
|
||||||
try {
|
try {
|
||||||
final boolean includeSponsorCategory =
|
final boolean includeSponsorCategory =
|
||||||
mPrefs.getBoolean(
|
mPrefs.getBoolean(
|
||||||
context.getString(
|
context.getString(
|
||||||
R.string.sponsorblock_category_sponsor_key),
|
R.string.sponsor_block_category_sponsor_key),
|
||||||
false);
|
false);
|
||||||
|
|
||||||
final boolean includeIntroCategory =
|
final boolean includeIntroCategory =
|
||||||
mPrefs.getBoolean(
|
mPrefs.getBoolean(
|
||||||
context.getString(
|
context.getString(
|
||||||
R.string.sponsorblock_category_intro_key),
|
R.string.sponsor_block_category_intro_key),
|
||||||
false);
|
false);
|
||||||
|
|
||||||
final boolean includeOutroCategory =
|
final boolean includeOutroCategory =
|
||||||
mPrefs.getBoolean(
|
mPrefs.getBoolean(
|
||||||
context.getString(
|
context.getString(
|
||||||
R.string.sponsorblock_category_outro_key),
|
R.string.sponsor_block_category_outro_key),
|
||||||
false);
|
false);
|
||||||
|
|
||||||
final boolean includeInteractionCategory =
|
final boolean includeInteractionCategory =
|
||||||
mPrefs.getBoolean(
|
mPrefs.getBoolean(
|
||||||
context.getString(
|
context.getString(
|
||||||
R.string.sponsorblock_category_interaction_key),
|
R.string.sponsor_block_category_interaction_key),
|
||||||
false);
|
false);
|
||||||
final boolean includeSelfPromoCategory =
|
final boolean includeSelfPromoCategory =
|
||||||
mPrefs.getBoolean(
|
mPrefs.getBoolean(
|
||||||
context.getString(
|
context.getString(
|
||||||
R.string.sponsorblock_category_self_promo_key),
|
R.string.sponsor_block_category_self_promo_key),
|
||||||
false);
|
false);
|
||||||
final boolean includeMusicCategory =
|
final boolean includeMusicCategory =
|
||||||
mPrefs.getBoolean(
|
mPrefs.getBoolean(
|
||||||
context.getString(
|
context.getString(
|
||||||
R.string.sponsorblock_category_non_music_key),
|
R.string.sponsor_block_category_non_music_key),
|
||||||
false);
|
false);
|
||||||
|
|
||||||
videoSegments = new SponsorBlockApiTask(apiUrl)
|
videoSegments = new SponsorBlockApiTask(apiUrl)
|
||||||
|
@ -1216,7 +1216,7 @@ public abstract class BasePlayer implements
|
||||||
includeSelfPromoCategory,
|
includeSelfPromoCategory,
|
||||||
includeMusicCategory);
|
includeMusicCategory);
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
Log.e("SPONSOR_BLOCK", "Error getting YouTube video sponsor times.", e);
|
Log.e("SPONSOR_BLOCK", "Error getting YouTube video segments.", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -648,9 +648,6 @@ public abstract class VideoPlayer extends BasePlayer
|
||||||
new SeekBarMarker(segment.startTime, segment.endTime,
|
new SeekBarMarker(segment.startTime, segment.endTime,
|
||||||
(int) simpleExoPlayer.getDuration(), color);
|
(int) simpleExoPlayer.getDuration(), color);
|
||||||
markableSeekBar.seekBarMarkers.add(seekBarMarker);
|
markableSeekBar.seekBarMarkers.add(seekBarMarker);
|
||||||
|
|
||||||
Log.d("SPONSOR_BLOCK", "Progress bar marker: "
|
|
||||||
+ seekBarMarker.percentStart + ", " + seekBarMarker.percentEnd);
|
|
||||||
}
|
}
|
||||||
markableSeekBar.drawMarkers();
|
markableSeekBar.drawMarkers();
|
||||||
}
|
}
|
||||||
|
@ -660,9 +657,9 @@ public abstract class VideoPlayer extends BasePlayer
|
||||||
final String colorStr;
|
final String colorStr;
|
||||||
switch (category) {
|
switch (category) {
|
||||||
case "sponsor":
|
case "sponsor":
|
||||||
key = context.getString(R.string.sponsorblock_category_sponsor_key);
|
key = context.getString(R.string.sponsor_block_category_sponsor_key);
|
||||||
if (mPrefs.getBoolean(key, false)) {
|
if (mPrefs.getBoolean(key, false)) {
|
||||||
key = context.getString(R.string.sponsorblock_category_sponsor_color_key);
|
key = context.getString(R.string.sponsor_block_category_sponsor_color_key);
|
||||||
colorStr = mPrefs.getString(key, null);
|
colorStr = mPrefs.getString(key, null);
|
||||||
return colorStr == null
|
return colorStr == null
|
||||||
? context.getResources().getColor(R.color.sponsor_segment)
|
? context.getResources().getColor(R.color.sponsor_segment)
|
||||||
|
@ -670,9 +667,9 @@ public abstract class VideoPlayer extends BasePlayer
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "intro":
|
case "intro":
|
||||||
key = context.getString(R.string.sponsorblock_category_intro_key);
|
key = context.getString(R.string.sponsor_block_category_intro_key);
|
||||||
if (mPrefs.getBoolean(key, false)) {
|
if (mPrefs.getBoolean(key, false)) {
|
||||||
key = context.getString(R.string.sponsorblock_category_intro_color_key);
|
key = context.getString(R.string.sponsor_block_category_intro_color_key);
|
||||||
colorStr = mPrefs.getString(key, null);
|
colorStr = mPrefs.getString(key, null);
|
||||||
return colorStr == null
|
return colorStr == null
|
||||||
? context.getResources().getColor(R.color.intro_segment)
|
? context.getResources().getColor(R.color.intro_segment)
|
||||||
|
@ -680,9 +677,9 @@ public abstract class VideoPlayer extends BasePlayer
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "outro":
|
case "outro":
|
||||||
key = context.getString(R.string.sponsorblock_category_outro_key);
|
key = context.getString(R.string.sponsor_block_category_outro_key);
|
||||||
if (mPrefs.getBoolean(key, false)) {
|
if (mPrefs.getBoolean(key, false)) {
|
||||||
key = context.getString(R.string.sponsorblock_category_outro_color_key);
|
key = context.getString(R.string.sponsor_block_category_outro_color_key);
|
||||||
colorStr = mPrefs.getString(key, null);
|
colorStr = mPrefs.getString(key, null);
|
||||||
return colorStr == null
|
return colorStr == null
|
||||||
? context.getResources().getColor(R.color.outro_segment)
|
? context.getResources().getColor(R.color.outro_segment)
|
||||||
|
@ -690,9 +687,9 @@ public abstract class VideoPlayer extends BasePlayer
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "interaction":
|
case "interaction":
|
||||||
key = context.getString(R.string.sponsorblock_category_interaction_key);
|
key = context.getString(R.string.sponsor_block_category_interaction_key);
|
||||||
if (mPrefs.getBoolean(key, false)) {
|
if (mPrefs.getBoolean(key, false)) {
|
||||||
key = context.getString(R.string.sponsorblock_category_interaction_color_key);
|
key = context.getString(R.string.sponsor_block_category_interaction_color_key);
|
||||||
colorStr = mPrefs.getString(key, null);
|
colorStr = mPrefs.getString(key, null);
|
||||||
return colorStr == null
|
return colorStr == null
|
||||||
? context.getResources().getColor(R.color.interaction_segment)
|
? context.getResources().getColor(R.color.interaction_segment)
|
||||||
|
@ -700,9 +697,9 @@ public abstract class VideoPlayer extends BasePlayer
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "selfpromo":
|
case "selfpromo":
|
||||||
key = context.getString(R.string.sponsorblock_category_self_promo_key);
|
key = context.getString(R.string.sponsor_block_category_self_promo_key);
|
||||||
if (mPrefs.getBoolean(key, false)) {
|
if (mPrefs.getBoolean(key, false)) {
|
||||||
key = context.getString(R.string.sponsorblock_category_self_promo_color_key);
|
key = context.getString(R.string.sponsor_block_category_self_promo_color_key);
|
||||||
colorStr = mPrefs.getString(key, null);
|
colorStr = mPrefs.getString(key, null);
|
||||||
return colorStr == null
|
return colorStr == null
|
||||||
? context.getResources().getColor(R.color.self_promo_segment)
|
? context.getResources().getColor(R.color.self_promo_segment)
|
||||||
|
@ -710,9 +707,9 @@ public abstract class VideoPlayer extends BasePlayer
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "music_offtopic":
|
case "music_offtopic":
|
||||||
key = context.getString(R.string.sponsorblock_category_non_music_key);
|
key = context.getString(R.string.sponsor_block_category_non_music_key);
|
||||||
if (mPrefs.getBoolean(key, false)) {
|
if (mPrefs.getBoolean(key, false)) {
|
||||||
key = context.getString(R.string.sponsorblock_category_non_music_color_key);
|
key = context.getString(R.string.sponsor_block_category_non_music_color_key);
|
||||||
colorStr = mPrefs.getString(key, null);
|
colorStr = mPrefs.getString(key, null);
|
||||||
return colorStr == null
|
return colorStr == null
|
||||||
? context.getResources().getColor(R.color.non_music_segment)
|
? context.getResources().getColor(R.color.non_music_segment)
|
||||||
|
|
|
@ -386,7 +386,7 @@ public class VideoPlayerImpl extends VideoPlayer
|
||||||
muteButton.setVisibility(View.VISIBLE);
|
muteButton.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
final boolean isSponsorBlockEnabled = mPrefs.getBoolean(
|
final boolean isSponsorBlockEnabled = mPrefs.getBoolean(
|
||||||
context.getString(R.string.sponsorblock_enable_key), false);
|
context.getString(R.string.sponsor_block_enable_key), false);
|
||||||
blockSponsorsButton.setVisibility(isSponsorBlockEnabled ? View.VISIBLE : View.GONE);
|
blockSponsorsButton.setVisibility(isSponsorBlockEnabled ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
playerCloseButton.setVisibility(isFullscreen ? View.GONE : View.VISIBLE);
|
playerCloseButton.setVisibility(isFullscreen ? View.GONE : View.VISIBLE);
|
||||||
|
|
|
@ -145,25 +145,25 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
||||||
});
|
});
|
||||||
|
|
||||||
final Preference sponsorBlockWebsitePreference =
|
final Preference sponsorBlockWebsitePreference =
|
||||||
findPreference(getString(R.string.sponsorblock_home_page_key));
|
findPreference(getString(R.string.sponsor_block_home_page_key));
|
||||||
sponsorBlockWebsitePreference.setOnPreferenceClickListener((Preference p) -> {
|
sponsorBlockWebsitePreference.setOnPreferenceClickListener((Preference p) -> {
|
||||||
final Intent i = new Intent(Intent.ACTION_VIEW,
|
final Intent i = new Intent(Intent.ACTION_VIEW,
|
||||||
Uri.parse(getString(R.string.sponsorblock_homepage_url)));
|
Uri.parse(getString(R.string.sponsor_block_homepage_url)));
|
||||||
startActivity(i);
|
startActivity(i);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
final Preference sponsorBlockPrivacyPreference =
|
final Preference sponsorBlockPrivacyPreference =
|
||||||
findPreference(getString(R.string.sponsorblock_privacy_key));
|
findPreference(getString(R.string.sponsor_block_privacy_key));
|
||||||
sponsorBlockPrivacyPreference.setOnPreferenceClickListener((Preference p) -> {
|
sponsorBlockPrivacyPreference.setOnPreferenceClickListener((Preference p) -> {
|
||||||
final Intent i = new Intent(Intent.ACTION_VIEW,
|
final Intent i = new Intent(Intent.ACTION_VIEW,
|
||||||
Uri.parse(getString(R.string.sponsorblock_privacy_policy_url)));
|
Uri.parse(getString(R.string.sponsor_block_privacy_policy_url)));
|
||||||
startActivity(i);
|
startActivity(i);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
final Preference sponsorBlockApiUrlPreference =
|
final Preference sponsorBlockApiUrlPreference =
|
||||||
findPreference(getString(R.string.sponsorblock_api_url_key));
|
findPreference(getString(R.string.sponsor_block_api_url_key));
|
||||||
sponsorBlockApiUrlPreference
|
sponsorBlockApiUrlPreference
|
||||||
.setOnPreferenceChangeListener((preference, newValue) -> {
|
.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||||
updateDependencies(preference, newValue);
|
updateDependencies(preference, newValue);
|
||||||
|
@ -176,11 +176,11 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
|
||||||
final Preference sponsorBlockApiUrlPreference =
|
final Preference sponsorBlockApiUrlPreference =
|
||||||
findPreference(getString(R.string.sponsorblock_api_url_key));
|
findPreference(getString(R.string.sponsor_block_api_url_key));
|
||||||
final String sponsorBlockApiUrlPreferenceValue =
|
final String sponsorBlockApiUrlPreferenceValue =
|
||||||
getPreferenceManager()
|
getPreferenceManager()
|
||||||
.getSharedPreferences()
|
.getSharedPreferences()
|
||||||
.getString(getString(R.string.sponsorblock_api_url_key), null);
|
.getString(getString(R.string.sponsor_block_api_url_key), null);
|
||||||
updateDependencies(sponsorBlockApiUrlPreference, sponsorBlockApiUrlPreferenceValue);
|
updateDependencies(sponsorBlockApiUrlPreference, sponsorBlockApiUrlPreferenceValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,15 +380,15 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
||||||
private void updateDependencies(final Preference preference, final Object newValue) {
|
private void updateDependencies(final Preference preference, final Object newValue) {
|
||||||
// This is a workaround to force dependency updates for custom preferences.
|
// This is a workaround to force dependency updates for custom preferences.
|
||||||
|
|
||||||
// sponsorblock_api_url_key
|
// sponsor_block_api_url_key
|
||||||
if (preference.getKey().equals(getString(R.string.sponsorblock_api_url_key))) {
|
if (preference.getKey().equals(getString(R.string.sponsor_block_api_url_key))) {
|
||||||
findPreference(getString(R.string.sponsorblock_enable_key))
|
findPreference(getString(R.string.sponsor_block_enable_key))
|
||||||
.onDependencyChanged(preference,
|
.onDependencyChanged(preference,
|
||||||
newValue == null || newValue.equals(""));
|
newValue == null || newValue.equals(""));
|
||||||
findPreference(getString(R.string.sponsorblock_notifications_key))
|
findPreference(getString(R.string.sponsor_block_notifications_key))
|
||||||
.onDependencyChanged(preference,
|
.onDependencyChanged(preference,
|
||||||
newValue == null || newValue.equals(""));
|
newValue == null || newValue.equals(""));
|
||||||
findPreference(getString(R.string.sponsorblock_categories_key))
|
findPreference(getString(R.string.sponsor_block_categories_key))
|
||||||
.onDependencyChanged(preference,
|
.onDependencyChanged(preference,
|
||||||
newValue == null || newValue.equals(""));
|
newValue == null || newValue.equals(""));
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class SponsorBlockCategoriesSettingsFragment extends BasePreferenceFragme
|
||||||
addPreferencesFromResource(R.xml.sponsor_block_category_settings);
|
addPreferencesFromResource(R.xml.sponsor_block_category_settings);
|
||||||
|
|
||||||
final Preference resetPreferenceView =
|
final Preference resetPreferenceView =
|
||||||
findPreference(getString(R.string.sponsorblock_category_reset_key));
|
findPreference(getString(R.string.sponsor_block_category_reset_key));
|
||||||
if (resetPreferenceView != null) {
|
if (resetPreferenceView != null) {
|
||||||
resetPreferenceView.setOnPreferenceClickListener(preference -> {
|
resetPreferenceView.setOnPreferenceClickListener(preference -> {
|
||||||
final Context context = getContext();
|
final Context context = getContext();
|
||||||
|
@ -35,27 +35,27 @@ public class SponsorBlockCategoriesSettingsFragment extends BasePreferenceFragme
|
||||||
.edit();
|
.edit();
|
||||||
|
|
||||||
setColorPreference(editor,
|
setColorPreference(editor,
|
||||||
R.string.sponsorblock_category_sponsor_color_key,
|
R.string.sponsor_block_category_sponsor_color_key,
|
||||||
R.color.sponsor_segment);
|
R.color.sponsor_segment);
|
||||||
|
|
||||||
setColorPreference(editor,
|
setColorPreference(editor,
|
||||||
R.string.sponsorblock_category_intro_color_key,
|
R.string.sponsor_block_category_intro_color_key,
|
||||||
R.color.intro_segment);
|
R.color.intro_segment);
|
||||||
|
|
||||||
setColorPreference(editor,
|
setColorPreference(editor,
|
||||||
R.string.sponsorblock_category_outro_color_key,
|
R.string.sponsor_block_category_outro_color_key,
|
||||||
R.color.outro_segment);
|
R.color.outro_segment);
|
||||||
|
|
||||||
setColorPreference(editor,
|
setColorPreference(editor,
|
||||||
R.string.sponsorblock_category_interaction_color_key,
|
R.string.sponsor_block_category_interaction_color_key,
|
||||||
R.color.interaction_segment);
|
R.color.interaction_segment);
|
||||||
|
|
||||||
setColorPreference(editor,
|
setColorPreference(editor,
|
||||||
R.string.sponsorblock_category_self_promo_color_key,
|
R.string.sponsor_block_category_self_promo_color_key,
|
||||||
R.color.self_promo_segment);
|
R.color.self_promo_segment);
|
||||||
|
|
||||||
setColorPreference(editor,
|
setColorPreference(editor,
|
||||||
R.string.sponsorblock_category_non_music_color_key,
|
R.string.sponsor_block_category_non_music_color_key,
|
||||||
R.color.non_music_segment);
|
R.color.non_music_segment);
|
||||||
|
|
||||||
editor.apply();
|
editor.apply();
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class SponsorBlockApiUrlPreference extends Preference {
|
||||||
super.onClick();
|
super.onClick();
|
||||||
|
|
||||||
final View alertDialogView = LayoutInflater.from(getContext())
|
final View alertDialogView = LayoutInflater.from(getContext())
|
||||||
.inflate(R.layout.dialog_sponsorblock_api_url, null);
|
.inflate(R.layout.dialog_sponsor_block_api_url, null);
|
||||||
|
|
||||||
final EditText editText = alertDialogView.findViewById(R.id.api_url_edit);
|
final EditText editText = alertDialogView.findViewById(R.id.api_url_edit);
|
||||||
editText.setText(getSharedPreferences().getString(getKey(), null));
|
editText.setText(getSharedPreferences().getString(getKey(), null));
|
||||||
|
@ -54,11 +54,11 @@ public class SponsorBlockApiUrlPreference extends Preference {
|
||||||
alertDialogView.findViewById(R.id.icon_api_url_help)
|
alertDialogView.findViewById(R.id.icon_api_url_help)
|
||||||
.setOnClickListener(v -> {
|
.setOnClickListener(v -> {
|
||||||
final Uri privacyPolicyUri = Uri.parse(getContext()
|
final Uri privacyPolicyUri = Uri.parse(getContext()
|
||||||
.getString(R.string.sponsorblock_privacy_policy_url));
|
.getString(R.string.sponsor_block_privacy_policy_url));
|
||||||
final View helpDialogView = LayoutInflater.from(getContext())
|
final View helpDialogView = LayoutInflater.from(getContext())
|
||||||
.inflate(R.layout.dialog_sponsorblock_api_url_help, null);
|
.inflate(R.layout.dialog_sponsor_block_api_url_help, null);
|
||||||
final View privacyPolicyButton = helpDialogView
|
final View privacyPolicyButton = helpDialogView
|
||||||
.findViewById(R.id.sponsorblock_privacy_policy_button);
|
.findViewById(R.id.sponsor_block_privacy_policy_button);
|
||||||
privacyPolicyButton.setOnClickListener(v1 -> {
|
privacyPolicyButton.setOnClickListener(v1 -> {
|
||||||
final Intent i = new Intent(Intent.ACTION_VIEW, privacyPolicyUri);
|
final Intent i = new Intent(Intent.ACTION_VIEW, privacyPolicyUri);
|
||||||
getContext().startActivity(i);
|
getContext().startActivity(i);
|
||||||
|
@ -68,7 +68,7 @@ public class SponsorBlockApiUrlPreference extends Preference {
|
||||||
.setView(helpDialogView)
|
.setView(helpDialogView)
|
||||||
.setPositiveButton("Use Official", (dialog, which) -> {
|
.setPositiveButton("Use Official", (dialog, which) -> {
|
||||||
editText.setText(getContext()
|
editText.setText(getContext()
|
||||||
.getString(R.string.sponsorblock_default_api_url));
|
.getString(R.string.sponsor_block_default_api_url));
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
})
|
})
|
||||||
.setNeutralButton("Close", (dialog, which) -> dialog.dismiss())
|
.setNeutralButton("Close", (dialog, which) -> dialog.dismiss())
|
||||||
|
@ -79,7 +79,7 @@ public class SponsorBlockApiUrlPreference extends Preference {
|
||||||
final AlertDialog alertDialog =
|
final AlertDialog alertDialog =
|
||||||
new AlertDialog.Builder(getContext())
|
new AlertDialog.Builder(getContext())
|
||||||
.setView(alertDialogView)
|
.setView(alertDialogView)
|
||||||
.setTitle(getContext().getString(R.string.sponsorblock_api_url_title))
|
.setTitle(getContext().getString(R.string.sponsor_block_api_url_title))
|
||||||
.setPositiveButton("OK", (dialog, which) -> {
|
.setPositiveButton("OK", (dialog, which) -> {
|
||||||
final String newValue = editText.getText().toString();
|
final String newValue = editText.getText().toString();
|
||||||
final SharedPreferences.Editor editor =
|
final SharedPreferences.Editor editor =
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
android:layout_marginBottom="6dp"
|
android:layout_marginBottom="6dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:text="@string/sponsorblock_api_url_help_text"/>
|
android:text="@string/sponsor_block_api_url_help_text"/>
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/sponsorblock_privacy_policy_button"
|
android:id="@+id/sponsor_block_privacy_policy_button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/sponsorblock_privacy_policy_text"/>
|
android:text="@string/sponsor_block_privacy_policy_text"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -317,7 +317,7 @@
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
app:srcCompat="@drawable/ic_sponsor_block_disable_white_24dp"
|
app:srcCompat="@drawable/ic_sponsor_block_disable_white_24dp"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/sponsorblock_toggle_skipping"
|
android:contentDescription="@string/sponsor_block_toggle_skipping"
|
||||||
tools:ignore="RtlHardcoded" />
|
tools:ignore="RtlHardcoded" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -239,25 +239,25 @@
|
||||||
<string name="downloads_storage_ask" translatable="false">downloads_storage_ask</string>
|
<string name="downloads_storage_ask" translatable="false">downloads_storage_ask</string>
|
||||||
<string name="storage_use_saf" translatable="false">storage_use_saf</string>
|
<string name="storage_use_saf" translatable="false">storage_use_saf</string>
|
||||||
|
|
||||||
<string name="sponsorblock_home_page_key" translatable="false">sponsorblock_home_page</string>
|
<string name="sponsor_block_home_page_key" translatable="false">sponsor_block_home_page</string>
|
||||||
<string name="sponsorblock_enable_key" translatable="false">sponsorblock_enable</string>
|
<string name="sponsor_block_enable_key" translatable="false">sponsor_block_enable</string>
|
||||||
<string name="sponsorblock_api_url_key" translatable="false">sponsorblock_api_url</string>
|
<string name="sponsor_block_api_url_key" translatable="false">sponsor_block_api_url</string>
|
||||||
<string name="sponsorblock_notifications_key" translatable="false">sponsorblock_notifications</string>
|
<string name="sponsor_block_notifications_key" translatable="false">sponsor_block_notifications</string>
|
||||||
<string name="sponsorblock_privacy_key" translatable="false">sponsorblock_privacy</string>
|
<string name="sponsor_block_privacy_key" translatable="false">sponsor_block_privacy</string>
|
||||||
<string name="sponsorblock_categories_key" translatable="false">sponsorblock_categories</string>
|
<string name="sponsor_block_categories_key" translatable="false">sponsor_block_categories</string>
|
||||||
<string name="sponsorblock_category_reset_key" translatable="false">sponsorblock_category_reset</string>
|
<string name="sponsor_block_category_reset_key" translatable="false">sponsor_block_category_reset</string>
|
||||||
<string name="sponsorblock_category_sponsor_key" translatable="false">sponsorblock_category_sponsor</string>
|
<string name="sponsor_block_category_sponsor_key" translatable="false">sponsor_block_category_sponsor</string>
|
||||||
<string name="sponsorblock_category_sponsor_color_key" translatable="false">sponsorblock_category_sponsor_color</string>
|
<string name="sponsor_block_category_sponsor_color_key" translatable="false">sponsor_block_category_sponsor_color</string>
|
||||||
<string name="sponsorblock_category_intro_key" translatable="false">sponsorblock_category_intro</string>
|
<string name="sponsor_block_category_intro_key" translatable="false">sponsor_block_category_intro</string>
|
||||||
<string name="sponsorblock_category_intro_color_key" translatable="false">sponsorblock_category_intro_color</string>
|
<string name="sponsor_block_category_intro_color_key" translatable="false">sponsor_block_category_intro_color</string>
|
||||||
<string name="sponsorblock_category_outro_key" translatable="false">sponsorblock_category_outro</string>
|
<string name="sponsor_block_category_outro_key" translatable="false">sponsor_block_category_outro</string>
|
||||||
<string name="sponsorblock_category_outro_color_key" translatable="false">sponsorblock_category_outro_color</string>
|
<string name="sponsor_block_category_outro_color_key" translatable="false">sponsor_block_category_outro_color</string>
|
||||||
<string name="sponsorblock_category_interaction_key" translatable="false">sponsorblock_category_interaction</string>
|
<string name="sponsor_block_category_interaction_key" translatable="false">sponsor_block_category_interaction</string>
|
||||||
<string name="sponsorblock_category_interaction_color_key" translatable="false">sponsorblock_category_interaction_color</string>
|
<string name="sponsor_block_category_interaction_color_key" translatable="false">sponsor_block_category_interaction_color</string>
|
||||||
<string name="sponsorblock_category_self_promo_key" translatable="false">sponsorblock_category_self_promo</string>
|
<string name="sponsor_block_category_self_promo_key" translatable="false">sponsor_block_category_self_promo</string>
|
||||||
<string name="sponsorblock_category_self_promo_color_key" translatable="false">sponsorblock_category_self_promo_color</string>
|
<string name="sponsor_block_category_self_promo_color_key" translatable="false">sponsor_block_category_self_promo_color</string>
|
||||||
<string name="sponsorblock_category_non_music_key" translatable="false">sponsorblock_category_music</string>
|
<string name="sponsor_block_category_non_music_key" translatable="false">sponsor_block_category_music</string>
|
||||||
<string name="sponsorblock_category_non_music_color_key" translatable="false">sponsorblock_category_music_color</string>
|
<string name="sponsor_block_category_non_music_color_key" translatable="false">sponsor_block_category_music_color</string>
|
||||||
|
|
||||||
<!-- FileName Downloads -->
|
<!-- FileName Downloads -->
|
||||||
<string name="settings_file_charset_key" translatable="false">file_rename_charset</string>
|
<string name="settings_file_charset_key" translatable="false">file_rename_charset</string>
|
||||||
|
|
|
@ -132,24 +132,24 @@
|
||||||
<string name="settings_category_other_title">Other</string>
|
<string name="settings_category_other_title">Other</string>
|
||||||
<string name="settings_category_debug_title">Debug</string>
|
<string name="settings_category_debug_title">Debug</string>
|
||||||
<string name="settings_category_updates_title">Updates</string>
|
<string name="settings_category_updates_title">Updates</string>
|
||||||
<string name="settings_category_sponsorblock_title">SponsorBlock (beta, third party service)</string>
|
<string name="settings_category_sponsor_block_title">SponsorBlock (beta, third party service)</string>
|
||||||
<string name="settings_category_sponsorblock_categories_title">SponsorBlock Categories</string>
|
<string name="settings_category_sponsor_block_categories_title">SponsorBlock Categories</string>
|
||||||
<string name="settings_category_sponsorblock_categories_summary">Customize which video segments to skip, along with their color markings on the seek bar.</string>
|
<string name="settings_category_sponsor_block_categories_summary">Customize which video segments to skip, along with their color markings on the seek bar.</string>
|
||||||
<string name="settings_category_sponsorblock_categories_reset_colors_title">Reset Colors</string>
|
<string name="settings_category_sponsor_block_categories_reset_colors_title">Reset Colors</string>
|
||||||
<string name="settings_category_sponsorblock_category_enable_title">Enable</string>
|
<string name="settings_category_sponsor_block_category_enable_title">Enable</string>
|
||||||
<string name="settings_category_sponsorblock_category_color">Seek Bar Color</string>
|
<string name="settings_category_sponsor_block_category_color">Seek Bar Color</string>
|
||||||
<string name="settings_category_sponsorblock_category_sponsor_title">Sponsor</string>
|
<string name="settings_category_sponsor_block_category_sponsor_title">Sponsor</string>
|
||||||
<string name="settings_category_sponsorblock_category_sponsor_summary">Paid promotion, paid referrals and direct advertisements. Not for self-promotion or free shoutouts to causes/creators/websites/products they like.</string>
|
<string name="settings_category_sponsor_block_category_sponsor_summary">Paid promotion, paid referrals and direct advertisements. Not for self-promotion or free shoutouts to causes/creators/websites/products they like.</string>
|
||||||
<string name="settings_category_sponsorblock_category_intro_title">Intermission/Intro Animation</string>
|
<string name="settings_category_sponsor_block_category_intro_title">Intermission/Intro Animation</string>
|
||||||
<string name="settings_category_sponsorblock_category_intro_summary">An interval without actual content. Could be a pause, static frame, repeating animation. This should not be used for transitions containing information or be used on music videos.</string>
|
<string name="settings_category_sponsor_block_category_intro_summary">An interval without actual content. Could be a pause, static frame, repeating animation. This should not be used for transitions containing information or be used on music videos.</string>
|
||||||
<string name="settings_category_sponsorblock_category_outro_title">Endcards/Credits</string>
|
<string name="settings_category_sponsor_block_category_outro_title">Endcards/Credits</string>
|
||||||
<string name="settings_category_sponsorblock_category_outro_summary">Credits or when the YouTube endcards appear. Not for spoken conclusions. This should not include useful content. This should not be used on music videos.</string>
|
<string name="settings_category_sponsor_block_category_outro_summary">Credits or when the YouTube endcards appear. Not for spoken conclusions. This should not include useful content. This should not be used on music videos.</string>
|
||||||
<string name="settings_category_sponsorblock_category_interaction_title">Interaction Reminds (Subscribe)</string>
|
<string name="settings_category_sponsor_block_category_interaction_title">Interaction Reminds (Subscribe)</string>
|
||||||
<string name="settings_category_sponsorblock_category_interaction_summary">When there is a short reminder to like, subscribe or follow them in the middle of content. If it is long or about something specific, it should be under self promotion instead.</string>
|
<string name="settings_category_sponsor_block_category_interaction_summary">When there is a short reminder to like, subscribe or follow them in the middle of content. If it is long or about something specific, it should be under self promotion instead.</string>
|
||||||
<string name="settings_category_sponsorblock_category_self_promo_title">Unpaid/Self Promotion</string>
|
<string name="settings_category_sponsor_block_category_self_promo_title">Unpaid/Self Promotion</string>
|
||||||
<string name="settings_category_sponsorblock_category_self_promo_summary">Similar to "sponsor" except for unpaid or self promotion. This includes sections about merchandise, donations, or information about who they collaborated with.</string>
|
<string name="settings_category_sponsor_block_category_self_promo_summary">Similar to "sponsor" except for unpaid or self promotion. This includes sections about merchandise, donations, or information about who they collaborated with.</string>
|
||||||
<string name="settings_category_sponsorblock_category_non_music_title">Music: Non-Music Section</string>
|
<string name="settings_category_sponsor_block_category_non_music_title">Music: Non-Music Section</string>
|
||||||
<string name="settings_category_sponsorblock_category_non_music_summary">Only for use in music videos. This includes introductions or outros in music videos.</string>
|
<string name="settings_category_sponsor_block_category_non_music_summary">Only for use in music videos. This includes introductions or outros in music videos.</string>
|
||||||
<string name="background_player_playing_toast">Playing in background</string>
|
<string name="background_player_playing_toast">Playing in background</string>
|
||||||
<string name="popup_playing_toast">Playing in popup mode</string>
|
<string name="popup_playing_toast">Playing in popup mode</string>
|
||||||
<string name="background_player_append">Queued on background player</string>
|
<string name="background_player_append">Queued on background player</string>
|
||||||
|
@ -684,26 +684,26 @@
|
||||||
<string name="video_detail_by">By %s</string>
|
<string name="video_detail_by">By %s</string>
|
||||||
<string name="playlist_page_summary">Playlist page</string>
|
<string name="playlist_page_summary">Playlist page</string>
|
||||||
<!-- SponsorBlock -->
|
<!-- SponsorBlock -->
|
||||||
<string name="sponsorblock_home_page_title">View Website</string>
|
<string name="sponsor_block_home_page_title">View Website</string>
|
||||||
<string name="sponsorblock_home_page_summary">View the official SponsorBlock website.</string>
|
<string name="sponsor_block_home_page_summary">View the official SponsorBlock website.</string>
|
||||||
<string name="sponsorblock_enable_title">Skip Sponsors</string>
|
<string name="sponsor_block_enable_title">Skip Sponsors</string>
|
||||||
<string name="sponsorblock_enable_summary">Use the SponsorBlock API to automatically skip sponsors in videos. This currently only works for YouTube videos.</string>
|
<string name="sponsor_block_enable_summary">Use the SponsorBlock API to automatically skip sponsors in videos. This currently only works for YouTube videos.</string>
|
||||||
<string name="sponsorblock_api_url_title">API Url</string>
|
<string name="sponsor_block_api_url_title">API Url</string>
|
||||||
<string name="sponsorblock_api_url_summary">The url to use when querying the SponsorBlock API. This must be set for SponsorBlock to work.</string>
|
<string name="sponsor_block_api_url_summary">The url to use when querying the SponsorBlock API. This must be set for SponsorBlock to work.</string>
|
||||||
<string name="sponsorblock_notifications_title">Notify when sponsors are skipped</string>
|
<string name="sponsor_block_notifications_title">Notify when sponsors are skipped</string>
|
||||||
<string name="sponsorblock_notifications_summary">Show a toast notification when a sponsor is automatically skipped.</string>
|
<string name="sponsor_block_notifications_summary">Show a toast notification when a sponsor is automatically skipped.</string>
|
||||||
<string name="sponsorblock_privacy_title">View Privacy Policy</string>
|
<string name="sponsor_block_privacy_title">View Privacy Policy</string>
|
||||||
<string name="sponsorblock_privacy_summary">View SponsorBlock\'s privacy policy.</string>
|
<string name="sponsor_block_privacy_summary">View SponsorBlock\'s privacy policy.</string>
|
||||||
<string name="sponsorblock_api_url_help_text">This is the URL that will be queried when the application needs to know which parts of a video to skip.\n\nYou can set the official URL by clicking the \'Use Official\' option below, though it is highly recommended you view SponsorBlock\'s privacy policy before you do.</string>
|
<string name="sponsor_block_api_url_help_text">This is the URL that will be queried when the application needs to know which parts of a video to skip.\n\nYou can set the official URL by clicking the \'Use Official\' option below, though it is highly recommended you view SponsorBlock\'s privacy policy before you do.</string>
|
||||||
<string name="sponsorblock_privacy_policy_text">SponsorBlock Privacy Policy</string>
|
<string name="sponsor_block_privacy_policy_text">SponsorBlock Privacy Policy</string>
|
||||||
<string name="sponsorblock_homepage_url">https://sponsor.ajay.app/</string>
|
<string name="sponsor_block_homepage_url">https://sponsor.ajay.app/</string>
|
||||||
<string name="sponsorblock_default_api_url">https://sponsor.ajay.app/api/</string>
|
<string name="sponsor_block_default_api_url">https://sponsor.ajay.app/api/</string>
|
||||||
<string name="sponsorblock_privacy_policy_url">https://gist.github.com/ajayyy/aa9f8ded2b573d4f73a3ffa0ef74f796</string>
|
<string name="sponsor_block_privacy_policy_url">https://gist.github.com/ajayyy/aa9f8ded2b573d4f73a3ffa0ef74f796</string>
|
||||||
<string name="sponsorblock_skip_sponsor_message">Skipped sponsor</string>
|
<string name="sponsor_block_skip_sponsor_message">Skipped sponsor</string>
|
||||||
<string name="sponsorblock_skip_intro_message">Skipped intermission/intro</string>
|
<string name="sponsor_block_skip_intro_message">Skipped intermission/intro</string>
|
||||||
<string name="sponsorblock_skip_outro_message">Skipped endcards/credits</string>
|
<string name="sponsor_block_skip_outro_message">Skipped endcards/credits</string>
|
||||||
<string name="sponsorblock_skip_interaction_message">Skipped interaction reminder</string>
|
<string name="sponsor_block_skip_interaction_message">Skipped interaction reminder</string>
|
||||||
<string name="sponsorblock_skip_self_promo_message">Skipped unpaid/self promo</string>
|
<string name="sponsor_block_skip_self_promo_message">Skipped unpaid/self promo</string>
|
||||||
<string name="sponsorblock_skip_non_music_message">Skipped non-music</string>
|
<string name="sponsor_block_skip_non_music_message">Skipped non-music</string>
|
||||||
<string name="sponsorblock_toggle_skipping">Toggle skipping sponsors</string>
|
<string name="sponsor_block_toggle_skipping">Toggle skipping sponsors</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -120,49 +120,49 @@
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:layout="@layout/settings_category_header_layout"
|
android:layout="@layout/settings_category_header_layout"
|
||||||
android:title="@string/settings_category_sponsorblock_title">
|
android:title="@string/settings_category_sponsor_block_title">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:key="@string/sponsorblock_home_page_key"
|
android:key="@string/sponsor_block_home_page_key"
|
||||||
android:summary="@string/sponsorblock_home_page_summary"
|
android:summary="@string/sponsor_block_home_page_summary"
|
||||||
android:title="@string/sponsorblock_home_page_title"/>
|
android:title="@string/sponsor_block_home_page_title"/>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:key="@string/sponsorblock_privacy_key"
|
android:key="@string/sponsor_block_privacy_key"
|
||||||
android:summary="@string/sponsorblock_privacy_summary"
|
android:summary="@string/sponsor_block_privacy_summary"
|
||||||
android:title="@string/sponsorblock_privacy_title"/>
|
android:title="@string/sponsor_block_privacy_title"/>
|
||||||
|
|
||||||
<org.schabi.newpipe.settings.custom.SponsorBlockApiUrlPreference
|
<org.schabi.newpipe.settings.custom.SponsorBlockApiUrlPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:key="@string/sponsorblock_api_url_key"
|
android:key="@string/sponsor_block_api_url_key"
|
||||||
android:summary="@string/sponsorblock_api_url_summary"
|
android:summary="@string/sponsor_block_api_url_summary"
|
||||||
android:title="@string/sponsorblock_api_url_title"/>
|
android:title="@string/sponsor_block_api_url_title"/>
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:dependency="@string/sponsorblock_api_url_key"
|
android:dependency="@string/sponsor_block_api_url_key"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="@string/sponsorblock_enable_key"
|
android:key="@string/sponsor_block_enable_key"
|
||||||
android:summary="@string/sponsorblock_enable_summary"
|
android:summary="@string/sponsor_block_enable_summary"
|
||||||
android:title="@string/sponsorblock_enable_title"/>
|
android:title="@string/sponsor_block_enable_title"/>
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:dependency="@string/sponsorblock_api_url_key"
|
android:dependency="@string/sponsor_block_api_url_key"
|
||||||
android:key="@string/sponsorblock_notifications_key"
|
android:key="@string/sponsor_block_notifications_key"
|
||||||
android:summary="@string/sponsorblock_notifications_summary"
|
android:summary="@string/sponsor_block_notifications_summary"
|
||||||
android:title="@string/sponsorblock_notifications_title"/>
|
android:title="@string/sponsor_block_notifications_title"/>
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:dependency="@string/sponsorblock_api_url_key"
|
android:dependency="@string/sponsor_block_api_url_key"
|
||||||
android:fragment="org.schabi.newpipe.settings.SponsorBlockCategoriesSettingsFragment"
|
android:fragment="org.schabi.newpipe.settings.SponsorBlockCategoriesSettingsFragment"
|
||||||
android:key="@string/sponsorblock_categories_key"
|
android:key="@string/sponsor_block_categories_key"
|
||||||
android:title="@string/settings_category_sponsorblock_categories_title"
|
android:title="@string/settings_category_sponsor_block_categories_title"
|
||||||
android:summary="@string/settings_category_sponsorblock_categories_summary"/>
|
android:summary="@string/settings_category_sponsor_block_categories_summary"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
|
@ -2,154 +2,154 @@
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:title="@string/settings_category_sponsorblock_categories_title">
|
android:title="@string/settings_category_sponsor_block_categories_title">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:key="@string/sponsorblock_category_reset_key"
|
android:key="@string/sponsor_block_category_reset_key"
|
||||||
android:title="@string/settings_category_sponsorblock_categories_reset_colors_title"/>
|
android:title="@string/settings_category_sponsor_block_categories_reset_colors_title"/>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:layout="@layout/settings_category_header_layout"
|
android:layout="@layout/settings_category_header_layout"
|
||||||
android:title="@string/settings_category_sponsorblock_category_sponsor_title">
|
android:title="@string/settings_category_sponsor_block_category_sponsor_title">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:summary="@string/settings_category_sponsorblock_category_sponsor_summary"
|
android:summary="@string/settings_category_sponsor_block_category_sponsor_summary"
|
||||||
android:selectable="false"/>
|
android:selectable="false"/>
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="@string/sponsorblock_category_sponsor_key"
|
android:key="@string/sponsor_block_category_sponsor_key"
|
||||||
android:title="@string/settings_category_sponsorblock_category_enable_title"/>
|
android:title="@string/settings_category_sponsor_block_category_enable_title"/>
|
||||||
|
|
||||||
<org.schabi.newpipe.settings.custom.EditColorPreference
|
<org.schabi.newpipe.settings.custom.EditColorPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:dependency="@string/sponsorblock_category_sponsor_key"
|
android:dependency="@string/sponsor_block_category_sponsor_key"
|
||||||
android:defaultValue="@color/sponsor_segment"
|
android:defaultValue="@color/sponsor_segment"
|
||||||
android:key="@string/sponsorblock_category_sponsor_color_key"
|
android:key="@string/sponsor_block_category_sponsor_color_key"
|
||||||
android:title="@string/settings_category_sponsorblock_category_color"/>
|
android:title="@string/settings_category_sponsor_block_category_color"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:layout="@layout/settings_category_header_layout"
|
android:layout="@layout/settings_category_header_layout"
|
||||||
android:title="@string/settings_category_sponsorblock_category_intro_title">
|
android:title="@string/settings_category_sponsor_block_category_intro_title">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:summary="@string/settings_category_sponsorblock_category_intro_summary"
|
android:summary="@string/settings_category_sponsor_block_category_intro_summary"
|
||||||
android:selectable="false"/>
|
android:selectable="false"/>
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="@string/sponsorblock_category_intro_key"
|
android:key="@string/sponsor_block_category_intro_key"
|
||||||
android:title="@string/settings_category_sponsorblock_category_enable_title"/>
|
android:title="@string/settings_category_sponsor_block_category_enable_title"/>
|
||||||
|
|
||||||
<org.schabi.newpipe.settings.custom.EditColorPreference
|
<org.schabi.newpipe.settings.custom.EditColorPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:dependency="@string/sponsorblock_category_intro_key"
|
android:dependency="@string/sponsor_block_category_intro_key"
|
||||||
android:defaultValue="@color/intro_segment"
|
android:defaultValue="@color/intro_segment"
|
||||||
android:key="@string/sponsorblock_category_intro_color_key"
|
android:key="@string/sponsor_block_category_intro_color_key"
|
||||||
android:title="@string/settings_category_sponsorblock_category_color"/>
|
android:title="@string/settings_category_sponsor_block_category_color"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:layout="@layout/settings_category_header_layout"
|
android:layout="@layout/settings_category_header_layout"
|
||||||
android:title="@string/settings_category_sponsorblock_category_outro_title">
|
android:title="@string/settings_category_sponsor_block_category_outro_title">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:summary="@string/settings_category_sponsorblock_category_outro_summary"
|
android:summary="@string/settings_category_sponsor_block_category_outro_summary"
|
||||||
android:selectable="false"/>
|
android:selectable="false"/>
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="@string/sponsorblock_category_outro_key"
|
android:key="@string/sponsor_block_category_outro_key"
|
||||||
android:title="@string/settings_category_sponsorblock_category_enable_title"/>
|
android:title="@string/settings_category_sponsor_block_category_enable_title"/>
|
||||||
|
|
||||||
<org.schabi.newpipe.settings.custom.EditColorPreference
|
<org.schabi.newpipe.settings.custom.EditColorPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:dependency="@string/sponsorblock_category_outro_key"
|
android:dependency="@string/sponsor_block_category_outro_key"
|
||||||
android:defaultValue="@color/outro_segment"
|
android:defaultValue="@color/outro_segment"
|
||||||
android:key="@string/sponsorblock_category_outro_color_key"
|
android:key="@string/sponsor_block_category_outro_color_key"
|
||||||
android:title="@string/settings_category_sponsorblock_category_color"/>
|
android:title="@string/settings_category_sponsor_block_category_color"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:layout="@layout/settings_category_header_layout"
|
android:layout="@layout/settings_category_header_layout"
|
||||||
android:title="@string/settings_category_sponsorblock_category_interaction_title">
|
android:title="@string/settings_category_sponsor_block_category_interaction_title">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:summary="@string/settings_category_sponsorblock_category_interaction_summary"
|
android:summary="@string/settings_category_sponsor_block_category_interaction_summary"
|
||||||
android:selectable="false"/>
|
android:selectable="false"/>
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="@string/sponsorblock_category_interaction_key"
|
android:key="@string/sponsor_block_category_interaction_key"
|
||||||
android:title="@string/settings_category_sponsorblock_category_enable_title"/>
|
android:title="@string/settings_category_sponsor_block_category_enable_title"/>
|
||||||
|
|
||||||
<org.schabi.newpipe.settings.custom.EditColorPreference
|
<org.schabi.newpipe.settings.custom.EditColorPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:dependency="@string/sponsorblock_category_interaction_key"
|
android:dependency="@string/sponsor_block_category_interaction_key"
|
||||||
android:defaultValue="@color/interaction_segment"
|
android:defaultValue="@color/interaction_segment"
|
||||||
android:key="@string/sponsorblock_category_interaction_color_key"
|
android:key="@string/sponsor_block_category_interaction_color_key"
|
||||||
android:title="@string/settings_category_sponsorblock_category_color"/>
|
android:title="@string/settings_category_sponsor_block_category_color"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:layout="@layout/settings_category_header_layout"
|
android:layout="@layout/settings_category_header_layout"
|
||||||
android:title="@string/settings_category_sponsorblock_category_self_promo_title">
|
android:title="@string/settings_category_sponsor_block_category_self_promo_title">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:summary="@string/settings_category_sponsorblock_category_self_promo_summary"
|
android:summary="@string/settings_category_sponsor_block_category_self_promo_summary"
|
||||||
android:selectable="false"/>
|
android:selectable="false"/>
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="@string/sponsorblock_category_self_promo_key"
|
android:key="@string/sponsor_block_category_self_promo_key"
|
||||||
android:title="@string/settings_category_sponsorblock_category_enable_title"/>
|
android:title="@string/settings_category_sponsor_block_category_enable_title"/>
|
||||||
|
|
||||||
<org.schabi.newpipe.settings.custom.EditColorPreference
|
<org.schabi.newpipe.settings.custom.EditColorPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:dependency="@string/sponsorblock_category_self_promo_key"
|
android:dependency="@string/sponsor_block_category_self_promo_key"
|
||||||
android:defaultValue="@color/self_promo_segment"
|
android:defaultValue="@color/self_promo_segment"
|
||||||
android:key="@string/sponsorblock_category_self_promo_color_key"
|
android:key="@string/sponsor_block_category_self_promo_color_key"
|
||||||
android:title="@string/settings_category_sponsorblock_category_color"/>
|
android:title="@string/settings_category_sponsor_block_category_color"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:layout="@layout/settings_category_header_layout"
|
android:layout="@layout/settings_category_header_layout"
|
||||||
android:title="@string/settings_category_sponsorblock_category_non_music_title">
|
android:title="@string/settings_category_sponsor_block_category_non_music_title">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:summary="@string/settings_category_sponsorblock_category_non_music_summary"
|
android:summary="@string/settings_category_sponsor_block_category_non_music_summary"
|
||||||
android:selectable="false"/>
|
android:selectable="false"/>
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="@string/sponsorblock_category_non_music_key"
|
android:key="@string/sponsor_block_category_non_music_key"
|
||||||
android:title="@string/settings_category_sponsorblock_category_enable_title"/>
|
android:title="@string/settings_category_sponsor_block_category_enable_title"/>
|
||||||
|
|
||||||
<org.schabi.newpipe.settings.custom.EditColorPreference
|
<org.schabi.newpipe.settings.custom.EditColorPreference
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
android:dependency="@string/sponsorblock_category_non_music_key"
|
android:dependency="@string/sponsor_block_category_non_music_key"
|
||||||
android:defaultValue="@color/non_music_segment"
|
android:defaultValue="@color/non_music_segment"
|
||||||
android:key="@string/sponsorblock_category_non_music_color_key"
|
android:key="@string/sponsor_block_category_non_music_color_key"
|
||||||
android:title="@string/settings_category_sponsorblock_category_color"/>
|
android:title="@string/settings_category_sponsor_block_category_color"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue