diff --git a/app/src/main/java/app/fedilab/fedilabtube/activities/PeertubeActivity.java b/app/src/main/java/app/fedilab/fedilabtube/activities/PeertubeActivity.java index e38a949..389e626 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/activities/PeertubeActivity.java +++ b/app/src/main/java/app/fedilab/fedilabtube/activities/PeertubeActivity.java @@ -55,7 +55,6 @@ import android.text.TextPaint; import android.text.method.LinkMovementMethod; import android.text.style.ClickableSpan; import android.util.DisplayMetrics; -import android.util.Log; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.MotionEvent; @@ -1194,7 +1193,6 @@ public class PeertubeActivity extends BasePeertubeActivity implements CommentLis */ private void stream(VideoData.Video video, String resolution, boolean autoPlay, long position, Uri subtitles, String lang) { videoURL = video.getFileUrl(resolution, PeertubeActivity.this); - Log.v(Helper.TAG,">>>>>>>>videoURL: " + videoURL ); if (subtitles != null) { subtitlesStr = subtitles.toString(); } @@ -1203,7 +1201,7 @@ public class PeertubeActivity extends BasePeertubeActivity implements CommentLis ProgressiveMediaSource videoSource = null; HlsMediaSource hlsMediaSource = null; SingleSampleMediaSource subtitleSource = null; - DataSource.Factory dataSourceFactory = null; + DataSource.Factory dataSourceFactory; if (video_cache == 0 || video.isLive()) { dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this, Util.getUserAgent(PeertubeActivity.this, null), null); diff --git a/app/src/main/java/app/fedilab/fedilabtube/client/data/VideoData.java b/app/src/main/java/app/fedilab/fedilabtube/client/data/VideoData.java index 0610c1b..82290e1 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/client/data/VideoData.java +++ b/app/src/main/java/app/fedilab/fedilabtube/client/data/VideoData.java @@ -19,7 +19,6 @@ import android.content.Context; import android.content.SharedPreferences; import android.os.Parcel; import android.os.Parcelable; -import android.util.Log; import com.google.gson.annotations.SerializedName; @@ -230,42 +229,14 @@ public class VideoData { if (resolution != null) { for (File file : files) { if (file.getResolutions().getLabel().compareTo(resolution) == 0) { - if (mode == Helper.VIDEO_MODE_MAGNET) { - if (file.getMagnetUri() != null) { - return file.getMagnetUri(); - } else { - return file.getFileUrl(); - } - } else if (mode == Helper.VIDEO_MODE_TORRENT) { - if (file.getTorrentUrl() != null) { - return file.getTorrentUrl(); - } else { - return file.getFileUrl(); - } - } else { - return file.getFileUrl(); - } + return file.getFileUrl(); } } } File file = Helper.defaultFile(context, files); if (file != null) { - if (mode == Helper.VIDEO_MODE_MAGNET) { - if (file.getMagnetUri() != null) { - return file.getMagnetUri(); - } else { - return file.getFileUrl(); - } - } else if (mode == Helper.VIDEO_MODE_TORRENT) { - if (file.getTorrentUrl() != null) { - return file.getTorrentUrl(); - } else { - return file.getFileUrl(); - } - } else { - return file.getFileUrl(); - } + return file.getFileUrl(); } else { return null; }