Skip to content

Commit

Permalink
Fix(): Update VideoState.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
earthonion authored May 19, 2024
1 parent c0690b4 commit 8e8227d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ 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 (state == NEW) {
Logger.printDebug {"VideoUrl changed to: $videoUrl"}
CopyVideoUrlPatch.copyUrl(true);
}

Expand Down

0 comments on commit 8e8227d

Please sign in to comment.