Skip to content

Commit

Permalink
feat(YouTube/Hide feed components): selectively hide video by views f…
Browse files Browse the repository at this point in the history
…or Home / Subscription / Search
  • Loading branch information
inotia00 committed Sep 15, 2024
1 parent aa78830 commit 780dd0a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
16 changes: 14 additions & 2 deletions src/main/resources/youtube/settings/host/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,28 @@ Limitations:

<!-- PreferenceScreen: Feed, PreferenceCategory: Feed, PreferenceScreen: Video filter, PreferenceCategory: View count filter -->
<string name="revanced_preference_category_view_counts_filter">View count filter</string>
<string name="revanced_hide_video_by_view_counts_title">Hide recommended videos by views</string>
<string name="revanced_hide_video_by_view_counts_summary">Hide recommended videos with less than a specified number of views.\n\nKnown issue: Videos with 0 views are not filtered.</string>
<string name="revanced_hide_video_by_view_counts_home_title">Hide home videos by views</string>
<string name="revanced_hide_video_by_view_counts_home_summary_on">Videos in home feed are filtered.</string>
<string name="revanced_hide_video_by_view_counts_home_summary_off">Videos in home feed are not filtered.</string>
<string name="revanced_hide_video_by_view_counts_search_title">Hide search results by views</string>
<string name="revanced_hide_video_by_view_counts_search_summary_on">Search results are filtered.</string>
<string name="revanced_hide_video_by_view_counts_search_summary_off">Search results are not filtered.</string>
<string name="revanced_hide_video_by_view_counts_subscriptions_title">Hide subscription videos by views</string>
<string name="revanced_hide_video_by_view_counts_subscriptions_summary_on">Videos in subscriptions feed are filtered.</string>
<string name="revanced_hide_video_by_view_counts_subscriptions_summary_off">Videos in subscriptions feed are not filtered.</string>
<string name="revanced_hide_video_view_counts_greater_than_title">Greater than views</string>
<string name="revanced_hide_video_view_counts_greater_than_summary">Videos with views greater than this number will be hidden.</string>
<string name="revanced_hide_video_view_counts_less_than_title">Less than views</string>
<string name="revanced_hide_video_view_counts_less_than_summary">Videos with views less than this number will be hidden.</string>
<string name="revanced_hide_video_view_counts_multiplier_title">View keys</string>
<string name="revanced_hide_video_view_counts_multiplier_summary">Specify your language template for the number of views shown under each video in the user interface. Each key (a letter/word in your language) -> value (meaning of the key) must be on a new line. Keys go before "->" sign. If you change the app or system language you need to reset this setting.\n\nExamples:\nEnglish: 10K views = K -> 1000, views -> views\nSpanish: 10 K vistas = K -> 1000, vistas -> views</string>
<string name="revanced_hide_video_view_counts_multiplier_default_value">K -> 1 000\nM -> 1 000 000\nB -> 1 000 000 000\nviews -> views</string>
<string name="revanced_hide_video_by_view_counts_about_title">About view count filtering</string>
<string name="revanced_hide_video_by_view_counts_about_summary">"Home / Subscription / Search results are filtered to hide videos with views less or greater than a specified number.

Limitations:
• Shorts cannot be hidden.
• Videos with 0 views are not filtered."</string>

