mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +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:
|
||||
case MY_VIDEOS -> videoCall = peertubeService.getMyVideos(getToken(), max_id, count);
|
||||
case ACCOUNT_VIDEOS ->
|
||||
videoCall = peertubeService.getVideosForAccount(forAccount, max_id, count, showNSFWVideos);
|
||||
break;
|
||||
case SUBSCRIBTIONS:
|
||||
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:
|
||||
}
|
||||
case MOST_LIKED ->
|
||||
videoCall = peertubeService.getMostLikedVideos(getToken(), max_id, count, showNSFWVideos, filter);
|
||||
break;
|
||||
case LOCAL:
|
||||
case LOCAL ->
|
||||
videoCall = peertubeService.getLocalVideos(getToken(), max_id, count, showNSFWVideos, filter);
|
||||
break;
|
||||
case TRENDING:
|
||||
case TRENDING ->
|
||||
videoCall = peertubeService.getTrendingVideos(getToken(), max_id, count, showNSFWVideos, filter);
|
||||
break;
|
||||
case HISTORY:
|
||||
case HISTORY ->
|
||||
videoCall = peertubeService.getHistory(getToken(), max_id, count, showNSFWVideos, null, null);
|
||||
break;
|
||||
case RECENT:
|
||||
case RECENT ->
|
||||
videoCall = peertubeService.getRecentlyAddedVideos(getToken(), max_id, count, showNSFWVideos, filter);
|
||||
break;
|
||||
}
|
||||
if (videoCall != null) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue