Skip to content

Commit

Permalink
feat(YouTube/YT Music - Return YouTube Username): add `Display format…
Browse files Browse the repository at this point in the history
…` setting
  • Loading branch information
inotia00 committed Oct 18, 2024
1 parent 4387c55 commit 828f83a
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/main/resources/music/settings/host/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@
<item>https://github.com/polymorphicshade/Tubular/releases/latest</item>
<item>https://github.com/deniscerri/ytdlnis/releases/latest</item>
</string-array>
<string-array name="revanced_return_youtube_username_display_format_entries">
<item>@string/revanced_return_youtube_username_display_format_username_only</item>
<item>@string/revanced_return_youtube_username_display_format_username_handle</item>
<item>@string/revanced_return_youtube_username_display_format_handle_username</item>
</string-array>
<string-array name="revanced_return_youtube_username_display_format_entry_values">
<item>USERNAME_ONLY</item>
<item>USERNAME_HANDLE</item>
<item>HANDLE_USERNAME</item>
</string-array>
<string-array name="revanced_spoof_app_version_target_entries">
<item>@string/revanced_spoof_app_version_target_entry_6_11_52</item>
<item>@string/revanced_spoof_app_version_target_entry_4_27_53</item>
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/music/settings/host/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ Some features may not work properly in the old player layout."</string>

<string name="revanced_return_youtube_username_enabled_title">Enable Return YouTube Username</string>
<string name="revanced_return_youtube_username_enabled_summary">Replaces handles with usernames in comments.</string>
<string name="revanced_return_youtube_username_display_format_title">Display format</string>
<string name="revanced_return_youtube_username_display_format_summary">Select the username display format.</string>
<string name="revanced_return_youtube_username_display_format_username_only">Username</string>
<string name="revanced_return_youtube_username_display_format_username_handle">Username (@handle)</string>
<string name="revanced_return_youtube_username_display_format_handle_username">@handle (Username)</string>
<string name="revanced_return_youtube_username_youtube_data_api_v3_developer_key_title">YouTube Data API key</string>
<string name="revanced_return_youtube_username_youtube_data_api_v3_developer_key_summary">The developer key for using the YouTube Data API v3.</string>
<string name="revanced_return_youtube_username_youtube_data_api_v3_about_title">About YouTube Data API key</string>
Expand Down
10 changes: 10 additions & 0 deletions src/main/resources/youtube/settings/host/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@
<item>PHONE</item>
<item>TABLET</item>
</string-array>
<string-array name="revanced_return_youtube_username_display_format_entries">
<item>@string/revanced_return_youtube_username_display_format_username_only</item>
<item>@string/revanced_return_youtube_username_display_format_username_handle</item>
<item>@string/revanced_return_youtube_username_display_format_handle_username</item>
</string-array>
<string-array name="revanced_return_youtube_username_display_format_entry_values">
<item>USERNAME_ONLY</item>
<item>USERNAME_HANDLE</item>
<item>HANDLE_USERNAME</item>
</string-array>
<string-array name="revanced_shorts_double_tap_to_like_animation_entries">
<item>@string/revanced_shorts_double_tap_to_like_animation_entry_1</item>
<item>@string/revanced_shorts_double_tap_to_like_animation_entry_2</item>
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/youtube/settings/host/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1489,6 +1489,10 @@ Limitation: Dislikes may not appear if the user is not logged in or in incognito
<string name="revanced_return_youtube_username_enabled_title">Enable Return YouTube Username</string>
<string name="revanced_return_youtube_username_enabled_summary_on">Username is used.</string>
<string name="revanced_return_youtube_username_enabled_summary_off">Handle is used.</string>
<string name="revanced_return_youtube_username_display_format_title">Display format</string>
<string name="revanced_return_youtube_username_display_format_username_only">Username</string>
<string name="revanced_return_youtube_username_display_format_username_handle">Username (@handle)</string>
<string name="revanced_return_youtube_username_display_format_handle_username">@handle (Username)</string>
<string name="revanced_return_youtube_username_youtube_data_api_v3_developer_key_title">YouTube Data API key</string>
<string name="revanced_return_youtube_username_youtube_data_api_v3_developer_key_summary">The developer key for using the YouTube Data API v3.</string>
<string name="revanced_return_youtube_username_youtube_data_api_v3_about_title">About YouTube Data API key</string>
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/youtube/settings/xml/revanced_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@

