diff --git a/src/main/kotlin/app/revanced/patches/youtube/alternativethumbnails/general/AlternativeThumbnailsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/alternativethumbnails/general/AlternativeThumbnailsPatch.kt index 5e3aebf43..f282cedfc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/alternativethumbnails/general/AlternativeThumbnailsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/alternativethumbnails/general/AlternativeThumbnailsPatch.kt @@ -15,6 +15,8 @@ import app.revanced.patches.youtube.alternativethumbnails.general.fingerprints.c import app.revanced.patches.youtube.alternativethumbnails.general.fingerprints.cronet.request.callback.OnSucceededFingerprint import app.revanced.patches.youtube.utils.integrations.Constants.ALTERNATIVE_THUMBNAILS_CLASS_DESCRIPTOR import app.revanced.patches.youtube.utils.integrations.Constants.COMPATIBLE_PACKAGE +import app.revanced.patches.youtube.utils.navigation.NavigationBarHookPatch +import app.revanced.patches.youtube.utils.playertype.PlayerTypeHookPatch import app.revanced.patches.youtube.utils.settings.SettingsPatch import app.revanced.util.patch.BaseBytecodePatch import app.revanced.util.resultOrThrow @@ -29,7 +31,11 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod object AlternativeThumbnailsPatch : BaseBytecodePatch( name = "Alternative thumbnails", description = "Adds options to replace video thumbnails using the DeArrow API or image captures from the video.", - dependencies = setOf(SettingsPatch::class), + dependencies = setOf( + NavigationBarHookPatch::class, + PlayerTypeHookPatch::class, + SettingsPatch::class, + ), compatiblePackages = COMPATIBLE_PACKAGE, fingerprints = setOf( MessageDigestImageUrlParentFingerprint, diff --git a/src/main/resources/youtube/settings/host/values/arrays.xml b/src/main/resources/youtube/settings/host/values/arrays.xml index 3e2bddf01..cd31943e3 100644 --- a/src/main/resources/youtube/settings/host/values/arrays.xml +++ b/src/main/resources/youtube/settings/host/values/arrays.xml @@ -1,14 +1,26 @@ - + + @string/revanced_alt_thumbnail_options_entry_1 + @string/revanced_alt_thumbnail_options_entry_2 + @string/revanced_alt_thumbnail_options_entry_3 + @string/revanced_alt_thumbnail_options_entry_4 + + + ORIGINAL + DEARROW + DEARROW_STILL_IMAGES + STILL_IMAGES + + @string/revanced_alt_thumbnail_stills_time_entry_1 @string/revanced_alt_thumbnail_stills_time_entry_2 @string/revanced_alt_thumbnail_stills_time_entry_3 - 1 - 2 - 3 + BEGINNING + MIDDLE + END @string/revanced_change_start_page_entry_default diff --git a/src/main/resources/youtube/settings/host/values/strings.xml b/src/main/resources/youtube/settings/host/values/strings.xml index 0f6a9cfe2..080a731aa 100644 --- a/src/main/resources/youtube/settings/host/values/strings.xml +++ b/src/main/resources/youtube/settings/host/values/strings.xml @@ -44,45 +44,35 @@ Alternative thumbnails - Thumbnails in use - "Showing DeArrow thumbnails. -If a video has no DeArrow thumbnails then the original YouTube thumbnails are shown." - "Showing DeArrow thumbnails. -If a video has no DeArrow thumbnails then still video captures are shown." - Showing original YouTube thumbnails. - Showing still video captures. + Home tab + Subscriptions tab + You tab + Player playlists, recommendations + Search results + Original thumbnails + DeArrow & Original thumbnails + DeArrow & Still captures + Still captures + DeArrow + "DeArrow provides crowd-sourced thumbnails for YouTube videos. These thumbnails are often more relevant than those provided by YouTube. - - DeArrow - Enable DeArrow thumbnails - Using DeArrow thumbnails. - Not using DeArrow thumbnails. +If enabled, video URLs will be sent to the API server and no other data is sent. If a video does not have DeArrow thumbnails, then the original or still captures are shown. + +Tap here to learn more about DeArrow." Show a toast if API is not available Toast is shown if DeArrow is not available. Toast is not shown if DeArrow is not available. DeArrow API endpoint - "The URL of the DeArrow thumbnail cache endpoint. Do not change this unless you know what you're doing." - About DeArrow - "DeArrow provides crowd-sourced thumbnails for YouTube videos. These thumbnails are often more relevant than those provided by YouTube. If enabled, video URLs will be sent to the API server and no other data is sent. - -Tap here to learn more about DeArrow." - - - Still video captures - Enable still video captures - Using YouTube still video captures. - Not using YouTube still video captures. - Video time to take the still from + The URL of the DeArrow thumbnail cache endpoint. + Still video captures + Still captures are taken from the beginning / middle / end of each video. These images are built into YouTube and no external API is used. + Use fast still captures + Using medium quality still captures. Thumbnails will load faster, but live streams, unreleased, or very old videos may show blank thumbnails. + Using high quality still captures. + Video time to take still captures from Beginning of video Middle of video End of video - Use fast still captures - Using medium quality still captures. Thumbnails will load faster, but live streams, unreleased, and very old videos may show blank thumbnails. - Using high quality still captures. - About still video captures - Still captures are taken from the beginning / middle / end of each video. These images are built into YouTube and no external API is used. - - DeArrow temporarily not available. (status code: %s) DeArrow temporarily not available. diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index 5e27d5a09..8edd89cd6 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -18,21 +18,17 @@