<!-- PreferenceScreen: General -->
<string name="revanced_preference_screen_general_title">General</string>
Expand Down
9 changes: 6 additions & 3 deletions src/main/resources/youtube/settings/xml/revanced_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,21 @@
<SwitchPreference android:title="@string/revanced_hide_keyword_content_subscriptions_title" android:key="revanced_hide_keyword_content_subscriptions" android:summaryOn="@string/revanced_hide_keyword_content_subscriptions_summary_on" android:summaryOff="@string/revanced_hide_keyword_content_subscriptions_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_keyword_content_comments_title" android:key="revanced_hide_keyword_content_comments" android:summaryOn="@string/revanced_hide_keyword_content_comments_summary_on" android:summaryOff="@string/revanced_hide_keyword_content_comments_summary_off" />
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_hide_keyword_content_phrases_title" android:key="revanced_hide_keyword_content_phrases" android:summary="@string/revanced_hide_keyword_content_phrases_summary" android:inputType="textMultiLine" />
<Preference android:title="@string/revanced_hide_keyword_content_about_title" android:selectable="false" android:summary="@string/revanced_hide_keyword_content_about_summary" />
<app.revanced.integrations.youtube.settings.preference.HtmlPreference android:title="@string/revanced_hide_keyword_content_about_whole_words_title" android:selectable="false" android:summary="@string/revanced_hide_keyword_content_about_whole_words_summary" />
<app.revanced.integrations.youtube.settings.preference.KeywordContentAboutPreference android:title="@string/revanced_hide_keyword_content_about_title" android:selectable="false" android:summary="@string/revanced_hide_keyword_content_about_summary" />
<app.revanced.integrations.youtube.settings.preference.KeywordContentAboutWholeWordsPreference android:title="@string/revanced_hide_keyword_content_about_whole_words_title" android:selectable="false" android:summary="@string/revanced_hide_keyword_content_about_whole_words_summary" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/revanced_preference_category_recommended_video" android:layout="@layout/revanced_settings_preferences_category">
<SwitchPreference android:title="@string/revanced_hide_recommended_video_title" android:key="revanced_hide_recommended_video" android:summary="@string/revanced_hide_recommended_video_summary" />
<SwitchPreference android:title="@string/revanced_hide_low_views_video_title" android:key="revanced_hide_low_views_video" android:summary="@string/revanced_hide_low_views_video_summary" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/revanced_preference_category_view_counts_filter" android:layout="@layout/revanced_settings_preferences_category">
<SwitchPreference android:title="@string/revanced_hide_video_by_view_counts_title" android:key="revanced_hide_video_by_view_counts" android:summary="@string/revanced_hide_video_by_view_counts_summary" />
<SwitchPreference android:title="@string/revanced_hide_video_by_view_counts_home_title" android:key="revanced_hide_video_by_view_counts_home" android:summaryOn="@string/revanced_hide_video_by_view_counts_home_summary_on" android:summaryOff="@string/revanced_hide_video_by_view_counts_home_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_video_by_view_counts_search_title" android:key="revanced_hide_video_by_view_counts_search" android:summaryOn="@string/revanced_hide_video_by_view_counts_search_summary_on" android:summaryOff="@string/revanced_hide_video_by_view_counts_search_summary_off" />
<SwitchPreference android:title="@string/revanced_hide_video_by_view_counts_subscriptions_title" android:key="revanced_hide_video_by_view_counts_subscriptions" android:summaryOn="@string/revanced_hide_video_by_view_counts_subscriptions_summary_on" android:summaryOff="@string/revanced_hide_video_by_view_counts_subscriptions_summary_off" />
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_hide_video_view_counts_less_than_title" android:key="revanced_hide_video_view_counts_less_than" android:summary="@string/revanced_hide_video_view_counts_less_than_summary" android:inputType="number" />
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_hide_video_view_counts_greater_than_title" android:key="revanced_hide_video_view_counts_greater_than" android:summary="@string/revanced_hide_video_view_counts_greater_than_summary" android:inputType="number" />
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_hide_video_view_counts_multiplier_title" android:key="revanced_hide_video_view_counts_multiplier" android:summary="@string/revanced_hide_video_view_counts_multiplier_summary" android:inputType="textMultiLine" />
<app.revanced.integrations.youtube.settings.preference.ViewCountAboutPreference android:title="@string/revanced_hide_video_by_view_counts_about_title" android:selectable="false" android:summary="@string/revanced_hide_video_by_view_counts_about_summary" />
</PreferenceCategory>
</PreferenceScreen>
<SwitchPreference android:title="@string/revanced_hide_album_card_title" android:key="revanced_hide_album_card" android:summaryOn="@string/revanced_hide_album_card_summary_on" android:summaryOff="@string/revanced_hide_album_card_summary_off" />
Expand Down

0 comments on commit 780dd0a

Please sign in to comment.