Some fixes
This commit is contained in:
parent
325a239b86
commit
1cddf26c9a
|
@ -166,8 +166,8 @@ dependencies {
|
|||
|
||||
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
|
||||
implementation 'com.github.GrenderG:Toasty:1.4.2'
|
||||
implementation 'com.google.android.exoplayer:exoplayer:2.12.1'
|
||||
implementation 'com.google.android.exoplayer:extension-mediasession:2.12.1'
|
||||
implementation 'com.google.android.exoplayer:exoplayer:2.12.2'
|
||||
implementation 'com.google.android.exoplayer:extension-mediasession:2.12.2'
|
||||
implementation "com.github.mabbas007:TagsEditText:1.0.5"
|
||||
implementation "com.github.bumptech.glide:glide:4.11.0"
|
||||
annotationProcessor "com.github.bumptech.glide:compiler:4.11.0"
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
tools:ignore="ScopedStorage" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
|
|
|
@ -1318,11 +1318,11 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
}
|
||||
|
||||
|
||||
private void stream(VideoData.Video video, String resolution, boolean autoPlay, long position, Uri subtitles, String lang) {
|
||||
String videoURL = video.getFileUrl(resolution, PeertubeActivity.this);
|
||||
private void stream(VideoData.Video video, String localTorrentUrl, String resolution, boolean autoPlay, long position, Uri subtitles, String lang) {
|
||||
String videoURL = localTorrentUrl == null ? video.getFileUrl(resolution, PeertubeActivity.this) : localTorrentUrl;
|
||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
||||
int video_cache = sharedpreferences.getInt(Helper.SET_VIDEO_CACHE, Helper.DEFAULT_VIDEO_CACHE_MB);
|
||||
if (videoURL != null && videoURL.endsWith(".torrent")) {
|
||||
if (videoURL != null && (videoURL.endsWith(".torrent") || videoURL.startsWith("magnet"))) {
|
||||
torrentStream.startStream(videoURL);
|
||||
return;
|
||||
} else {
|
||||
|
@ -1438,13 +1438,13 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
finish();
|
||||
});
|
||||
dialogBuilder.setPositiveButton(R.string.play, (dialog, id) -> {
|
||||
stream(video, resolution, autoPlay, position, subtitles, lang);
|
||||
stream(video, null, resolution, autoPlay, position, subtitles, lang);
|
||||
dialog.dismiss();
|
||||
});
|
||||
alertDialog = dialogBuilder.create();
|
||||
alertDialog.show();
|
||||
} else {
|
||||
stream(video, resolution, autoPlay, position, subtitles, lang);
|
||||
stream(video, torrentLocal, resolution, autoPlay, position, subtitles, lang);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue