diff --git a/app/src/main/java/ani/dantotsu/media/MediaInfoFragment.kt b/app/src/main/java/ani/dantotsu/media/MediaInfoFragment.kt
index 82538c86..8b447d50 100644
--- a/app/src/main/java/ani/dantotsu/media/MediaInfoFragment.kt
+++ b/app/src/main/java/ani/dantotsu/media/MediaInfoFragment.kt
@@ -3,6 +3,7 @@ package ani.dantotsu.media
import android.animation.ObjectAnimator
import android.annotation.SuppressLint
import android.content.Intent
+import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.os.CountDownTimer
@@ -73,6 +74,15 @@ class MediaInfoFragment : Fragment() {
model.getMedia().observe(viewLifecycleOwner) { media ->
if (media != null && !loaded) {
loaded = true
+
+ //Youtube
+ if (media.anime!!.youtube != null && PrefManager.getVal(PrefName.ShowYtButton)) {
+ binding.animeSourceYT.visibility = View.VISIBLE
+ binding.animeSourceYT.setOnClickListener {
+ val intent = Intent(Intent.ACTION_VIEW, Uri.parse(media.anime.youtube))
+ requireContext().startActivity(intent)
+ }
+ }
binding.mediaInfoProgressBar.visibility = View.GONE
binding.mediaInfoContainer.visibility = View.VISIBLE
binding.mediaInfoName.text = "\t\t\t" + (media.name ?: media.nameRomaji)
@@ -504,16 +514,6 @@ class MediaInfoFragment : Fragment() {
)
parent.addView(bind.root)
}
- // Comments Section
- if (!offline) {
- val bind = FragmentCommentsBinding.inflate(
- LayoutInflater.from(context),
- parent,
- false
- )
- bind.commentsList.adapter // rebel take over
- parent.addView(bind.root)
- }
}
}
diff --git a/app/src/main/res/layout/fragment_media_info.xml b/app/src/main/res/layout/fragment_media_info.xml
index 96e7bbb9..2b4c2906 100644
--- a/app/src/main/res/layout/fragment_media_info.xml
+++ b/app/src/main/res/layout/fragment_media_info.xml
@@ -42,6 +42,26 @@
android:visibility="gone"
tools:visibility="visible">
+
+