Quick fix

This commit is contained in:
Thomas 2020-12-18 18:36:32 +01:00
parent 0a1336f0e0
commit 74e45b1820
4 changed files with 36 additions and 16 deletions

View File

@ -9,7 +9,7 @@ android {
minSdkVersion 21
targetSdkVersion 30
versionCode 32
versionCode 33
versionName "1.10.2"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@ -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<String> languageOneOf);
//Overview videos
@ -196,7 +195,7 @@ public interface PeertubeService {
Call<OverviewVideo> getOverviewVideos(
@Header("Authorization") String credentials,
@Query("page") String page,
@Query("nsfw") boolean nsfw,
@Query("nsfw") String nsfw,
@Query("languageOneOf") List<String> 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<String> 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<String> 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<String> 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<String> 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<String> 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<ChannelData.ChannelCreation> addChannel(@Header("Authorization") String credentials, @Body ChannelParams channelParams);

View File

@ -100,7 +100,7 @@ public class RetrofitPeertubeAPI {
private final String count;
private String token;
private Set<String> 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);
}

View File

@ -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