mirror of
https://framagit.org/tom79/fedilab-tube
synced 2025-02-16 20:10:51 +01:00
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++) {
|
for (int i = 0; i < torrent.getFileNames().length; i++) {
|
||||||
torrent.getTorrentHandle().renameFile(i, torrent.getFileNames()[0].replaceAll("[^a-zA-Z0-9/.-]", "_"));
|
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);
|
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);
|
PlayerControlView controlView = binding.doubleTapPlayerView.findViewById(R.id.exo_controller);
|
||||||
ConstraintLayout torrent_info = controlView.findViewById(R.id.torrent_info);
|
ConstraintLayout torrent_info = controlView.findViewById(R.id.torrent_info);
|
||||||
@ -272,7 +271,6 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||||||
if (sessionManager != null) {
|
if (sessionManager != null) {
|
||||||
long upload = sessionManager.uploadRate();
|
long upload = sessionManager.uploadRate();
|
||||||
long download = sessionManager.downloadRate();
|
long download = sessionManager.downloadRate();
|
||||||
int seeds = sessionManager.maxActiveSeeds();
|
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
dowload_rate.setText(String.format("▼ %s", Helper.rateSize(PeertubeActivity.this, download)));
|
dowload_rate.setText(String.format("▼ %s", Helper.rateSize(PeertubeActivity.this, download)));
|
||||||
upload_rate.setText(String.format("▲ %s", Helper.rateSize(PeertubeActivity.this, upload)));
|
upload_rate.setText(String.format("▲ %s", Helper.rateSize(PeertubeActivity.this, upload)));
|
||||||
@ -280,6 +278,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 0, 1000);
|
}, 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;
|
SingleSampleMediaSource subtitleSource = null;
|
||||||
DataSource.Factory dataSourceFactory = null;
|
DataSource.Factory dataSourceFactory = null;
|
||||||
if (localTorrentUrl != null) {
|
if (localTorrentUrl != null) {
|
||||||
|
|
||||||
java.io.File localFile = new java.io.File(localTorrentUrl);
|
|
||||||
DataSpec dataSpec = new DataSpec(Uri.fromFile(new java.io.File(localTorrentUrl)));
|
DataSpec dataSpec = new DataSpec(Uri.fromFile(new java.io.File(localTorrentUrl)));
|
||||||
FileDataSource fileDataSource = new FileDataSource();
|
FileDataSource fileDataSource = new FileDataSource();
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user