Loading app/src/main/java/app/fedilab/android/activities/MediaActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface { ScreenSlidePagerAdapter mPagerAdapter = new ScreenSlidePagerAdapter(MediaActivity.this); binding.mediaViewpager.setAdapter(mPagerAdapter); binding.mediaViewpager.setSaveEnabled(false); binding.mediaViewpager.setCurrentItem(mediaPosition - 1); binding.haulerView.setOnDragDismissedListener(dragDirection -> ActivityCompat.finishAfterTransition(MediaActivity.this)); registerReceiver(onDownloadComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE)); Loading app/src/main/java/app/fedilab/android/activities/SearchResultTabActivity.java +1 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,7 @@ public class SearchResultTabActivity extends BaseActivity { binding.searchTabLayout.setTabIconTint(ThemeHelper.getColorStateList(SearchResultTabActivity.this)); ScreenSlidePagerAdapter mPagerAdapter = new ScreenSlidePagerAdapter(SearchResultTabActivity.this); binding.searchViewpager.setAdapter(mPagerAdapter); binding.searchViewpager.setSaveEnabled(false); binding.searchViewpager.setOffscreenPageLimit(3); new TabLayoutMediator(binding.searchTabLayout, binding.searchViewpager, (tab, position) -> { Loading app/src/main/java/app/fedilab/android/client/endpoints/MastodonTimelinesService.java +4 −0 Original line number Diff line number Diff line Loading @@ -224,4 +224,8 @@ public interface MastodonTimelinesService { @Query("count") int count ); @GET("api/v1/videos/{id}") Call<PeertubeVideo.Video> getPeertubeVideo( @Path("id") String id ); } app/src/main/java/app/fedilab/android/client/entities/api/Attachment.java +2 −0 Original line number Diff line number Diff line Loading @@ -44,4 +44,6 @@ public class Attachment implements Serializable { @SerializedName("local_path") public String local_path; public String peertubeHost = null; public String peertubeId = null; } app/src/main/java/app/fedilab/android/client/entities/peertube/PeertubeVideo.java +26 −2 Original line number Diff line number Diff line Loading @@ -56,9 +56,11 @@ public class PeertubeVideo implements Serializable { status.account = account; List<Attachment> attachmentList = new ArrayList<>(); Attachment attachment = new Attachment(); attachment.type = "video/mp4"; attachment.type = "video"; attachment.url = "https://" + peertubeVideo.account.host + peertubeVideo.embedPath; attachment.preview_url = "https://" + peertubeVideo.account.host + peertubeVideo.thumbnailPath; attachment.peertubeId = peertubeVideo.uuid; attachment.peertubeHost = peertubeVideo.account.host; attachmentList.add(attachment); status.media_attachments = attachmentList; return status; Loading Loading @@ -111,11 +113,33 @@ public class PeertubeVideo implements Serializable { public Date updatedAt; @SerializedName("uuid") public String uuid; @SerializedName("files") public List<File> files; @SerializedName("views") public int views; } public class File implements Serializable { @SerializedName("fileDownloadUrl") public String fileDownloadUrl; @SerializedName("fileUrl") public String fileUrl; @SerializedName("fps") public int fps; @SerializedName("magnetUri") public String magnetUri; @SerializedName("metadataUrl") public String metadataUrl; @SerializedName("resolution") public Item resolutions; @SerializedName("size") public long size; @SerializedName("torrentDownloadUrl") public String torrentDownloadUrl; @SerializedName("torrentUrl") public String torrentUrl; } public static class PeertubeAccount implements Serializable { @SerializedName("avatar") public Avatar avatar; Loading Loading
app/src/main/java/app/fedilab/android/activities/MediaActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface { ScreenSlidePagerAdapter mPagerAdapter = new ScreenSlidePagerAdapter(MediaActivity.this); binding.mediaViewpager.setAdapter(mPagerAdapter); binding.mediaViewpager.setSaveEnabled(false); binding.mediaViewpager.setCurrentItem(mediaPosition - 1); binding.haulerView.setOnDragDismissedListener(dragDirection -> ActivityCompat.finishAfterTransition(MediaActivity.this)); registerReceiver(onDownloadComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE)); Loading
app/src/main/java/app/fedilab/android/activities/SearchResultTabActivity.java +1 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,7 @@ public class SearchResultTabActivity extends BaseActivity { binding.searchTabLayout.setTabIconTint(ThemeHelper.getColorStateList(SearchResultTabActivity.this)); ScreenSlidePagerAdapter mPagerAdapter = new ScreenSlidePagerAdapter(SearchResultTabActivity.this); binding.searchViewpager.setAdapter(mPagerAdapter); binding.searchViewpager.setSaveEnabled(false); binding.searchViewpager.setOffscreenPageLimit(3); new TabLayoutMediator(binding.searchTabLayout, binding.searchViewpager, (tab, position) -> { Loading
app/src/main/java/app/fedilab/android/client/endpoints/MastodonTimelinesService.java +4 −0 Original line number Diff line number Diff line Loading @@ -224,4 +224,8 @@ public interface MastodonTimelinesService { @Query("count") int count ); @GET("api/v1/videos/{id}") Call<PeertubeVideo.Video> getPeertubeVideo( @Path("id") String id ); }
app/src/main/java/app/fedilab/android/client/entities/api/Attachment.java +2 −0 Original line number Diff line number Diff line Loading @@ -44,4 +44,6 @@ public class Attachment implements Serializable { @SerializedName("local_path") public String local_path; public String peertubeHost = null; public String peertubeId = null; }
app/src/main/java/app/fedilab/android/client/entities/peertube/PeertubeVideo.java +26 −2 Original line number Diff line number Diff line Loading @@ -56,9 +56,11 @@ public class PeertubeVideo implements Serializable { status.account = account; List<Attachment> attachmentList = new ArrayList<>(); Attachment attachment = new Attachment(); attachment.type = "video/mp4"; attachment.type = "video"; attachment.url = "https://" + peertubeVideo.account.host + peertubeVideo.embedPath; attachment.preview_url = "https://" + peertubeVideo.account.host + peertubeVideo.thumbnailPath; attachment.peertubeId = peertubeVideo.uuid; attachment.peertubeHost = peertubeVideo.account.host; attachmentList.add(attachment); status.media_attachments = attachmentList; return status; Loading Loading @@ -111,11 +113,33 @@ public class PeertubeVideo implements Serializable { public Date updatedAt; @SerializedName("uuid") public String uuid; @SerializedName("files") public List<File> files; @SerializedName("views") public int views; } public class File implements Serializable { @SerializedName("fileDownloadUrl") public String fileDownloadUrl; @SerializedName("fileUrl") public String fileUrl; @SerializedName("fps") public int fps; @SerializedName("magnetUri") public String magnetUri; @SerializedName("metadataUrl") public String metadataUrl; @SerializedName("resolution") public Item resolutions; @SerializedName("size") public long size; @SerializedName("torrentDownloadUrl") public String torrentDownloadUrl; @SerializedName("torrentUrl") public String torrentUrl; } public static class PeertubeAccount implements Serializable { @SerializedName("avatar") public Avatar avatar; Loading