Skip to content

Commit ce71940

Browse files
authored
Long click source to copy URL (#1638)
1 parent f5cd549 commit ce71940

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ import com.lagradost.cloudstream3.utils.Qualities
101101
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showDialog
102102
import com.lagradost.cloudstream3.utils.SubtitleHelper.fromTwoLettersToLanguage
103103
import com.lagradost.cloudstream3.utils.SubtitleHelper.languages
104+
import com.lagradost.cloudstream3.utils.UIHelper.clipboardHelper
104105
import com.lagradost.cloudstream3.utils.UIHelper.colorFromAttribute
105106
import com.lagradost.cloudstream3.utils.UIHelper.dismissSafe
106107
import com.lagradost.cloudstream3.utils.UIHelper.hideSystemUI
@@ -1153,6 +1154,15 @@ class GeneratorPlayer : FullScreenPlayer() {
11531154
sourceIndex = which
11541155
providerList.setItemChecked(which, true)
11551156
}
1157+
1158+
providerList.setOnItemLongClickListener { _, _, position, _ ->
1159+
sortedUrls.getOrNull(position)?.first?.url?.let {
1160+
clipboardHelper(txt(R.string.video_source),
1161+
it
1162+
)
1163+
}
1164+
true
1165+
}
11561166
}
11571167
}
11581168

0 commit comments

Comments
 (0)