mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 08:40:03 +02:00
Fix Peertube local timelines
This commit is contained in:
parent
5692573d9c
commit
fec7039fbe
2 changed files with 16 additions and 24 deletions
|
@ -242,7 +242,7 @@ public interface PeertubeService {
|
|||
@Query("languageOneOf") List<String> languageOneOf);
|
||||
|
||||
//Local videos
|
||||
@GET("videos?sort=-publishedAt&filter=local")
|
||||
@GET("videos?sort=-publishedAt&isLocal=true")
|
||||
Call<VideoData> getLocalVideos(
|
||||
@Header("Authorization") String credentials,
|
||||
@Query("start") String maxId,
|
||||
|
|
|
@ -516,34 +516,26 @@ public class RetrofitPeertubeAPI {
|
|||
Call<VideoData> videoCall = null;
|
||||
ArrayList<String> filter = selection != null ? new ArrayList<>(selection) : null;
|
||||
switch (timelineType) {
|
||||
case MY_VIDEOS:
|
||||
videoCall = peertubeService.getMyVideos(getToken(), max_id, count);
|
||||
break;
|
||||
case ACCOUNT_VIDEOS:
|
||||
videoCall = peertubeService.getVideosForAccount(forAccount, max_id, count, showNSFWVideos);
|
||||
break;
|
||||
case SUBSCRIBTIONS:
|
||||
case MY_VIDEOS -> videoCall = peertubeService.getMyVideos(getToken(), max_id, count);
|
||||
case ACCOUNT_VIDEOS ->
|
||||
videoCall = peertubeService.getVideosForAccount(forAccount, max_id, count, showNSFWVideos);
|
||||
case SUBSCRIBTIONS -> {
|
||||
if (forAccount == null) {
|
||||
videoCall = peertubeService.getSubscriptionVideos(getToken(), max_id, count, filter);
|
||||
} else {
|
||||
videoCall = peertubeService.getChannelVideos(forAccount, max_id, count, showNSFWVideos);
|
||||
}
|
||||
break;
|
||||
case MOST_LIKED:
|
||||
videoCall = peertubeService.getMostLikedVideos(getToken(), max_id, count, showNSFWVideos, filter);
|
||||
break;
|
||||
case LOCAL:
|
||||
videoCall = peertubeService.getLocalVideos(getToken(), max_id, count, showNSFWVideos, filter);
|
||||
break;
|
||||
case TRENDING:
|
||||
videoCall = peertubeService.getTrendingVideos(getToken(), max_id, count, showNSFWVideos, filter);
|
||||
break;
|
||||
case HISTORY:
|
||||
videoCall = peertubeService.getHistory(getToken(), max_id, count, showNSFWVideos, null, null);
|
||||
break;
|
||||
case RECENT:
|
||||
videoCall = peertubeService.getRecentlyAddedVideos(getToken(), max_id, count, showNSFWVideos, filter);
|
||||
break;
|
||||
}
|
||||
case MOST_LIKED ->
|
||||
videoCall = peertubeService.getMostLikedVideos(getToken(), max_id, count, showNSFWVideos, filter);
|
||||
case LOCAL ->
|
||||
videoCall = peertubeService.getLocalVideos(getToken(), max_id, count, showNSFWVideos, filter);
|
||||
case TRENDING ->
|
||||
videoCall = peertubeService.getTrendingVideos(getToken(), max_id, count, showNSFWVideos, filter);
|
||||
case HISTORY ->
|
||||
videoCall = peertubeService.getHistory(getToken(), max_id, count, showNSFWVideos, null, null);
|
||||
case RECENT ->
|
||||
videoCall = peertubeService.getRecentlyAddedVideos(getToken(), max_id, count, showNSFWVideos, filter);
|
||||
}
|
||||
if (videoCall != null) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue