Skip to content

Commit

Permalink
fix(youtube/default-video-quality): default video quality is not appl…
Browse files Browse the repository at this point in the history
…ied at cold start
  • Loading branch information
inotia00 authored and YT-Advanced committed Sep 14, 2023
1 parent ae06785 commit 517e86f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility
import app.revanced.patches.youtube.utils.fingerprints.NewFlyoutPanelOnClickListenerFingerprint
import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch
import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch.Companion.contexts
import app.revanced.patches.youtube.utils.videoid.general.patch.VideoIdPatch
import app.revanced.patches.youtube.utils.videoid.withoutshorts.patch.VideoIdWithoutShortsPatch
import app.revanced.patches.youtube.video.quality.fingerprints.NewVideoQualityChangedFingerprint
import app.revanced.patches.youtube.video.quality.fingerprints.VideoQualityReferenceFingerprint
Expand All @@ -33,6 +34,7 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
@Description("Adds ability to set default video quality settings.")
@DependsOn(
[
VideoIdPatch::class,
VideoIdWithoutShortsPatch::class,
SettingsPatch::class
]
Expand Down Expand Up @@ -116,6 +118,7 @@ class VideoQualityPatch : BytecodePatch(
)
} ?: throw VideoQualitySettingsParentFingerprint.exception

VideoIdPatch.onCreateHook(INTEGRATIONS_VIDEO_QUALITY_CLASS_DESCRIPTOR, "newVideoStarted")
VideoIdWithoutShortsPatch.injectCall("$INTEGRATIONS_VIDEO_QUALITY_CLASS_DESCRIPTOR->newVideoStarted(Ljava/lang/String;)V")

/**
Expand Down

0 comments on commit 517e86f

Please sign in to comment.