parent
bdd12de34d
commit
6820344750
|
@ -74,6 +74,7 @@ import static app.fedilab.fedilabtube.helper.Helper.peertubeInformation;
|
|||
public class AllPlaylistsActivity extends AppCompatActivity implements PlaylistAdapter.AllPlaylistRemoved {
|
||||
|
||||
|
||||
private static final int PICK_AVATAR = 467;
|
||||
PlaylistAdapter playlistAdapter;
|
||||
private HashMap<Integer, String> privacyToSend;
|
||||
private String idChannel;
|
||||
|
@ -81,7 +82,6 @@ public class AllPlaylistsActivity extends AppCompatActivity implements PlaylistA
|
|||
private Playlist playlistToEdit;
|
||||
private List<ChannelData.Channel> myChannels;
|
||||
private ChannelData.Channel selectedChannel;
|
||||
private static final int PICK_AVATAR = 467;
|
||||
private AddPlaylistBinding bindingDialog;
|
||||
private Uri inputData;
|
||||
private ActivityAllPlaylistBinding binding;
|
||||
|
|
|
@ -111,16 +111,53 @@ public class MainActivity extends AppCompatActivity implements ChromeCastsListen
|
|||
public static UserMe userMe;
|
||||
public static InstanceData.InstanceConfig instanceConfig;
|
||||
public static TypeOfConnection typeOfConnection;
|
||||
public static List<ChromeCast> chromeCasts;
|
||||
public static ChromeCast chromeCast;
|
||||
public static boolean chromecastActivated = false;
|
||||
private DisplayVideosFragment recentFragment, locaFragment, trendingFragment, subscriptionFragment, mostLikedFragment;
|
||||
private DisplayOverviewFragment overviewFragment;
|
||||
private ActivityMainBinding binding;
|
||||
private final BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
|
||||
= item -> {
|
||||
int itemId = item.getItemId();
|
||||
String type = null;
|
||||
if (itemId == R.id.navigation_discover) {
|
||||
setTitleCustom(R.string.title_discover);
|
||||
binding.viewpager.setCurrentItem(0);
|
||||
type = HelperAcadInstance.DISCOVER;
|
||||
} else if (itemId == R.id.navigation_subscription) {
|
||||
binding.viewpager.setCurrentItem(1);
|
||||
setTitleCustom(R.string.subscriptions);
|
||||
type = HelperAcadInstance.SUBSCRIPTIONS;
|
||||
} else if (itemId == R.id.navigation_trending) {
|
||||
setTitleCustom(R.string.title_trending);
|
||||
if (Helper.isLoggedIn(MainActivity.this)) {
|
||||
binding.viewpager.setCurrentItem(2);
|
||||
} else {
|
||||
binding.viewpager.setCurrentItem(1);
|
||||
}
|
||||
type = HelperAcadInstance.TRENDING;
|
||||
} else if (itemId == R.id.navigation_most_liked) {
|
||||
setTitleCustom(R.string.title_most_liked);
|
||||
binding.viewpager.setCurrentItem(2);
|
||||
type = HelperAcadInstance.MOSTLIKED;
|
||||
} else if (itemId == R.id.navigation_recently_added) {
|
||||
setTitleCustom(R.string.title_recently_added);
|
||||
binding.viewpager.setCurrentItem(3);
|
||||
type = HelperAcadInstance.RECENTLY_ADDED;
|
||||
} else if (itemId == R.id.navigation_local) {
|
||||
setTitleCustom(R.string.title_local);
|
||||
binding.viewpager.setCurrentItem(4);
|
||||
type = HelperAcadInstance.LOCAL;
|
||||
}
|
||||
if (type != null) {
|
||||
Matomo.sendScreen(MainActivity.this, "TIMELINE", type);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
private BroadcastReceiver manage_chromecast;
|
||||
public static List<ChromeCast> chromeCasts;
|
||||
public static ChromeCast chromeCast;
|
||||
private VideoData.Video castedTube;
|
||||
|
||||
public static boolean chromecastActivated = false;
|
||||
|
||||
@SuppressLint("ApplySharedPref")
|
||||
public static void showRadioButtonDialogFullInstances(Activity activity, boolean storeInDb) {
|
||||
final SharedPreferences sharedpreferences = activity.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||
|
@ -194,45 +231,6 @@ public class MainActivity extends AppCompatActivity implements ChromeCastsListen
|
|||
}
|
||||
}
|
||||
|
||||
private final BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
|
||||
= item -> {
|
||||
int itemId = item.getItemId();
|
||||
String type = null;
|
||||
if (itemId == R.id.navigation_discover) {
|
||||
setTitleCustom(R.string.title_discover);
|
||||
binding.viewpager.setCurrentItem(0);
|
||||
type = HelperAcadInstance.DISCOVER;
|
||||
} else if (itemId == R.id.navigation_subscription) {
|
||||
binding.viewpager.setCurrentItem(1);
|
||||
setTitleCustom(R.string.subscriptions);
|
||||
type = HelperAcadInstance.SUBSCRIPTIONS;
|
||||
} else if (itemId == R.id.navigation_trending) {
|
||||
setTitleCustom(R.string.title_trending);
|
||||
if (Helper.isLoggedIn(MainActivity.this)) {
|
||||
binding.viewpager.setCurrentItem(2);
|
||||
} else {
|
||||
binding.viewpager.setCurrentItem(1);
|
||||
}
|
||||
type = HelperAcadInstance.TRENDING;
|
||||
} else if (itemId == R.id.navigation_most_liked) {
|
||||
setTitleCustom(R.string.title_most_liked);
|
||||
binding.viewpager.setCurrentItem(2);
|
||||
type = HelperAcadInstance.MOSTLIKED;
|
||||
} else if (itemId == R.id.navigation_recently_added) {
|
||||
setTitleCustom(R.string.title_recently_added);
|
||||
binding.viewpager.setCurrentItem(3);
|
||||
type = HelperAcadInstance.RECENTLY_ADDED;
|
||||
} else if (itemId == R.id.navigation_local) {
|
||||
setTitleCustom(R.string.title_local);
|
||||
binding.viewpager.setCurrentItem(4);
|
||||
type = HelperAcadInstance.LOCAL;
|
||||
}
|
||||
if (type != null) {
|
||||
Matomo.sendScreen(MainActivity.this, "TIMELINE", type);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
@Override
|
||||
public void newChromeCastDiscovered(ChromeCast chromeCast) {
|
||||
if (chromeCasts == null) {
|
||||
|
@ -417,7 +415,6 @@ public class MainActivity extends AppCompatActivity implements ChromeCastsListen
|
|||
});
|
||||
|
||||
|
||||
|
||||
toolbar.setOnClickListener(v -> {
|
||||
if (binding.viewpager.getAdapter() == null) {
|
||||
return;
|
||||
|
@ -939,6 +936,12 @@ public class MainActivity extends AppCompatActivity implements ChromeCastsListen
|
|||
}
|
||||
}
|
||||
|
||||
public enum TypeOfConnection {
|
||||
UNKNOWN,
|
||||
NORMAL,
|
||||
SURFING
|
||||
}
|
||||
|
||||
private class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter {
|
||||
|
||||
ScreenSlidePagerAdapter(FragmentManager fm) {
|
||||
|
@ -983,10 +986,4 @@ public class MainActivity extends AppCompatActivity implements ChromeCastsListen
|
|||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
public enum TypeOfConnection {
|
||||
UNKNOWN,
|
||||
NORMAL,
|
||||
SURFING
|
||||
}
|
||||
}
|
|
@ -235,7 +235,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
|
||||
@Override
|
||||
public void onStreamStarted(Torrent torrent) {
|
||||
startStream(torrent.getVideoFile().getAbsolutePath(), null, autoPlay, -1, null, null, true);
|
||||
startStream(peertube, torrent.getVideoFile().getAbsolutePath(), null, autoPlay, -1, null, null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -961,7 +961,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
binding.loader.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
if (apiResponse.getPeertubes() == null || apiResponse.getPeertubes().get(0) == null || apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this) == null) {
|
||||
if (apiResponse.getPeertubes() == null || apiResponse.getPeertubes().get(0) == null || (!apiResponse.getPeertubes().get(0).isLive() && apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this) == null)) {
|
||||
Toasty.error(PeertubeActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||
binding.loader.setVisibility(View.GONE);
|
||||
return;
|
||||
|
@ -1191,8 +1191,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
binding.doubleTapPlayerView.setPlayer(player);
|
||||
binding.loader.setVisibility(View.GONE);
|
||||
startStream(
|
||||
apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this),
|
||||
apiResponse.getPeertubes().get(0).getStreamingPlaylists().size() > 0 ? apiResponse.getPeertubes().get(0).getStreamingPlaylists().get(0).getPlaylistUrl() : null,
|
||||
apiResponse.getPeertubes().get(0),
|
||||
null,
|
||||
null,
|
||||
autoPlay, position, null, null, true);
|
||||
player.prepare();
|
||||
player.setPlayWhenReady(autoPlay);
|
||||
|
@ -1281,7 +1282,8 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
}
|
||||
|
||||
|
||||
private void stream(String videoURL, String streamingPlaylistsURLS, boolean autoPlay, long position, Uri subtitles, String lang) {
|
||||
private void stream(VideoData.Video video, String resolution, boolean autoPlay, long position, Uri subtitles, String lang) {
|
||||
String videoURL = video.getFileUrl(resolution, PeertubeActivity.this);
|
||||
if (videoURL != null && !videoURL.endsWith("m3u8")) {
|
||||
if (videoURL.endsWith(".torrent")) {
|
||||
torrentStream.startStream(videoURL);
|
||||
|
@ -1320,10 +1322,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (streamingPlaylistsURLS == null && videoURL != null) {
|
||||
streamingPlaylistsURLS = videoURL;
|
||||
}
|
||||
MediaItem mediaItem = new MediaItem.Builder().setUri(Uri.parse(streamingPlaylistsURLS)).build();
|
||||
MediaItem mediaItem = new MediaItem.Builder().setUri(Uri.parse(videoURL)).build();
|
||||
HlsMediaSource hlsMediaSource = new HlsMediaSource.Factory(new DefaultHttpDataSourceFactory(System.getProperty("http.agent")))
|
||||
.createMediaSource(mediaItem);
|
||||
player.setMediaSource(hlsMediaSource);
|
||||
|
@ -1362,10 +1361,15 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
}
|
||||
}
|
||||
|
||||
private void startStream(String videoURL, String streamingPlaylistsURLS, boolean autoPlay, long position, Uri subtitles, String lang, boolean promptNSFW) {
|
||||
private void startStream(VideoData.Video video, String torrentLocal, String resolution, boolean autoPlay, long position, Uri subtitles, String lang, boolean promptNSFW) {
|
||||
|
||||
|
||||
if (peertube != null && peertube.isWaitTranscoding()) {
|
||||
String videoURL;
|
||||
if (torrentLocal != null) {
|
||||
videoURL = torrentLocal;
|
||||
} else {
|
||||
videoURL = peertube.getFileUrl(resolution, PeertubeActivity.this);
|
||||
}
|
||||
if (peertube != null && peertube.isWaitTranscoding() && peertube.isLive()) {
|
||||
View parentLayout = findViewById(android.R.id.content);
|
||||
Snackbar snackbar = Snackbar.make(parentLayout, R.string.live_not_started, Snackbar.LENGTH_INDEFINITE);
|
||||
snackbar.setAction(R.string.close, view -> finish());
|
||||
|
@ -1387,13 +1391,13 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
finish();
|
||||
});
|
||||
dialogBuilder.setPositiveButton(R.string.play, (dialog, id) -> {
|
||||
stream(videoURL, streamingPlaylistsURLS, autoPlay, position, subtitles, lang);
|
||||
stream(video, resolution, autoPlay, position, subtitles, lang);
|
||||
dialog.dismiss();
|
||||
});
|
||||
alertDialog = dialogBuilder.create();
|
||||
alertDialog.show();
|
||||
} else {
|
||||
stream(videoURL, streamingPlaylistsURLS, autoPlay, position, subtitles, lang);
|
||||
stream(video, resolution, autoPlay, position, subtitles, lang);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1621,6 +1625,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
binding.peertubeInformationContainer.setVisibility(View.GONE);
|
||||
|
@ -1773,8 +1778,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
binding.doubleTapPlayerView.setPlayer(player);
|
||||
binding.loader.setVisibility(View.GONE);
|
||||
startStream(
|
||||
peertube.getFileUrl(res, PeertubeActivity.this),
|
||||
peertube.getStreamingPlaylists().size() > 0 ? peertube.getStreamingPlaylists().get(0).getPlaylistUrl() : null,
|
||||
peertube,
|
||||
null,
|
||||
res,
|
||||
true, position, null, null, false);
|
||||
}
|
||||
break;
|
||||
|
@ -1813,7 +1819,8 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
binding.mediaVideo.player(player);
|
||||
binding.doubleTapPlayerView.setPlayer(player);
|
||||
startStream(
|
||||
peertube.getFileUrl(null, PeertubeActivity.this),
|
||||
peertube,
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
newPosition,
|
||||
|
@ -1872,7 +1879,6 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
}
|
||||
|
||||
|
||||
|
||||
public void closeSubMenuMenuOptions() {
|
||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
||||
|
@ -2303,8 +2309,6 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
enum videoOrientation {
|
||||
LANDSCAPE,
|
||||
PORTRAIT
|
||||
|
|
|
@ -37,7 +37,6 @@ import androidx.core.content.ContextCompat;
|
|||
import androidx.documentfile.provider.DocumentFile;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
|
||||
import net.gotev.uploadservice.data.UploadNotificationAction;
|
||||
import net.gotev.uploadservice.data.UploadNotificationConfig;
|
||||
import net.gotev.uploadservice.data.UploadNotificationStatusConfig;
|
||||
|
|
|
@ -160,16 +160,14 @@ public class ShowChannelActivity extends AppCompatActivity {
|
|||
if (accounts != null && accounts.size() > 0) {
|
||||
if (accounts.size() > 1) {
|
||||
final OwnAccountsAdapter accountsListAdapter = new OwnAccountsAdapter(ShowChannelActivity.this, accounts);
|
||||
builderSingle.setAdapter(accountsListAdapter, (dialog, which) -> {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
RetrofitPeertubeAPI peertubeAPI = new RetrofitPeertubeAPI(ShowChannelActivity.this, accounts.get(which).getHost(), accounts.get(which).getToken());
|
||||
peertubeAPI.post(FOLLOW, channel.getAcct(), null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}).start();
|
||||
});
|
||||
builderSingle.setAdapter(accountsListAdapter, (dialog, which) -> new Thread(() -> {
|
||||
try {
|
||||
RetrofitPeertubeAPI peertubeAPI = new RetrofitPeertubeAPI(ShowChannelActivity.this, accounts.get(which).getHost(), accounts.get(which).getToken());
|
||||
peertubeAPI.post(FOLLOW, channel.getAcct(), null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}).start());
|
||||
} else {
|
||||
RetrofitPeertubeAPI peertubeAPI = new RetrofitPeertubeAPI(ShowChannelActivity.this, accounts.get(0).getHost(), accounts.get(0).getToken());
|
||||
peertubeAPI.post(FOLLOW, channel.getAcct(), null);
|
||||
|
@ -362,7 +360,11 @@ public class ShowChannelActivity extends AppCompatActivity {
|
|||
public void manageVIewRelationship(APIResponse apiResponse) {
|
||||
|
||||
if (apiResponse.getError() != null) {
|
||||
Toasty.error(ShowChannelActivity.this, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
||||
if (apiResponse.getError().getError().length() > 500) {
|
||||
Toasty.info(ShowChannelActivity.this, getString(R.string.remote_account), Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
Toasty.error(ShowChannelActivity.this, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.relationship = apiResponse.getRelationships();
|
||||
|
|
|
@ -91,7 +91,7 @@ import retrofit2.Response;
|
|||
import retrofit2.Retrofit;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
|
||||
@SuppressWarnings({"unused", "RedundantSuppression"})
|
||||
@SuppressWarnings({"unused", "RedundantSuppression", "ConstantConditions"})
|
||||
public class RetrofitPeertubeAPI {
|
||||
|
||||
private final String finalUrl;
|
||||
|
@ -177,9 +177,6 @@ public class RetrofitPeertubeAPI {
|
|||
}
|
||||
|
||||
private PeertubeService init() {
|
||||
if (!URLUtil.isValidUrl(finalUrl)) {
|
||||
return null;
|
||||
}
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.baseUrl(finalUrl)
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
|
|
|
@ -197,18 +197,9 @@ public class VideoData {
|
|||
public String getFileUrl(String resolution, Context context) {
|
||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||
int mode = sharedpreferences.getInt(Helper.SET_VIDEO_MODE, Helper.VIDEO_MODE_NORMAL);
|
||||
List<File> files = getAllFile(context);
|
||||
if (files != null && files.size() > 0) {
|
||||
return getFile(context, files, resolution, mode);
|
||||
} else if (streamingPlaylists != null && streamingPlaylists.size() > 0) {
|
||||
List<File> files = new ArrayList<>();
|
||||
for (StreamingPlaylists streamingPlaylists : streamingPlaylists) {
|
||||
if (streamingPlaylists.getFiles().size() > 0) {
|
||||
files.addAll(streamingPlaylists.getFiles());
|
||||
} else {
|
||||
return streamingPlaylists.getPlaylistUrl();
|
||||
}
|
||||
}
|
||||
return getFile(context, files, resolution, mode);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -216,7 +207,7 @@ public class VideoData {
|
|||
public List<File> getAllFile(Context context) {
|
||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||
int mode = sharedpreferences.getInt(Helper.SET_VIDEO_MODE, Helper.VIDEO_MODE_NORMAL);
|
||||
if (files != null) {
|
||||
if (files != null && files.size() > 0) {
|
||||
return files;
|
||||
} else if (streamingPlaylists != null) {
|
||||
List<File> files = new ArrayList<>();
|
||||
|
@ -225,7 +216,7 @@ public class VideoData {
|
|||
}
|
||||
return files;
|
||||
}
|
||||
return null;
|
||||
return files;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ import com.google.gson.annotations.SerializedName;
|
|||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
@SuppressWarnings({"unused", "RedundantSuppression"})
|
||||
public class VideoPlaylistData {
|
||||
|
||||
|
|
|
@ -19,11 +19,14 @@ import android.graphics.Color;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.graphics.ColorUtils;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import app.fedilab.fedilabtube.client.data.ChannelData;
|
||||
import app.fedilab.fedilabtube.databinding.DrawerHorizontalAccountBinding;
|
||||
import app.fedilab.fedilabtube.helper.Helper;
|
||||
|
|
|
@ -75,11 +75,11 @@ public class CommentListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
|||
private final List<Comment> comments;
|
||||
private final CommentListAdapter commentListAdapter;
|
||||
private final boolean isThread;
|
||||
private final String instance;
|
||||
private final boolean sepiaSearch;
|
||||
public AllCommentRemoved allCommentRemoved;
|
||||
boolean isVideoOwner;
|
||||
private Context context;
|
||||
private final String instance;
|
||||
private final boolean sepiaSearch;
|
||||
|
||||
public CommentListAdapter(List<Comment> comments, boolean isVideoOwner, boolean isThread, String instance, boolean sepiaSearch) {
|
||||
this.comments = comments;
|
||||
|
|
|
@ -408,14 +408,6 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||
}
|
||||
}
|
||||
|
||||
public interface RelationShipListener {
|
||||
Map<String, Boolean> getRelationShip();
|
||||
}
|
||||
|
||||
public interface PlaylistListener {
|
||||
Map<String, List<PlaylistExist>> getPlaylist();
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void loadImage(ImageView target, String instance, String urlPreview, String thumbnail, boolean blur) {
|
||||
if (urlPreview == null || urlPreview.startsWith("null")) {
|
||||
|
@ -478,6 +470,14 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||
|
||||
}
|
||||
|
||||
public interface RelationShipListener {
|
||||
Map<String, Boolean> getRelationShip();
|
||||
}
|
||||
|
||||
public interface PlaylistListener {
|
||||
Map<String, List<PlaylistExist>> getPlaylist();
|
||||
}
|
||||
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
DrawerPeertubeBinding binding;
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ import android.view.LayoutInflater;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.PopupMenu;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
|
|
|
@ -68,8 +68,8 @@ import static app.fedilab.fedilabtube.PeertubeUploadActivity.MY_PERMISSIONS_REQU
|
|||
|
||||
public class DisplayChannelsFragment extends Fragment implements ChannelListAdapter.AllChannelRemoved, ChannelListAdapter.EditAlertDialog {
|
||||
|
||||
private Context context;
|
||||
private static final int PICK_AVATAR = 467;
|
||||
private Context context;
|
||||
private ChannelListAdapter channelListAdapter;
|
||||
private List<ChannelData.Channel> channels;
|
||||
private String name;
|
||||
|
|
|
@ -30,7 +30,6 @@ import android.widget.AdapterView;
|
|||
import android.widget.ArrayAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.Toast;
|
||||
|
|
|
@ -325,8 +325,13 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||
if (this.peertubes == null || apiResponse == null || (apiResponse.getError() != null)) {
|
||||
if (apiResponse == null)
|
||||
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||
else {
|
||||
Toasty.error(context, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
||||
else if (apiResponse.getError() != null) {
|
||||
if (apiResponse.getError().getError().length() > 500) {
|
||||
Toasty.info(context, getString(R.string.remote_account), Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
Toasty.error(context, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
}
|
||||
binding.swipeContainer.setRefreshing(false);
|
||||
flag_loading = false;
|
||||
|
@ -437,11 +442,9 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
if (binding.lvVideos != null) {
|
||||
try {
|
||||
binding.lvVideos.setAdapter(null);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
try {
|
||||
binding.lvVideos.setAdapter(null);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ package app.fedilab.fedilabtube.helper;
|
|||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import app.fedilab.fedilabtube.client.data.CommentData;
|
||||
|
||||
public class CommentDecorationHelper {
|
||||
|
|
|
@ -80,7 +80,6 @@ import static android.content.Context.DOWNLOAD_SERVICE;
|
|||
|
||||
public class Helper {
|
||||
|
||||
public static PeertubeInformation peertubeInformation;
|
||||
public static final int RELOAD_MYVIDEOS = 10;
|
||||
public static final String SET_VIDEO_MODE = "set_video_mode";
|
||||
public static final String SET_QUALITY_MODE = "set_quality_mode";
|
||||
|
@ -132,8 +131,7 @@ public class Helper {
|
|||
public static final int VIDEOS_PER_PAGE = 10;
|
||||
public static final String RECEIVE_ACTION = "receive_action";
|
||||
public static final String SET_UNFOLLOW_VALIDATION = "set_unfollow_validation";
|
||||
|
||||
|
||||
public static PeertubeInformation peertubeInformation;
|
||||
|
||||
/**
|
||||
* Convert a date in String -> format yyyy-MM-dd HH:mm:ss
|
||||
|
|
|
@ -24,7 +24,6 @@ import app.fedilab.fedilabtube.BuildConfig;
|
|||
public class HelperInstance {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the instance of the authenticated user
|
||||
*
|
||||
|
|
|
@ -72,7 +72,12 @@ public class AccountsVM extends AndroidViewModel {
|
|||
Context _mContext = getApplication().getApplicationContext();
|
||||
new Thread(() -> {
|
||||
try {
|
||||
RetrofitPeertubeAPI retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext);
|
||||
RetrofitPeertubeAPI retrofitPeertubeAPI;
|
||||
if (acct.split("@").length > 1) {
|
||||
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext, acct.split("@")[1], null);
|
||||
} else {
|
||||
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext);
|
||||
}
|
||||
APIResponse apiResponse = retrofitPeertubeAPI.getAccount(acct);
|
||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
||||
|
|
|
@ -445,4 +445,5 @@
|
|||
<string name="set_video_language_description">Filter videos with different languages</string>
|
||||
<string name="live">Live</string>
|
||||
<string name="live_not_started">This live has not started!</string>
|
||||
<string name="remote_account">Account from another network!</string>
|
||||
</resources>
|
|
@ -1,22 +0,0 @@
|
|||
*Not authenticated mode*
|
||||
|
||||
It's a limited mode where you can do some actions:
|
||||
|
||||
- Switch instance,
|
||||
- Share videos,
|
||||
- Download videos.
|
||||
|
||||
|
||||
*Authenticated mode*
|
||||
|
||||
Many features are available with this mode:
|
||||
|
||||
- Write/delete comments
|
||||
- Upload/remove/edit videos
|
||||
- Manage (create/edit/remove) channels and playlists
|
||||
- Follow/unfollow channels
|
||||
- Thumbs-up/down
|
||||
- Check notifications
|
||||
- Mute/unmute channels
|
||||
- Report videos/accounts
|
||||
- Check your history
|
|
@ -1 +0,0 @@
|
|||
App for all Peertube instances
|
|
@ -1,22 +0,0 @@
|
|||
*Nicht authentifizierter Modus*
|
||||
|
||||
Es handelt sich um einen eingeschränkten Modus, in dem Sie einige Aktionen ausführen können:
|
||||
|
||||
- Instanz wechseln,
|
||||
- Videos teilen,
|
||||
- Videos herunterladen.
|
||||
|
||||
|
||||
*Authentifizierter Modus*
|
||||
|
||||
In diesem Modus sind viele Funktionen verfügbar:
|
||||
|
||||
- Kommentare schreiben/löschen
|
||||
- Videos hochladen/entfernen/bearbeiten
|
||||
- Verwalten (erstellen/bearbeiten/entfernen) von Kanälen und Wiedergabelisten
|
||||
- Kanäle verfolgen/entfolgen
|
||||
- Daumen hoch/runter
|
||||
- Benachrichtigungen prüfen
|
||||
- Kanäle stummschalten/Stummschaltung aufheben
|
||||
- Videos/Accounts melden
|
||||
- Überprüfe deinen Verlauf
|
|
@ -1 +0,0 @@
|
|||
App für alle Peertube Instanzen
|
|
@ -1,22 +0,0 @@
|
|||
*Κατάσταση λειτουργίας χωρίς πιστοποίηση*
|
||||
|
||||
Είναι μια περιορισμένη κατάσταση οπού μπορείτε να κάνετε κάποιες ενέργειες:
|
||||
|
||||
- Αλλαγή υπόστασης,
|
||||
- Κοινοποίηση βίντεο,
|
||||
- Λήψη βίντεο.
|
||||
|
||||
|
||||
*Κατάσταση λειτουργίας με πιστοποίηση*
|
||||
|
||||
Πολλές λειτουργίες είναι διαθέσιμες σε αυτήν την κατάσταση:
|
||||
|
||||
- Δημιουργία/διαγραφή σχολίων
|
||||
- Μεταφόρτωση/αφαίρεση/επεξεργασία βίντεο
|
||||
- Διαχείρηση (δημιουργία/επεξεργασία/αφαίρεση) καναλιών και λιστών αναπαραγωγής
|
||||
- Παρακολούθηση/παύση παρακολούθησης καναλιών
|
||||
- Thumbs-up/down
|
||||
- Έλεγχος ειδοποιήσεων
|
||||
- Σίγαση/αφαίρεση σίγασης καναλιών
|
||||
Αναφορά βίντεο/λογαριασμών
|
||||
- Έλεγχος του ιστορικού σας
|
|
@ -1 +0,0 @@
|
|||
Εφαρμογή για όλες τις υποστάσεις Peertube
|
|
@ -1,15 +0,0 @@
|
|||
Added:
|
||||
- Chromecast support (default disabled)
|
||||
- Detect start time in URLs
|
||||
|
||||
Changed:
|
||||
- Instance picker supports URLs
|
||||
|
||||
Fixed:
|
||||
- Typo
|
||||
- Comment feature when logged out
|
||||
- Full-screen breaks
|
||||
- Crashes with the download button on live streams
|
||||
- Jumps with full-screen and vertical videos
|
||||
- Abuse report notifications clickable
|
||||
- Remote channel subscriptions need twice clicks
|
|
@ -1,16 +0,0 @@
|
|||
Fixes some issues on 1.10.0 (Crashes when adding a playlist + bad behavior when subscribing to remote accounts)
|
||||
Added:
|
||||
- Chromecast support (default disabled)
|
||||
- Detect start time in URLs
|
||||
|
||||
Changed:
|
||||
- Instance picker supports URLs
|
||||
|
||||
Fixed:
|
||||
- Typo
|
||||
- Comment feature when logged out
|
||||
- Full-screen breaks
|
||||
- Crashes with the download button on live streams
|
||||
- Jumps with full-screen and vertical videos
|
||||
- Abuse report notifications clickable
|
||||
- Remote channel subscriptions need twice clicks
|
|
@ -1,22 +0,0 @@
|
|||
*Not authenticated mode*
|
||||
|
||||
It's a limited mode where you can do some actions:
|
||||
|
||||
- Switch instance,
|
||||
- Share videos,
|
||||
- Download videos.
|
||||
|
||||
|
||||
*Authenticated mode*
|
||||
|
||||
Many features are available with this mode:
|
||||
|
||||
- Write/delete comments
|
||||
- Upload/remove/edit videos
|
||||
- Manage (create/edit/remove) channels and playlists
|
||||
- Follow/unfollow channels
|
||||
- Thumbs-up/down
|
||||
- Check notifications
|
||||
- Mute/unmute channels
|
||||
- Report videos/accounts
|
||||
- Check your history
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.0 MiB |
Binary file not shown.
Before Width: | Height: | Size: 139 KiB |
Binary file not shown.
Before Width: | Height: | Size: 892 KiB |
Binary file not shown.
Before Width: | Height: | Size: 67 KiB |
|
@ -1 +0,0 @@
|
|||
App for all Peertube instances
|
|
@ -1 +0,0 @@
|
|||
TubeLab
|
|
@ -1,22 +0,0 @@
|
|||
*Modo no autentificado*
|
||||
|
||||
Es un modo limitado en el que puedes hacer algunas acciones:
|
||||
|
||||
- Cambiar instancia,
|
||||
- Compartir videos,
|
||||
- Descargue videos.
|
||||
|
||||
|
||||
*Modo autenticado*
|
||||
|
||||
Muchas características están disponibles con este modo:
|
||||
|
||||
- Escribir/eliminar comentarios
|
||||
- Subir/quitar/editar videos
|
||||
- Administrar (crear/editar/eliminar) canales y listas de reproducción
|
||||
- Seguir/no seguir los canales
|
||||
- Pulgares arriba/abajo
|
||||
- Revisar las notificaciones
|
||||
- Canales silenciados/no silenciados
|
||||
- Reportar videos/cuentas
|
||||
- Revisa tu historial
|
|
@ -1 +0,0 @@
|
|||
Aplicación para todas las instancias de Peertube
|
|
@ -1,22 +0,0 @@
|
|||
*Mode non authentifié*
|
||||
|
||||
C'est un mode limité où vous pouvez faire certaines actions:
|
||||
|
||||
- Changer d'instance,
|
||||
- Partager des vidéos,
|
||||
- Télécharger les vidéos.
|
||||
|
||||
|
||||
*Mode authentifié*
|
||||
|
||||
De nombreuses fonctionnalités sont disponibles avec ce mode:
|
||||
|
||||
- Rédiger/supprimer des commentaires
|
||||
- Téléverser/supprimer/modifier des vidéos
|
||||
- Gérer (créer/modifier/supprimer) les chaînes et les listes de lecture
|
||||
- Suivre/ne pas suivre les canaux
|
||||
- Pouces vers le haut/vers le bas
|
||||
- Vérifier les notifications
|
||||
- Chaînes muettes/non muettes
|
||||
- Signaler des vidéos/comptes
|
||||
- Vérifiez votre historique
|
|
@ -1 +0,0 @@
|
|||
Application pour toutes les instances de Peertube
|
|
@ -1,22 +0,0 @@
|
|||
*Modalità non autenticata*
|
||||
|
||||
È una modalità limitata in cui è possibile fare alcune azioni:
|
||||
|
||||
- Cambia istanza,
|
||||
- Condivi video,
|
||||
- Scarica video.
|
||||
|
||||
|
||||
*Modalità autenticata*
|
||||
|
||||
Molte funzioni sono disponibili con questa modalità:
|
||||
|
||||
- Scrittura/elimina commenti
|
||||
- Carica/rimuovi/modifica video
|
||||
- Gestisci (crea/modifica/rimuovi) i canali e le playlist
|
||||
- Seguire/non seguire i canali
|
||||
- Pollici su/giù
|
||||
- Controlla le notifiche
|
||||
- Disattivare/disattivare i canali
|
||||
- Segnala video/account
|
||||
- Controlla la tua cronologia
|
|
@ -1 +0,0 @@
|
|||
App per tutti i casi Peertube
|
|
@ -1,22 +0,0 @@
|
|||
*Not authenticated mode*
|
||||
|
||||
It's a limited mode where you can do some actions:
|
||||
|
||||
- Switch instance,
|
||||
- Share videos,
|
||||
- Download videos.
|
||||
|
||||
|
||||
*Authenticated mode*
|
||||
|
||||
Many features are available with this mode:
|
||||
|
||||
- Write/delete comments
|
||||
- Upload/remove/edit videos
|
||||
- Manage (create/edit/remove) channels and playlists
|
||||
- Follow/unfollow channels
|
||||
- Thumbs-up/down
|
||||
- Check notifications
|
||||
- Mute/unmute channels
|
||||
- Report videos/accounts
|
||||
- Check your history
|
|
@ -1 +0,0 @@
|
|||
App for all Peertube instances
|
|
@ -1,22 +0,0 @@
|
|||
*Not authenticated mode*
|
||||
|
||||
It's a limited mode where you can do some actions:
|
||||
|
||||
- Switch instance,
|
||||
- Share videos,
|
||||
- Download videos.
|
||||
|
||||
|
||||
*Authenticated mode*
|
||||
|
||||
Many features are available with this mode:
|
||||
|
||||
- Write/delete comments
|
||||
- Upload/remove/edit videos
|
||||
- Manage (create/edit/remove) channels and playlists
|
||||
- Follow/unfollow channels
|
||||
- Thumbs-up/down
|
||||
- Check notifications
|
||||
- Mute/unmute channels
|
||||
- Report videos/accounts
|
||||
- Check your history
|
|
@ -1 +0,0 @@
|
|||
App for all Peertube instances
|
|
@ -1,22 +0,0 @@
|
|||
*Niet geverifieerde modus*
|
||||
|
||||
Het is een beperkte modus waarin je een aantal acties kunt uitvoeren:
|
||||
|
||||
- Schakel bijvoorbeeld over,
|
||||
- Deel video's,
|
||||
- Download video's.
|
||||
|
||||
|
||||
*Authentieke modus*
|
||||
|
||||
Er zijn veel functies beschikbaar met deze modus:
|
||||
|
||||
- Schrijf/verwijder opmerkingen
|
||||
- Video's uploaden/verwijderen/bewerken
|
||||
- Beheer (aanmaken/bewerken/verwijderen) van kanalen en afspeellijsten
|
||||
- Follow/unfollow channels
|
||||
- Duimen omhoog/omlaag
|
||||
- Meldingen controleren
|
||||
- Mute/unmute kanalen
|
||||
- Rapportagevideo's/rekeningen
|
||||
- Controleer uw geschiedenis
|
|
@ -1 +0,0 @@
|
|||
App voor alle Peertube gevallen
|
|
@ -1,22 +0,0 @@
|
|||
*Tryb bez uwierzytelniania*
|
||||
|
||||
Jest to tryb ograniczony, w którym można wykonywać niektóre czynności:
|
||||
|
||||
- Przełączać sesje,
|
||||
- Udostępniać filmy,
|
||||
- Pobierać filmy.
|
||||
|
||||
|
||||
*Tryb uwierzytelniony*
|
||||
|
||||
W tym trybie dostępnych jest wiele funkcji:
|
||||
|
||||
- Pisanie/Usuwanie komentarzy
|
||||
- Przesyłanie/Usuwanie/Edytowanie filmów
|
||||
- Zarządzanie (tworzenie/edytowanie/usuwanie) kanałami i listami odtwarzania
|
||||
- Obserwowanie kanałów
|
||||
- Kciuki w górę/w dół
|
||||
- Sprawdzanie powiadomień
|
||||
- Wyciszanie kanałów
|
||||
- Zgłaszanie filmów/kont
|
||||
- Sprawdzanie swojej historii
|
|
@ -1 +0,0 @@
|
|||
Aplikacja dla wszystkich instancji PeerTube
|
|
@ -1,22 +0,0 @@
|
|||
*Não autenticado*
|
||||
|
||||
É um modo limitado onde você pode realizar algumas ações:
|
||||
|
||||
- Trocar de instância,
|
||||
- Compartilhar vídeos,
|
||||
- Download de vídeos.
|
||||
|
||||
|
||||
*Modo autenticado*
|
||||
|
||||
Muitas características estão disponíveis com este modo:
|
||||
|
||||
- Escrever/apagar comentários
|
||||
- Upload/remoção/edição de vídeos
|
||||
- Gerenciar (criar/editar/remover) canais e listas de reprodução
|
||||
- Seguir/sempreender os canais
|
||||
- Polegares para cima/baixo
|
||||
- Verificar notificações
|
||||
- Canais de mudo/unmudo
|
||||
- Relatar vídeos/contas
|
||||
- Confira seu histórico
|
|
@ -1 +0,0 @@
|
|||
App for all Peertube instances
|
|
@ -1,22 +0,0 @@
|
|||
*Not authenticated mode*
|
||||
|
||||
It's a limited mode where you can do some actions:
|
||||
|
||||
- Switch instance,
|
||||
- Share videos,
|
||||
- Download videos.
|
||||
|
||||
|
||||
*Authenticated mode*
|
||||
|
||||
Many features are available with this mode:
|
||||
|
||||
- Write/delete comments
|
||||
- Upload/remove/edit videos
|
||||
- Manage (create/edit/remove) channels and playlists
|
||||
- Follow/unfollow channels
|
||||
- Thumbs-up/down
|
||||
- Check notifications
|
||||
- Mute/unmute channels
|
||||
- Report videos/accounts
|
||||
- Check your history
|
|
@ -1 +0,0 @@
|
|||
App for all Peertube instances
|
|
@ -1,22 +0,0 @@
|
|||
*Не аутентифицированный режим*
|
||||
|
||||
Это ограниченный режим, где можно совершить некоторые действия:
|
||||
|
||||
- Переключать экземпляры,
|
||||
- Поделиться видео,
|
||||
- Скачать видео.
|
||||
|
||||
|
||||
*Аутентифицированный режим*
|
||||
|
||||
В этом режиме доступны многие функции:
|
||||
|
||||
- Оставлять/удалять комментарии
|
||||
- Загружать/удалять/редактировать видео
|
||||
- Управлять (создание/редактирование/удаление) каналами и плейлистами
|
||||
- Подписаться/отписаться от каналов
|
||||
- Нравится/не нравится
|
||||
- Проверить уведомления
|
||||
- Отключить/включить каналы
|
||||
- Пожаловаться на видео/аккаунты
|
||||
- История Ваших просмотров
|
|
@ -1 +0,0 @@
|
|||
Приложение для всех серверов Peertube
|
|
@ -1,22 +0,0 @@
|
|||
*Not authenticated mode*
|
||||
|
||||
It's a limited mode where you can do some actions:
|
||||
|
||||
- Switch instance,
|
||||
- Share videos,
|
||||
- Download videos.
|
||||
|
||||
|
||||
*Authenticated mode*
|
||||
|
||||
Many features are available with this mode:
|
||||
|
||||
- Write/delete comments
|
||||
- Upload/remove/edit videos
|
||||
- Manage (create/edit/remove) channels and playlists
|
||||
- Follow/unfollow channels
|
||||
- Thumbs-up/down
|
||||
- Check notifications
|
||||
- Mute/unmute channels
|
||||
- Report videos/accounts
|
||||
- Check your history
|
|
@ -1 +0,0 @@
|
|||
App for all Peertube instances
|
|
@ -1,22 +0,0 @@
|
|||
*游客模式*
|
||||
|
||||
在该模式下, 功能受到限制
|
||||
|
||||
• 切换实例
|
||||
• 分享视频
|
||||
• 下载视频
|
||||
|
||||
|
||||
*登录模式*
|
||||
|
||||
此模式下允许您使用更多的功能:
|
||||
|
||||
• 发布 / 删除评论
|
||||
• 上传 / 删除 / 编辑视频
|
||||
• 创建 / 编辑 / 删除频道与播放列表
|
||||
• 订阅 / 取消订阅频道
|
||||
• 好评/差评
|
||||
• 接收通知
|
||||
• 隐藏/取消隐藏 频道
|
||||
• 报告视频 / 账号
|
||||
• 查看观看历史
|
|
@ -1 +0,0 @@
|
|||
此应用适用于所有Peertube实例
|
|
@ -1,22 +0,0 @@
|
|||
*Not authenticated mode*
|
||||
|
||||
It's a limited mode where you can do some actions:
|
||||
|
||||
- Switch instance,
|
||||
- Share videos,
|
||||
- Download videos.
|
||||
|
||||
|
||||
*Authenticated mode*
|
||||
|
||||
Many features are available with this mode:
|
||||
|
||||
- Write/delete comments
|
||||
- Upload/remove/edit videos
|
||||
- Manage (create/edit/remove) channels and playlists
|
||||
- Follow/unfollow channels
|
||||
- Thumbs-up/down
|
||||
- Check notifications
|
||||
- Mute/unmute channels
|
||||
- Report videos/accounts
|
||||
- Check your history
|
|
@ -1 +0,0 @@
|
|||
App for all Peertube instances
|
Loading…
Reference in New Issue