<!-- SETTINGS: SPOOF_APP_VERSION
<SwitchPreference android:title="@string/revanced_spoof_app_version_title" android:key="revanced_spoof_app_version" android:summaryOn="@string/revanced_spoof_app_version_summary_on" android:summaryOff="@string/revanced_spoof_app_version_summary_off" />
<ListPreference android:title="@string/revanced_spoof_app_version_target_entry_title" android:key="revanced_spoof_app_version_target" android:entries="@array/revanced_spoof_app_version_target_entries" android:entryValues="@array/revanced_spoof_app_version_target_entry_values" />
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:hint="18.17.43" android:title="@string/revanced_spoof_app_version_target_title" android:key="revanced_spoof_app_version_target" android:summary="@string/revanced_spoof_app_version_target_summary" android:inputType="text" android:dependency="revanced_spoof_app_version" />SETTINGS: SPOOF_APP_VERSION -->
<app.revanced.integrations.shared.settings.preference.WideListPreference android:title="@string/revanced_spoof_app_version_target_entry_title" android:key="revanced_spoof_app_version_target" android:entries="@array/revanced_spoof_app_version_target_entries" android:entryValues="@array/revanced_spoof_app_version_target_entry_values" />
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_spoof_app_version_target_title" android:key="revanced_spoof_app_version_target" android:summary="@string/revanced_spoof_app_version_target_summary" android:inputType="text" android:dependency="revanced_spoof_app_version" />SETTINGS: SPOOF_APP_VERSION -->

<!-- PREFERENCE_SCREEN: GENERAL
</PreferenceScreen>PREFERENCE_SCREEN: GENERAL -->
Expand Down Expand Up @@ -667,6 +667,7 @@
<!-- PREFERENCE_SCREEN: RETURN_YOUTUBE_USERNAME
<PreferenceScreen android:title="@string/revanced_preference_screen_return_youtube_username_title" android:key="revanced_preference_screen_return_youtube_username" >
<SwitchPreference android:title="@string/revanced_return_youtube_username_enabled_title" android:key="revanced_return_youtube_username_enabled" android:summaryOn="@string/revanced_return_youtube_username_enabled_summary_on" android:summaryOff="@string/revanced_return_youtube_username_enabled_summary_off" />
<app.revanced.integrations.shared.settings.preference.WideListPreference android:entries="@array/revanced_return_youtube_username_display_format_entries" android:title="@string/revanced_return_youtube_username_display_format_title" android:key="revanced_return_youtube_username_display_format" android:entryValues="@array/revanced_return_youtube_username_display_format_entry_values" android:dependency="revanced_return_youtube_username_enabled" />
<app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference android:title="@string/revanced_return_youtube_username_youtube_data_api_v3_developer_key_title" android:key="revanced_return_youtube_username_youtube_data_api_v3_developer_key" android:summary="@string/revanced_return_youtube_username_youtube_data_api_v3_developer_key_summary" android:dependency="revanced_return_youtube_username_enabled" />
<app.revanced.integrations.youtube.settings.preference.AboutYouTubeDataAPIPreference android:title="@string/revanced_return_youtube_username_youtube_data_api_v3_about_title" android:summary="@string/revanced_return_youtube_username_youtube_data_api_v3_about_summary" />
</PreferenceScreen>PREFERENCE_SCREEN: RETURN_YOUTUBE_USERNAME -->
Expand Down

0 comments on commit 828f83a

Please sign in to comment.