Some changes
This commit is contained in:
parent
5c27292543
commit
8a8a433023
|
@ -257,7 +257,6 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
for (int i = 0; i < torrent.getFileNames().length; i++) {
|
||||
torrent.getTorrentHandle().renameFile(i, torrent.getFileNames()[0].replaceAll("[^a-zA-Z0-9/.-]", "_"));
|
||||
}
|
||||
}
|
||||
startStream(peertube, torrent.getVideoFile().getAbsolutePath().replaceAll("[^a-zA-Z0-9/.-]", "_"), null, autoPlay, -1, null, null, true);
|
||||
PlayerControlView controlView = binding.doubleTapPlayerView.findViewById(R.id.exo_controller);
|
||||
ConstraintLayout torrent_info = controlView.findViewById(R.id.torrent_info);
|
||||
|
@ -272,7 +271,6 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
if (sessionManager != null) {
|
||||
long upload = sessionManager.uploadRate();
|
||||
long download = sessionManager.downloadRate();
|
||||
int seeds = sessionManager.maxActiveSeeds();
|
||||
runOnUiThread(() -> {
|
||||
dowload_rate.setText(String.format("▼ %s", Helper.rateSize(PeertubeActivity.this, download)));
|
||||
upload_rate.setText(String.format("▲ %s", Helper.rateSize(PeertubeActivity.this, upload)));
|
||||
|
@ -280,6 +278,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
}
|
||||
}
|
||||
}, 0, 1000);
|
||||
} else {
|
||||
Toasty.error(PeertubeActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1381,8 +1382,6 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
SingleSampleMediaSource subtitleSource = null;
|
||||
DataSource.Factory dataSourceFactory = null;
|
||||
if (localTorrentUrl != null) {
|
||||
|
||||
java.io.File localFile = new java.io.File(localTorrentUrl);
|
||||
DataSpec dataSpec = new DataSpec(Uri.fromFile(new java.io.File(localTorrentUrl)));
|
||||
FileDataSource fileDataSource = new FileDataSource();
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue