From 74e45b1820c5f4d7405acb478c619160fe386341 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 18 Dec 2020 18:36:32 +0100 Subject: [PATCH] Quick fix --- app/build.gradle | 2 +- .../fedilabtube/client/PeertubeService.java | 21 +++++++++---------- .../client/RetrofitPeertubeAPI.java | 16 ++++++++++---- .../metadata/android/en-US/changelogs/33.txt | 13 ++++++++++++ 4 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 src/fdroid_full/fastlane/metadata/android/en-US/changelogs/33.txt diff --git a/app/build.gradle b/app/build.gradle index 7931e55..08fac31 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,7 @@ android { minSdkVersion 21 targetSdkVersion 30 - versionCode 32 + versionCode 33 versionName "1.10.2" multiDexEnabled true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/src/main/java/app/fedilab/fedilabtube/client/PeertubeService.java b/app/src/main/java/app/fedilab/fedilabtube/client/PeertubeService.java index 73c7dc1..c704d35 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/client/PeertubeService.java +++ b/app/src/main/java/app/fedilab/fedilabtube/client/PeertubeService.java @@ -188,7 +188,6 @@ public interface PeertubeService { @Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String coun, - @Query("nsfw") boolean nsfwt, @Query("languageOneOf") List languageOneOf); //Overview videos @@ -196,7 +195,7 @@ public interface PeertubeService { Call getOverviewVideos( @Header("Authorization") String credentials, @Query("page") String page, - @Query("nsfw") boolean nsfw, + @Query("nsfw") String nsfw, @Query("languageOneOf") List languageOneOf); //Most liked videos @@ -205,7 +204,7 @@ public interface PeertubeService { @Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count, - @Query("nsfw") boolean nsfw, + @Query("nsfw") String nsfw, @Query("languageOneOf") List languageOneOf); //Trending videos @@ -214,7 +213,7 @@ public interface PeertubeService { @Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count, - @Query("nsfw") boolean nsfw, + @Query("nsfw") String nsfw, @Query("languageOneOf") List languageOneOf); //Recently added videos @@ -223,7 +222,7 @@ public interface PeertubeService { @Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count, - @Query("nsfw") boolean nsfw, + @Query("nsfw") String nsfw, @Query("languageOneOf") List languageOneOf); //Local videos @@ -232,7 +231,7 @@ public interface PeertubeService { @Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count, - @Query("nsfw") boolean nsfw, + @Query("nsfw") String nsfw, @Query("languageOneOf") List languageOneOf); //History @@ -241,7 +240,7 @@ public interface PeertubeService { @Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count, - @Query("nsfw") boolean nsfw, + @Query("nsfw") String nsfw, @Query("startDate") String startDate, @Query("endDate") String endDate ); @@ -257,7 +256,7 @@ public interface PeertubeService { @Query("search") String search, @Query("start") String maxId, @Query("count") String count, - @Query("nsfw") boolean nsfw); + @Query("nsfw") String nsfw); //Search channels @GET("search/video-channels") @@ -275,7 +274,7 @@ public interface PeertubeService { @Query("tagsOneOf") List tagsOneOf, @Query("start") String maxId, @Query("count") String count, - @Query("nsfw") boolean nsfw); + @Query("nsfw") String nsfw); //Get notifications @GET("users/me/notifications") @@ -307,7 +306,7 @@ public interface PeertubeService { @Path("name") String name, @Query("start") String maxId, @Query("count") String count, - @Query("nsfw") boolean nsfw + @Query("nsfw") String nsfw ); @POST("videos/{id}/views") @@ -362,7 +361,7 @@ public interface PeertubeService { @Path("channelHandle") String channelHandle, @Query("start") String maxId, @Query("count") String count, - @Query("nsfw") boolean nsfw); + @Query("nsfw") String nsfw); @POST("video-channels") Call addChannel(@Header("Authorization") String credentials, @Body ChannelParams channelParams); diff --git a/app/src/main/java/app/fedilab/fedilabtube/client/RetrofitPeertubeAPI.java b/app/src/main/java/app/fedilab/fedilabtube/client/RetrofitPeertubeAPI.java index 651eb3f..9efa9ab 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/client/RetrofitPeertubeAPI.java +++ b/app/src/main/java/app/fedilab/fedilabtube/client/RetrofitPeertubeAPI.java @@ -100,7 +100,7 @@ public class RetrofitPeertubeAPI { private final String count; private String token; private Set selection; - private boolean showNSFWVideos = true; + private String showNSFWVideos = "both"; public RetrofitPeertubeAPI(Context context) { _context = context; @@ -110,7 +110,11 @@ public class RetrofitPeertubeAPI { count = String.valueOf(sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE)); String currentSensitive = sharedpreferences.getString(_context.getString(R.string.set_video_sensitive_choice), Helper.BLUR); if (currentSensitive.compareTo(Helper.DO_NOT_LIST) == 0) { - showNSFWVideos = false; + showNSFWVideos = "false"; + } else if (currentSensitive.compareTo(Helper.BLUR) == 0) { + showNSFWVideos = "both"; + } else { + showNSFWVideos = "true"; } } @@ -123,7 +127,11 @@ public class RetrofitPeertubeAPI { count = String.valueOf(sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE)); String currentSensitive = sharedpreferences.getString(_context.getString(R.string.set_video_sensitive_choice), Helper.BLUR); if (currentSensitive.compareTo(Helper.DO_NOT_LIST) == 0) { - showNSFWVideos = false; + showNSFWVideos = "false"; + } else if (currentSensitive.compareTo(Helper.BLUR) == 0) { + showNSFWVideos = "both"; + } else { + showNSFWVideos = "true"; } } @@ -436,7 +444,7 @@ public class RetrofitPeertubeAPI { break; case SUBSCRIBTIONS: if (forAccount == null) { - videoCall = peertubeService.getSubscriptionVideos(getToken(), max_id, count, showNSFWVideos, filter); + videoCall = peertubeService.getSubscriptionVideos(getToken(), max_id, count, filter); } else { videoCall = peertubeService.getChannelVideos(forAccount, max_id, count, showNSFWVideos); } diff --git a/src/fdroid_full/fastlane/metadata/android/en-US/changelogs/33.txt b/src/fdroid_full/fastlane/metadata/android/en-US/changelogs/33.txt new file mode 100644 index 0000000..15217dd --- /dev/null +++ b/src/fdroid_full/fastlane/metadata/android/en-US/changelogs/33.txt @@ -0,0 +1,13 @@ +Added: +- Live stream badge +- Increment view count when watching a video + +Changed: +- Seek bar hidden with lives +- Add a message if the live has not yet started + +Fixed: +- Do not list not honored when no accounts connected +- Comments with replies show overlap +- Mastodon accounts show errors +- Accounts not found issue \ No newline at end of file