Skip to content

Commit

Permalink
Revert VideoState.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
earthonion authored May 19, 2024
1 parent e7d9124 commit 56c8368
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package app.revanced.integrations.youtube.shared



import app.revanced.integrations.shared.Utils;
import app.revanced.integrations.shared.Logger
import app.revanced.integrations.youtube.patches.VideoInformation
import app.revanced.integrations.youtube.patches.CopyVideoUrlPatch;
Expand Down Expand Up @@ -30,17 +29,12 @@ enum class VideoState {
@JvmStatic
fun setFromString(enumName: String) {
val state = nameToVideoState[enumName]
val videoId = VideoInformation.getVideoId()
val videoUrl = "https://youtu.be/$videoId"


if (state == null) {
Logger.printException { "Unknown VideoState encountered: $enumName" }
} else if (currentVideoState != state) {
Logger.printDebug { "VideoState changed to: $state" }
if (enumName == "NEW") {
Logger.printDebug {"VideoUrl changed to: $videoUrl"}
Utils.openUri(Utils.getContext(),videoUrl);
}


currentVideoState = state
}
Expand Down

0 comments on commit 56c8368

Please sign in to comment.