diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/FetchGfycatOrRedgifsVideoLinks.java b/app/src/main/java/eu/toldi/infinityforlemmy/FetchGfycatOrRedgifsVideoLinks.java deleted file mode 100644 index c641c7d4..00000000 --- a/app/src/main/java/eu/toldi/infinityforlemmy/FetchGfycatOrRedgifsVideoLinks.java +++ /dev/null @@ -1,129 +0,0 @@ -package eu.toldi.infinityforlemmy; - -import android.os.Handler; - -import org.json.JSONException; -import org.json.JSONObject; - -import java.io.IOException; -import java.util.concurrent.Executor; - -import eu.toldi.infinityforlemmy.apis.GfycatAPI; -import eu.toldi.infinityforlemmy.apis.RedgifsAPI; -import eu.toldi.infinityforlemmy.utils.JSONUtils; -import retrofit2.Call; -import retrofit2.Response; -import retrofit2.Retrofit; - -public class FetchGfycatOrRedgifsVideoLinks { - - public interface FetchGfycatOrRedgifsVideoLinksListener { - void success(String webm, String mp4); - void failed(int errorCode); - } - - public static void fetchGfycatVideoLinks(Executor executor, Handler handler, Retrofit gfycatRetrofit, - String gfycatId, - FetchGfycatOrRedgifsVideoLinksListener fetchGfycatOrRedgifsVideoLinksListener) { - executor.execute(() -> { - try { - Response response = gfycatRetrofit.create(GfycatAPI.class).getGfycatData(gfycatId).execute(); - if (response.isSuccessful()) { - parseGfycatVideoLinks(handler, response.body(), fetchGfycatOrRedgifsVideoLinksListener); - } else { - handler.post(() -> fetchGfycatOrRedgifsVideoLinksListener.failed(response.code())); - } - } catch (IOException e) { - e.printStackTrace(); - handler.post(() -> fetchGfycatOrRedgifsVideoLinksListener.failed(-1)); - } - }); - } - - public static void fetchRedgifsVideoLinks(Executor executor, Handler handler, Retrofit redgifsRetrofit, - String gfycatId, - FetchGfycatOrRedgifsVideoLinksListener fetchGfycatOrRedgifsVideoLinksListener) { - executor.execute(() -> { - try { - Response response = redgifsRetrofit.create(RedgifsAPI.class).getRedgifsData(gfycatId).execute(); - if (response.isSuccessful()) { - parseRedgifsVideoLinks(handler, response.body(), fetchGfycatOrRedgifsVideoLinksListener); - } else { - handler.post(() -> fetchGfycatOrRedgifsVideoLinksListener.failed(response.code())); - } - } catch (IOException e) { - e.printStackTrace(); - handler.post(() -> fetchGfycatOrRedgifsVideoLinksListener.failed(-1)); - } - }); - } - - public static void fetchGfycatOrRedgifsVideoLinksInRecyclerViewAdapter(Executor executor, Handler handler, - Call gfycatCall, - boolean isGfycatVideo, - boolean automaticallyTryRedgifs, - FetchGfycatOrRedgifsVideoLinksListener fetchGfycatOrRedgifsVideoLinksListener) { - executor.execute(() -> { - try { - Response response = gfycatCall.execute(); - if (response.isSuccessful()) { - if (isGfycatVideo) { - parseGfycatVideoLinks(handler, response.body(), fetchGfycatOrRedgifsVideoLinksListener); - } else { - parseRedgifsVideoLinks(handler, response.body(), fetchGfycatOrRedgifsVideoLinksListener); - } - } else { - if (response.code() == 404 && isGfycatVideo && automaticallyTryRedgifs) { - fetchGfycatOrRedgifsVideoLinksInRecyclerViewAdapter(executor, handler, gfycatCall.clone(), - false, false, fetchGfycatOrRedgifsVideoLinksListener); - } else { - handler.post(() -> fetchGfycatOrRedgifsVideoLinksListener.failed(response.code())); - } - } - } catch (IOException e) { - e.printStackTrace(); - handler.post(() -> fetchGfycatOrRedgifsVideoLinksListener.failed(-1)); - } - }); - } - - private static void parseGfycatVideoLinks(Handler handler, String response, - FetchGfycatOrRedgifsVideoLinksListener fetchGfycatOrRedgifsVideoLinksListener) { - try { - JSONObject jsonObject = new JSONObject(response); - String mp4 = jsonObject.getJSONObject(JSONUtils.GFY_ITEM_KEY).has(JSONUtils.MP4_URL_KEY) ? - jsonObject.getJSONObject(JSONUtils.GFY_ITEM_KEY).getString(JSONUtils.MP4_URL_KEY) - : jsonObject.getJSONObject(JSONUtils.GFY_ITEM_KEY) - .getJSONObject(JSONUtils.CONTENT_URLS_KEY) - .getJSONObject(JSONUtils.MP4_KEY) - .getString(JSONUtils.URL_KEY); - String webm; - if (jsonObject.getJSONObject(JSONUtils.GFY_ITEM_KEY).has(JSONUtils.WEBM_URL_KEY)) { - webm = jsonObject.getJSONObject(JSONUtils.GFY_ITEM_KEY).getString(JSONUtils.WEBM_URL_KEY); - } else if (jsonObject.getJSONObject(JSONUtils.GFY_ITEM_KEY).getJSONObject(JSONUtils.CONTENT_URLS_KEY).has(JSONUtils.WEBM_KEY)) { - webm = jsonObject.getJSONObject(JSONUtils.GFY_ITEM_KEY) - .getJSONObject(JSONUtils.CONTENT_URLS_KEY) - .getJSONObject(JSONUtils.WEBM_KEY) - .getString(JSONUtils.URL_KEY); - } else { - webm = mp4; - } - handler.post(() -> fetchGfycatOrRedgifsVideoLinksListener.success(webm, mp4)); - } catch (JSONException e) { - e.printStackTrace(); - handler.post(() -> fetchGfycatOrRedgifsVideoLinksListener.failed(-1)); - } - } - - private static void parseRedgifsVideoLinks(Handler handler, String response, - FetchGfycatOrRedgifsVideoLinksListener fetchGfycatOrRedgifsVideoLinksListener) { - try { - String mp4 = new JSONObject(response).getJSONObject(JSONUtils.GIF_KEY).getJSONObject(JSONUtils.URLS_KEY) - .getString(JSONUtils.HD_KEY); - handler.post(() -> fetchGfycatOrRedgifsVideoLinksListener.success(mp4, mp4)); - } catch (JSONException e) { - e.printStackTrace(); - handler.post(() -> fetchGfycatOrRedgifsVideoLinksListener.failed(-1)); - } - } -} diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/FetchRedgifsVideoLinks.java b/app/src/main/java/eu/toldi/infinityforlemmy/FetchRedgifsVideoLinks.java new file mode 100644 index 00000000..d970a210 --- /dev/null +++ b/app/src/main/java/eu/toldi/infinityforlemmy/FetchRedgifsVideoLinks.java @@ -0,0 +1,71 @@ +package eu.toldi.infinityforlemmy; + +import android.os.Handler; + +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.IOException; +import java.util.concurrent.Executor; + +import eu.toldi.infinityforlemmy.apis.RedgifsAPI; +import eu.toldi.infinityforlemmy.utils.JSONUtils; +import retrofit2.Call; +import retrofit2.Response; +import retrofit2.Retrofit; + +public class FetchRedgifsVideoLinks { + + public interface FetchRedgifsVideoLinksListener { + void success(String webm, String mp4); + void failed(int errorCode); + } + + public static void fetchRedgifsVideoLinks(Executor executor, Handler handler, Retrofit redgifsRetrofit, + String redgifsId, + FetchRedgifsVideoLinksListener fetchRedgifsVideoLinksListener) { + executor.execute(() -> { + try { + Response response = redgifsRetrofit.create(RedgifsAPI.class).getRedgifsData(redgifsId).execute(); + if (response.isSuccessful()) { + parseRedgifsVideoLinks(handler, response.body(), fetchRedgifsVideoLinksListener); + } else { + handler.post(() -> fetchRedgifsVideoLinksListener.failed(response.code())); + } + } catch (IOException e) { + e.printStackTrace(); + handler.post(() -> fetchRedgifsVideoLinksListener.failed(-1)); + } + }); + } + + public static void fetchRedgifsVideoLinksInRecyclerViewAdapter(Executor executor, Handler handler, + Call redgifsCall, + FetchRedgifsVideoLinksListener fetchRedgifsVideoLinksListener) { + executor.execute(() -> { + try { + Response response = redgifsCall.execute(); + if (response.isSuccessful()) { + parseRedgifsVideoLinks(handler, response.body(), fetchRedgifsVideoLinksListener); + } else { + handler.post(() -> fetchRedgifsVideoLinksListener.failed(response.code())); + } + } catch (IOException e) { + e.printStackTrace(); + handler.post(() -> fetchRedgifsVideoLinksListener.failed(-1)); + } + }); + } + + private static void parseRedgifsVideoLinks(Handler handler, String response, + FetchRedgifsVideoLinksListener fetchRedgifsVideoLinksListener) { + try { + String mp4 = new JSONObject(response).getJSONObject(JSONUtils.GIF_KEY).getJSONObject(JSONUtils.URLS_KEY) + .getString(JSONUtils.HD_KEY); + handler.post(() -> fetchRedgifsVideoLinksListener.success(mp4, mp4)); + } catch (JSONException e) { + e.printStackTrace(); + handler.post(() -> fetchRedgifsVideoLinksListener.failed(-1)); + } + } +} diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/NetworkModule.java b/app/src/main/java/eu/toldi/infinityforlemmy/NetworkModule.java index ac84aaf1..4db16c77 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/NetworkModule.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/NetworkModule.java @@ -143,15 +143,6 @@ abstract class NetworkModule { .build(); } - @Provides - @Named("gfycat") - @Singleton - static Retrofit provideGfycatRetrofit(@Named("base") RetrofitHolder retrofit) { - return retrofit.getRetrofit().newBuilder() - .baseUrl(APIUtils.GFYCAT_API_BASE_URI) - .build(); - } - @Provides @Named("RedgifsAccessTokenAuthenticator") static Interceptor redgifsAccessTokenAuthenticator(@Named("current_account") SharedPreferences currentAccountSharedPreferences) { diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/activities/LinkResolverActivity.java b/app/src/main/java/eu/toldi/infinityforlemmy/activities/LinkResolverActivity.java index 35e6c9f3..6caa95be 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/activities/LinkResolverActivity.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/activities/LinkResolverActivity.java @@ -55,7 +55,6 @@ public class LinkResolverActivity extends AppCompatActivity { private static final String MULTIREDDIT_PATTERN = "/user/[\\w-]+/m/\\w+/?"; private static final String MULTIREDDIT_PATTERN_2 = "/[rR]/(\\w+\\+?)+/?"; private static final String REDD_IT_POST_PATTERN = "/\\w+/?"; - private static final String GFYCAT_PATTERN = "(/i?fr)?/[\\w-]+$"; private static final String REDGIFS_PATTERN = "/watch/[\\w-]+$"; private static final String IMGUR_GALLERY_PATTERN = "/gallery/\\w+/?"; private static final String IMGUR_ALBUM_PATTERN = "/(album|a)/\\w+/?"; @@ -346,20 +345,10 @@ public class LinkResolverActivity extends AppCompatActivity { if (path.startsWith("/CL0/")) { handleUri(Uri.parse(path.substring("/CL0/".length()))); } - } else if (authority.contains("gfycat.com")) { - if (path.matches(GFYCAT_PATTERN)) { - Intent intent = new Intent(this, ViewVideoActivity.class); - intent.putExtra(ViewVideoActivity.EXTRA_GFYCAT_ID, path.substring(path.lastIndexOf("/") + 1)); - intent.putExtra(ViewVideoActivity.EXTRA_VIDEO_TYPE, ViewVideoActivity.VIDEO_TYPE_GFYCAT); - intent.putExtra(ViewVideoActivity.EXTRA_IS_NSFW, getIntent().getBooleanExtra(EXTRA_IS_NSFW, false)); - startActivity(intent); - } else { - deepLinkError(uri); - } } else if (authority.contains("redgifs.com")) { if (path.matches(REDGIFS_PATTERN)) { Intent intent = new Intent(this, ViewVideoActivity.class); - intent.putExtra(ViewVideoActivity.EXTRA_GFYCAT_ID, path.substring(path.lastIndexOf("/") + 1)); + intent.putExtra(ViewVideoActivity.EXTRA_REDGIFS_ID, path.substring(path.lastIndexOf("/") + 1)); intent.putExtra(ViewVideoActivity.EXTRA_VIDEO_TYPE, ViewVideoActivity.VIDEO_TYPE_REDGIFS); intent.putExtra(ViewVideoActivity.EXTRA_IS_NSFW, true); startActivity(intent); diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewVideoActivity.java b/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewVideoActivity.java index 449a7c87..17fe1d25 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewVideoActivity.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewVideoActivity.java @@ -68,7 +68,6 @@ import com.google.android.exoplayer2.util.MimeTypes; import com.google.android.exoplayer2.video.VideoSize; import com.google.android.material.bottomappbar.BottomAppBar; import com.google.android.material.button.MaterialButton; -import com.google.android.material.snackbar.Snackbar; import com.google.common.collect.ImmutableList; import com.otaliastudios.zoom.ZoomEngine; import com.otaliastudios.zoom.ZoomSurfaceView; @@ -88,7 +87,7 @@ import app.futured.hauler.LockableNestedScrollView; import butterknife.BindView; import butterknife.ButterKnife; import eu.toldi.infinityforlemmy.CustomFontReceiver; -import eu.toldi.infinityforlemmy.FetchGfycatOrRedgifsVideoLinks; +import eu.toldi.infinityforlemmy.FetchRedgifsVideoLinks; import eu.toldi.infinityforlemmy.FetchStreamableVideo; import eu.toldi.infinityforlemmy.Infinity; import eu.toldi.infinityforlemmy.R; @@ -133,7 +132,7 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe public static final String EXTRA_POST = "EP"; public static final String EXTRA_PROGRESS_SECONDS = "EPS"; public static final String EXTRA_VIDEO_TYPE = "EVT"; - public static final String EXTRA_GFYCAT_ID = "EGI"; + public static final String EXTRA_REDGIFS_ID = "ERI"; public static final String EXTRA_V_REDD_IT_URL = "EVRIU"; public static final String EXTRA_STREAMABLE_SHORT_CODE = "ESSC"; public static final String EXTRA_IS_NSFW = "EIN"; @@ -142,7 +141,6 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe public static final int VIDEO_TYPE_V_REDD_IT = 4; public static final int VIDEO_TYPE_DIRECT = 3; public static final int VIDEO_TYPE_REDGIFS = 2; - public static final int VIDEO_TYPE_GFYCAT = 1; private static final int VIDEO_TYPE_NORMAL = 0; private static final int PERMISSION_REQUEST_WRITE_EXTERNAL_STORAGE = 0; @@ -204,10 +202,6 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe @Named("no_oauth") RetrofitHolder retrofit; - @Inject - @Named("gfycat") - Retrofit gfycatRetrofit; - @Inject @Named("redgifs") Retrofit redgifsRetrofit; @@ -548,29 +542,21 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe } } else if (videoType == VIDEO_TYPE_V_REDD_IT) { loadVReddItVideo(savedInstanceState); - } else if (videoType == VIDEO_TYPE_GFYCAT || videoType == VIDEO_TYPE_REDGIFS) { + } else if (videoType == VIDEO_TYPE_REDGIFS) { if (savedInstanceState != null) { videoDownloadUrl = savedInstanceState.getString(VIDEO_DOWNLOAD_URL_STATE); } else { videoDownloadUrl = intent.getStringExtra(EXTRA_VIDEO_DOWNLOAD_URL); } - String gfycatId = intent.getStringExtra(EXTRA_GFYCAT_ID); - if (gfycatId != null && gfycatId.contains("-")) { - gfycatId = gfycatId.substring(0, gfycatId.indexOf('-')); - } - if (videoType == VIDEO_TYPE_GFYCAT) { - videoFileName = "Gfycat-" + gfycatId + ".mp4"; - } else { - videoFileName = "Redgifs-" + gfycatId + ".mp4"; + String redgifsId = intent.getStringExtra(EXTRA_REDGIFS_ID); + if (redgifsId != null && redgifsId.contains("-")) { + redgifsId = redgifsId.substring(0, redgifsId.indexOf('-')); } + videoFileName = "Redgifs-" + redgifsId + ".mp4"; if (mVideoUri == null) { - if (videoType == VIDEO_TYPE_GFYCAT) { - loadGfycatOrRedgifsVideo(gfycatRetrofit, gfycatId, true, savedInstanceState, true); - } else { - loadGfycatOrRedgifsVideo(redgifsRetrofit, gfycatId, false, savedInstanceState, false); - } + loadRedgifsVideo(redgifsId, savedInstanceState); } else { dataSourceFactory = new CacheDataSource.Factory().setCache(mSimpleCache) .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory().setAllowCrossProtocolRedirects(true).setUserAgent(APIUtils.USER_AGENT)); @@ -725,61 +711,28 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe return C.TRACK_TYPE_UNKNOWN; } - private void loadGfycatOrRedgifsVideo(Retrofit retrofit, String gfycatId, boolean isGfycatVideo, - Bundle savedInstanceState, boolean needErrorHandling) { + private void loadRedgifsVideo(String redgifsId, Bundle savedInstanceState) { progressBar.setVisibility(View.VISIBLE); - if (isGfycatVideo) { - FetchGfycatOrRedgifsVideoLinks.fetchGfycatVideoLinks(mExecutor, new Handler(), retrofit, gfycatId, - new FetchGfycatOrRedgifsVideoLinks.FetchGfycatOrRedgifsVideoLinksListener() { - @Override - public void success(String webm, String mp4) { - progressBar.setVisibility(View.GONE); - mVideoUri = Uri.parse(webm); - videoDownloadUrl = mp4; - dataSourceFactory = new CacheDataSource.Factory().setCache(mSimpleCache) - .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory().setAllowCrossProtocolRedirects(true).setUserAgent(APIUtils.USER_AGENT)); - preparePlayer(savedInstanceState); - player.prepare(); - player.setMediaSource(new ProgressiveMediaSource.Factory(dataSourceFactory).createMediaSource(MediaItem.fromUri(mVideoUri))); - } + FetchRedgifsVideoLinks.fetchRedgifsVideoLinks(mExecutor, new Handler(), redgifsRetrofit, + redgifsId, new FetchRedgifsVideoLinks.FetchRedgifsVideoLinksListener() { + @Override + public void success(String webm, String mp4) { + progressBar.setVisibility(View.GONE); + mVideoUri = Uri.parse(webm); + videoDownloadUrl = mp4; + dataSourceFactory = new CacheDataSource.Factory().setCache(mSimpleCache) + .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory().setAllowCrossProtocolRedirects(true).setUserAgent(APIUtils.USER_AGENT)); + preparePlayer(savedInstanceState); + player.prepare(); + player.setMediaSource(new ProgressiveMediaSource.Factory(dataSourceFactory).createMediaSource(MediaItem.fromUri(mVideoUri))); + } - @Override - public void failed(int errorCode) { - if (errorCode == 404 && needErrorHandling) { - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.AUTOMATICALLY_TRY_REDGIFS, true)) { - loadGfycatOrRedgifsVideo(redgifsRetrofit, gfycatId, false, savedInstanceState, false); - } else { - Snackbar.make(coordinatorLayout, R.string.load_video_in_redgifs, Snackbar.LENGTH_INDEFINITE).setAction(R.string.yes, - view -> loadGfycatOrRedgifsVideo(redgifsRetrofit, gfycatId, false, savedInstanceState, false)).show(); - } - } else { - progressBar.setVisibility(View.GONE); - Toast.makeText(ViewVideoActivity.this, R.string.fetch_gfycat_video_failed, Toast.LENGTH_SHORT).show(); - } - } - }); - } else { - FetchGfycatOrRedgifsVideoLinks.fetchRedgifsVideoLinks(mExecutor, new Handler(), redgifsRetrofit, - gfycatId, new FetchGfycatOrRedgifsVideoLinks.FetchGfycatOrRedgifsVideoLinksListener() { - @Override - public void success(String webm, String mp4) { - progressBar.setVisibility(View.GONE); - mVideoUri = Uri.parse(webm); - videoDownloadUrl = mp4; - dataSourceFactory = new CacheDataSource.Factory().setCache(mSimpleCache) - .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory().setAllowCrossProtocolRedirects(true).setUserAgent(APIUtils.USER_AGENT)); - preparePlayer(savedInstanceState); - player.prepare(); - player.setMediaSource(new ProgressiveMediaSource.Factory(dataSourceFactory).createMediaSource(MediaItem.fromUri(mVideoUri))); - } - - @Override - public void failed(int errorCode) { - progressBar.setVisibility(View.GONE); - Toast.makeText(ViewVideoActivity.this, R.string.fetch_redgifs_video_failed, Toast.LENGTH_SHORT).show(); - } - }); - } + @Override + public void failed(int errorCode) { + progressBar.setVisibility(View.GONE); + Toast.makeText(ViewVideoActivity.this, R.string.fetch_redgifs_video_failed, Toast.LENGTH_SHORT).show(); + } + }); } private void loadVReddItVideo(Bundle savedInstanceState) { @@ -797,30 +750,14 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe postEnricher, new FetchPost.FetchPostListener() { @Override public void fetchPostSuccess(Post post) { - if (post.isGfycat()) { - videoType = VIDEO_TYPE_GFYCAT; - String gfycatId = post.getGfycatId(); - if (gfycatId != null && gfycatId.contains("-")) { - gfycatId = gfycatId.substring(0, gfycatId.indexOf('-')); - } - if (videoType == VIDEO_TYPE_GFYCAT) { - videoFileName = "Gfycat-" + gfycatId + ".mp4"; - } else { - videoFileName = "Redgifs-" + gfycatId + ".mp4"; - } - loadGfycatOrRedgifsVideo(gfycatRetrofit, gfycatId, true, savedInstanceState, true); - } else if (post.isRedgifs()) { + if (post.isRedgifs()) { videoType = VIDEO_TYPE_REDGIFS; - String gfycatId = post.getGfycatId(); - if (gfycatId != null && gfycatId.contains("-")) { - gfycatId = gfycatId.substring(0, gfycatId.indexOf('-')); + String redgifsId = post.getRedgifsId(); + if (redgifsId != null && redgifsId.contains("-")) { + redgifsId = redgifsId.substring(0, redgifsId.indexOf('-')); } - if (videoType == VIDEO_TYPE_GFYCAT) { - videoFileName = "Gfycat-" + gfycatId + ".mp4"; - } else { - videoFileName = "Redgifs-" + gfycatId + ".mp4"; - } - loadGfycatOrRedgifsVideo(redgifsRetrofit, gfycatId, false, savedInstanceState, false); + videoFileName = "Redgifs-" + redgifsId + ".mp4"; + loadRedgifsVideo(redgifsId, savedInstanceState); } else if (post.isStreamable()) { videoType = VIDEO_TYPE_STREAMABLE; String shortCode = post.getStreamableShortCode(); diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/adapters/PostDetailRecyclerViewAdapter.java b/app/src/main/java/eu/toldi/infinityforlemmy/adapters/PostDetailRecyclerViewAdapter.java index b84407d5..883f467f 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/adapters/PostDetailRecyclerViewAdapter.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/adapters/PostDetailRecyclerViewAdapter.java @@ -58,7 +58,7 @@ import java.util.regex.Pattern; import javax.inject.Provider; -import eu.toldi.infinityforlemmy.FetchGfycatOrRedgifsVideoLinks; +import eu.toldi.infinityforlemmy.FetchRedgifsVideoLinks; import eu.toldi.infinityforlemmy.FetchStreamableVideo; import eu.toldi.infinityforlemmy.R; import eu.toldi.infinityforlemmy.RedditDataRoomDatabase; @@ -78,7 +78,6 @@ import eu.toldi.infinityforlemmy.activities.ViewRedditGalleryActivity; import eu.toldi.infinityforlemmy.activities.ViewSubredditDetailActivity; import eu.toldi.infinityforlemmy.activities.ViewUserDetailActivity; import eu.toldi.infinityforlemmy.activities.ViewVideoActivity; -import eu.toldi.infinityforlemmy.apis.GfycatAPI; import eu.toldi.infinityforlemmy.apis.RedgifsAPI; import eu.toldi.infinityforlemmy.apis.StreamableAPI; import eu.toldi.infinityforlemmy.asynctasks.LoadSubredditIcon; @@ -140,7 +139,6 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter mStreamableApiProvider; private RedditDataRoomDatabase mRedditDataRoomDatabase; @@ -166,7 +164,6 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter streamableApiProvider, RedditDataRoomDatabase redditDataRoomDatabase, RequestManager glide, boolean separatePostAndComments, String accessToken, @@ -242,7 +239,6 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter fetchGfycatOrStreamableVideoCall; + public Call fetchStreamableVideoCall; AspectRatioFrameLayout aspectRatioFrameLayout; PlayerView playerView; GifImageView previewImageView; - ImageView mErrorLoadingGfycatImageView; + ImageView mErrorLoadingVideoImageView; ImageView muteButton; ImageView fullscreenButton; ImageView pauseButton; @@ -1815,7 +1808,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter mStreamableApiProvider; private String mAccessToken; @@ -236,7 +234,6 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter streamableApiProvider, + Retrofit redgifsRetrofit, Provider streamableApiProvider, CustomThemeWrapper customThemeWrapper, Locale locale, String accessToken, String accountName, int postType, int postLayout, boolean displaySubredditName, SharedPreferences sharedPreferences, SharedPreferences currentAccountSharedPreferences, @@ -284,7 +281,6 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter fetchGfycatOrStreamableVideoCall; + public Call fetchStreamableVideoCall; private boolean isManuallyPaused; PostBaseVideoAutoplayViewHolder(View rootView, @@ -3581,7 +3567,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter fetchGfycatOrStreamableVideoCall; + public Call fetchStreamableVideoCall; private boolean isManuallyPaused; PostCard2BaseVideoAutoplayViewHolder(View itemView, @@ -5365,7 +5344,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter fetchGfycatOrStreamableVideoCall; + public Call fetchStreamableVideoCall; private boolean isManuallyPaused; PostMaterial3CardBaseVideoAutoplayViewHolder(View rootView, @@ -6422,7 +6394,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter getGfycatData(@Path("gfyid") String gfyId); -} diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/fragments/PostFragment.java b/app/src/main/java/eu/toldi/infinityforlemmy/fragments/PostFragment.java index e8ea6881..a58becdc 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/fragments/PostFragment.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/fragments/PostFragment.java @@ -187,9 +187,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator { @Named("oauth") Retrofit mOauthRetrofit; @Inject - @Named("gfycat") - Retrofit mGfycatRetrofit; - @Inject @Named("redgifs") Retrofit mRedgifsRetrofit; @Inject @@ -468,7 +465,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { sortType = new SortType(st == null ? SortType.Type.TOP_ALL : st,sortTime != null ? SortType.Time.valueOf(sortTime) : null); postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_SEARCH_POST, defaultPostLayout); - mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit, + mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale, accessToken, accountName, postType, postLayout, true, mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, @@ -543,7 +540,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_SUBREDDIT_POST_BASE + subredditName, defaultPostLayout); - mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit, + mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale, accessToken, accountName, postType, postLayout, displaySubredditName, mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, @@ -612,7 +609,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { defaultPostLayout); - mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit, + mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale, accessToken, accountName, postType, postLayout, true, mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, @@ -678,7 +675,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_USER_POST_BASE + username, defaultPostLayout); - mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit, + mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale, accessToken, accountName, postType, postLayout, true, mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, @@ -740,7 +737,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_FRONT_PAGE_POST, defaultPostLayout); - mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit, + mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale, accessToken, accountName, postType, postLayout, true, mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, @@ -799,7 +796,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_MULTI_REDDIT_POST_BASE + multiRedditPath, defaultPostLayout); - mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit, + mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale, accessToken, accountName, postType, postLayout, true, mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, @@ -855,7 +852,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { sortType = newSortType(sort, sortTime); postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_FRONT_PAGE_POST, defaultPostLayout); - mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mGfycatRetrofit, + mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mRetrofit, mRedgifsRetrofit, mStreamableApiProvider, mCustomThemeWrapper, locale, accessToken, accountName, postType, postLayout, true, mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/fragments/ViewPostDetailFragment.java b/app/src/main/java/eu/toldi/infinityforlemmy/fragments/ViewPostDetailFragment.java index 33fa0da4..e5dee569 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/fragments/ViewPostDetailFragment.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/fragments/ViewPostDetailFragment.java @@ -167,9 +167,6 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic @Named("reveddit") Retrofit revedditRetrofit; @Inject - @Named("gfycat") - Retrofit mGfycatRetrofit; - @Inject @Named("redgifs") Retrofit mRedgifsRetrofit; @Inject @@ -624,7 +621,7 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic setupMenu(); mPostAdapter = new PostDetailRecyclerViewAdapter(activity, - this, mExecutor, mCustomThemeWrapper, mRetrofit, mGfycatRetrofit, + this, mExecutor, mCustomThemeWrapper, mRetrofit, mRedgifsRetrofit, mStreamableApiProvider, mRedditDataRoomDatabase, mGlide, mSeparatePostAndComments, mAccessToken, mAccountName, mPost, mLocale, mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostDetailsSharedPreferences, @@ -1361,7 +1358,7 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic mPost = post; mPostAdapter = new PostDetailRecyclerViewAdapter(activity, ViewPostDetailFragment.this, mExecutor, mCustomThemeWrapper, - mRetrofit, mGfycatRetrofit, mRedgifsRetrofit, + mRetrofit, mRedgifsRetrofit, mStreamableApiProvider, mRedditDataRoomDatabase, mGlide, mSeparatePostAndComments, mAccessToken, mAccountName, mPost, mLocale, mSharedPreferences, mCurrentAccountSharedPreferences, mNsfwAndSpoilerSharedPreferences, diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/post/FetchRemovedPost.java b/app/src/main/java/eu/toldi/infinityforlemmy/post/FetchRemovedPost.java index aca01ba5..8859f5b4 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/post/FetchRemovedPost.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/post/FetchRemovedPost.java @@ -77,7 +77,7 @@ public class FetchRemovedPost { try { Uri uri = Uri.parse(url); String authority = uri.getAuthority(); - if (authority != null && (authority.contains("gfycat.com") || authority.contains("redgifs.com"))) { + if (authority != null && authority.contains("redgifs.com")) { post.setPostType(Post.LINK_TYPE); post.setUrl(url); } diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/post/ParsePost.java b/app/src/main/java/eu/toldi/infinityforlemmy/post/ParsePost.java index b326bc1e..2292cdd6 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/post/ParsePost.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/post/ParsePost.java @@ -267,18 +267,12 @@ public class ParsePost { String authority = uri.getAuthority(); if (authority != null) { - if (authority.contains("gfycat.com")) { - String gfycatId = url.substring(url.lastIndexOf("/") + 1).toLowerCase(); - post.setPostType(Post.VIDEO_TYPE); - post.setIsGfycat(true); - post.setVideoUrl(url); - post.setGfycatId(gfycatId); - } else if (authority.contains("redgifs.com")) { - String gfycatId = url.substring(url.lastIndexOf("/") + 1).toLowerCase(); + if (authority.contains("redgifs.com")) { + String redgifsId = url.substring(url.lastIndexOf("/") + 1).toLowerCase(); post.setPostType(Post.VIDEO_TYPE); post.setIsRedgifs(true); post.setVideoUrl(url); - post.setGfycatId(gfycatId); + post.setRedgifsId(redgifsId); } else if (authority.equals("streamable.com")) { String shortCode = url.substring(url.lastIndexOf("/") + 1); post.setPostType(Post.VIDEO_TYPE); @@ -406,18 +400,12 @@ public class ParsePost { String authority = uri.getAuthority(); if (authority != null) { - if (authority.contains("gfycat.com")) { - String gfycatId = url.substring(url.lastIndexOf("/") + 1).toLowerCase(); - post.setPostType(Post.VIDEO_TYPE); - post.setIsGfycat(true); - post.setVideoUrl(url); - post.setGfycatId(gfycatId); - } else if (authority.contains("redgifs.com")) { - String gfycatId = url.substring(url.lastIndexOf("/") + 1).toLowerCase(); + if (authority.contains("redgifs.com")) { + String redgifsId = url.substring(url.lastIndexOf("/") + 1).toLowerCase(); post.setPostType(Post.VIDEO_TYPE); post.setIsRedgifs(true); post.setVideoUrl(url); - post.setGfycatId(gfycatId); + post.setRedgifsId(redgifsId); } else if (authority.equals("streamable.com")) { String shortCode = url.substring(url.lastIndexOf("/") + 1); post.setPostType(Post.VIDEO_TYPE); @@ -467,18 +455,12 @@ public class ParsePost { String authority = uri.getAuthority(); if (authority != null) { - if (authority.contains("gfycat.com")) { - String gfycatId = url.substring(url.lastIndexOf("/") + 1).toLowerCase(); - post.setPostType(Post.VIDEO_TYPE); - post.setIsGfycat(true); - post.setVideoUrl(url); - post.setGfycatId(gfycatId); - } else if (authority.contains("redgifs.com")) { - String gfycatId = url.substring(url.lastIndexOf("/") + 1).toLowerCase(); + if (authority.contains("redgifs.com")) { + String redgifsId = url.substring(url.lastIndexOf("/") + 1).toLowerCase(); post.setPostType(Post.VIDEO_TYPE); post.setIsRedgifs(true); post.setVideoUrl(url); - post.setGfycatId(gfycatId); + post.setRedgifsId(redgifsId); } else if (authority.equals("streamable.com")) { String shortCode = url.substring(url.lastIndexOf("/") + 1); post.setPostType(Post.VIDEO_TYPE); @@ -495,22 +477,14 @@ public class ParsePost { try { String authority = uri.getAuthority(); if (authority != null) { - if (authority.contains("gfycat.com")) { - post.setIsGfycat(true); - post.setVideoUrl(url); - String gfycatId = url.substring(url.lastIndexOf("/") + 1); - if (gfycatId.contains("-")) { - gfycatId = gfycatId.substring(0, gfycatId.indexOf('-')); - } - post.setGfycatId(gfycatId.toLowerCase()); - } else if (authority.contains("redgifs.com")) { - String gfycatId = url.substring(url.lastIndexOf("/") + 1); - if (gfycatId.contains("-")) { - gfycatId = gfycatId.substring(0, gfycatId.indexOf('-')); + if (authority.contains("redgifs.com")) { + String redgifsId = url.substring(url.lastIndexOf("/") + 1); + if (redgifsId.contains("-")) { + redgifsId = redgifsId.substring(0, redgifsId.indexOf('-')); } post.setIsRedgifs(true); post.setVideoUrl(url); - post.setGfycatId(gfycatId.toLowerCase()); + post.setRedgifsId(redgifsId.toLowerCase()); } else if (authority.equals("streamable.com")) { String shortCode = url.substring(url.lastIndexOf("/") + 1); post.setPostType(Post.VIDEO_TYPE); @@ -593,18 +567,12 @@ public class ParsePost { String authority = uri.getAuthority(); if (authority != null) { - if (authority.contains("gfycat.com")) { - String gfycatId = url.substring(url.lastIndexOf("/") + 1).toLowerCase(); - post.setPostType(Post.VIDEO_TYPE); - post.setIsGfycat(true); - post.setVideoUrl(url); - post.setGfycatId(gfycatId); - } else if (authority.contains("redgifs.com")) { - String gfycatId = url.substring(url.lastIndexOf("/") + 1).toLowerCase(); + if (authority.contains("redgifs.com")) { + String redgifsId = url.substring(url.lastIndexOf("/") + 1).toLowerCase(); post.setPostType(Post.VIDEO_TYPE); post.setIsRedgifs(true); post.setVideoUrl(url); - post.setGfycatId(gfycatId); + post.setRedgifsId(redgifsId); } else if (authority.equals("streamable.com")) { String shortCode = url.substring(url.lastIndexOf("/") + 1); post.setPostType(Post.VIDEO_TYPE); diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/post/Post.java b/app/src/main/java/eu/toldi/infinityforlemmy/post/Post.java index 3a6bd610..5b82453c 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/post/Post.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/post/Post.java @@ -45,13 +45,12 @@ public class Post implements Parcelable { private String url; private String videoUrl; private String videoDownloadUrl; - private String gfycatId; + private String redgifsId; private String streamableShortCode; private boolean isImgur; - private boolean isGfycat; private boolean isRedgifs; private boolean isStreamable; - private boolean loadGfyOrStreamableVideoSuccess; + private boolean loadVideoSuccess; private String permalink; private long postTimeMillis; @@ -152,13 +151,12 @@ public class Post implements Parcelable { url = in.readString(); videoUrl = in.readString(); videoDownloadUrl = in.readString(); - gfycatId = in.readString(); + redgifsId = in.readString(); streamableShortCode = in.readString(); isImgur = in.readByte() != 0; - isGfycat = in.readByte() != 0; isRedgifs = in.readByte() != 0; isStreamable = in.readByte() != 0; - loadGfyOrStreamableVideoSuccess = in.readByte() != 0; + loadVideoSuccess = in.readByte() != 0; permalink = in.readString(); downvotes = in.readInt(); upvotes = in.readInt(); @@ -303,12 +301,12 @@ public class Post implements Parcelable { this.videoDownloadUrl = videoDownloadUrl; } - public String getGfycatId() { - return gfycatId; + public String getRedgifsId() { + return redgifsId; } - public void setGfycatId(String gfycatId) { - this.gfycatId = gfycatId; + public void setRedgifsId(String redgifsId) { + this.redgifsId = redgifsId; } public String getStreamableShortCode() { @@ -327,14 +325,6 @@ public class Post implements Parcelable { return isImgur; } - public boolean isGfycat() { - return isGfycat; - } - - public void setIsGfycat(boolean isGfycat) { - this.isGfycat = isGfycat; - } - public boolean isRedgifs() { return isRedgifs; } @@ -351,12 +341,12 @@ public class Post implements Parcelable { this.isStreamable = isStreamable; } - public boolean isLoadGfycatOrStreamableVideoSuccess() { - return loadGfyOrStreamableVideoSuccess; + public boolean isLoadVideoSuccess() { + return loadVideoSuccess; } - public void setLoadGfyOrStreamableVideoSuccess(boolean loadGfyOrStreamableVideoSuccess) { - this.loadGfyOrStreamableVideoSuccess = loadGfyOrStreamableVideoSuccess; + public void setLoadVideoSuccess(boolean loadVideoSuccess) { + this.loadVideoSuccess = loadVideoSuccess; } public String getPermalink() { @@ -525,13 +515,12 @@ public class Post implements Parcelable { parcel.writeString(url); parcel.writeString(videoUrl); parcel.writeString(videoDownloadUrl); - parcel.writeString(gfycatId); + parcel.writeString(redgifsId); parcel.writeString(streamableShortCode); parcel.writeByte((byte) (isImgur ? 1 : 0)); - parcel.writeByte((byte) (isGfycat ? 1 : 0)); parcel.writeByte((byte) (isRedgifs ? 1 : 0)); parcel.writeByte((byte) (isStreamable ? 1 : 0)); - parcel.writeByte((byte) (loadGfyOrStreamableVideoSuccess ? 1 : 0)); + parcel.writeByte((byte) (loadVideoSuccess ? 1 : 0)); parcel.writeString(permalink); parcel.writeInt(downvotes); parcel.writeInt(upvotes); diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/utils/APIUtils.java b/app/src/main/java/eu/toldi/infinityforlemmy/utils/APIUtils.java index 5b54585a..abd6c7b6 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/utils/APIUtils.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/utils/APIUtils.java @@ -19,7 +19,6 @@ public class APIUtils { public static final String API_BASE_URI = "https://lemmy.world"; public static final String API_UPLOAD_MEDIA_URI = "https://reddit-uploaded-media.s3-accelerate.amazonaws.com"; public static final String API_UPLOAD_VIDEO_URI = "https://reddit-uploaded-video.s3-accelerate.amazonaws.com"; - public static final String GFYCAT_API_BASE_URI = "https://api.gfycat.com/v1/gfycats/"; public static final String REDGIFS_API_BASE_URI = "https://api.redgifs.com"; public static final String IMGUR_API_BASE_URI = "https://api.imgur.com/3/"; public static final String PUSHSHIFT_API_BASE_URI = "https://api.pushshift.io/"; diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/utils/JSONUtils.java b/app/src/main/java/eu/toldi/infinityforlemmy/utils/JSONUtils.java index 5bedadb8..48691359 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/utils/JSONUtils.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/utils/JSONUtils.java @@ -111,7 +111,6 @@ public class JSONUtils { public static final String PATH_KEY = "path"; public static final String ALL_AWARDINGS_KEY = "all_awardings"; public static final String RESIZED_ICONS_KEY = "resized_icons"; - public static final String GFY_ITEM_KEY = "gfyItem"; public static final String MP4_URL_KEY = "mp4Url"; public static final String TYPE_KEY = "type"; public static final String MP4_KEY = "mp4"; diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/utils/SharedPreferencesUtils.java b/app/src/main/java/eu/toldi/infinityforlemmy/utils/SharedPreferencesUtils.java index 1433c4ce..63300961 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/utils/SharedPreferencesUtils.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/utils/SharedPreferencesUtils.java @@ -122,7 +122,6 @@ public class SharedPreferencesUtils { public static final String VIDEO_AUTOPLAY_VALUE_NEVER = "0"; public static final String MUTE_AUTOPLAYING_VIDEOS = "mute_autoplaying_videos"; public static final String AUTOPLAY_NSFW_VIDEOS = "autoplay_nsfw_videos"; - public static final String AUTOMATICALLY_TRY_REDGIFS = "automatically_try_redgifs"; public static final String LOCK_JUMP_TO_NEXT_TOP_LEVEL_COMMENT_BUTTON = "lock_jump_to_next_top_level_comment_button"; public static final String SWAP_TAP_AND_LONG_COMMENTS = "swap_tap_and_long_in_comments"; public static final String SWIPE_UP_TO_HIDE_JUMP_TO_NEXT_TOP_LEVEL_COMMENT_BUTTON = "swipe_up_to_hide_jump_to_next_top_level_comments_button"; diff --git a/app/src/main/kotlin/eu/toldi/infinityforlemmy/post/enrich/RedGifsPostEnricher.kt b/app/src/main/kotlin/eu/toldi/infinityforlemmy/post/enrich/RedGifsPostEnricher.kt index 3f199560..cf13cf68 100644 --- a/app/src/main/kotlin/eu/toldi/infinityforlemmy/post/enrich/RedGifsPostEnricher.kt +++ b/app/src/main/kotlin/eu/toldi/infinityforlemmy/post/enrich/RedGifsPostEnricher.kt @@ -12,7 +12,7 @@ import java.io.IOException class RedGifsPostEnricher(private val redgifsAPI: RedgifsAPI) : PostEnricher { override fun enrich(posts: Collection) { val redGifsPosts = posts.filter { it.isRedgifs && it.previews.isEmpty() } - .groupBy { it.gfycatId } + .groupBy { it.redgifsId } if (redGifsPosts.isEmpty()) { return diff --git a/app/src/main/res/layout/item_post_card_2_video_autoplay.xml b/app/src/main/res/layout/item_post_card_2_video_autoplay.xml index a8784904..12e24314 100644 --- a/app/src/main/res/layout/item_post_card_2_video_autoplay.xml +++ b/app/src/main/res/layout/item_post_card_2_video_autoplay.xml @@ -42,7 +42,7 @@ android:visibility="gone" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_post_card_2_video_autoplay_legacy_controller.xml b/app/src/main/res/layout/item_post_card_2_video_autoplay_legacy_controller.xml index a8b698d0..3800c8a8 100644 --- a/app/src/main/res/layout/item_post_card_2_video_autoplay_legacy_controller.xml +++ b/app/src/main/res/layout/item_post_card_2_video_autoplay_legacy_controller.xml @@ -42,7 +42,7 @@ android:visibility="gone" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_post_card_3_video_type_autoplay.xml b/app/src/main/res/layout/item_post_card_3_video_type_autoplay.xml index 556d8dde..3d3f8030 100644 --- a/app/src/main/res/layout/item_post_card_3_video_type_autoplay.xml +++ b/app/src/main/res/layout/item_post_card_3_video_type_autoplay.xml @@ -40,7 +40,7 @@ android:visibility="gone" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_post_card_3_video_type_autoplay_legacy_controller.xml b/app/src/main/res/layout/item_post_card_3_video_type_autoplay_legacy_controller.xml index dced0225..d6568d95 100644 --- a/app/src/main/res/layout/item_post_card_3_video_type_autoplay_legacy_controller.xml +++ b/app/src/main/res/layout/item_post_card_3_video_type_autoplay_legacy_controller.xml @@ -40,7 +40,7 @@ android:visibility="gone" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_post_detail_video_autoplay.xml b/app/src/main/res/layout/item_post_detail_video_autoplay.xml index daeb6b2c..3fd40ae9 100644 --- a/app/src/main/res/layout/item_post_detail_video_autoplay.xml +++ b/app/src/main/res/layout/item_post_detail_video_autoplay.xml @@ -244,7 +244,7 @@ android:visibility="gone" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_post_detail_video_autoplay_legacy_controller.xml b/app/src/main/res/layout/item_post_detail_video_autoplay_legacy_controller.xml index 33da9144..5e1c461c 100644 --- a/app/src/main/res/layout/item_post_detail_video_autoplay_legacy_controller.xml +++ b/app/src/main/res/layout/item_post_detail_video_autoplay_legacy_controller.xml @@ -247,7 +247,7 @@ android:visibility="gone" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_post_video_type_autoplay.xml b/app/src/main/res/layout/item_post_video_type_autoplay.xml index 22ec8763..01bd3925 100644 --- a/app/src/main/res/layout/item_post_video_type_autoplay.xml +++ b/app/src/main/res/layout/item_post_video_type_autoplay.xml @@ -254,7 +254,7 @@ android:visibility="gone" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_post_video_type_autoplay_legacy_controller.xml b/app/src/main/res/layout/item_post_video_type_autoplay_legacy_controller.xml index fb73ba45..66c7968b 100644 --- a/app/src/main/res/layout/item_post_video_type_autoplay_legacy_controller.xml +++ b/app/src/main/res/layout/item_post_video_type_autoplay_legacy_controller.xml @@ -254,7 +254,7 @@ android:visibility="gone" /> - \ No newline at end of file + diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index aa66c817..396221c0 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -314,7 +314,6 @@ Použít tlačítka hlasitosti pro navigaci v příspěvcích Ztlumit videa Ztlumit NSFW videa - Automatický pokus o přístup k Redgifs, pokud jsou videa na Gfycat odstraněna. Ignorovat navigační lištu v přehrávači videí Zabránit ovládání videa mít dodatečný okraj Potvrdit pro odchod @@ -717,7 +716,6 @@ Oznámení Zprávy Zpráva - Získávání Gfycat videa selhalo Získávání Redgifs videa selhalo Získávání informací o videu. Čekejte prosím. Nelze načíst obrázky @@ -738,7 +736,6 @@ Nastavit na zamykací obrazovku Nastavit na oboje Výchozí - Zkusit načíst video na Redgifs %1$s bodů Pokud máte zapnuté dvoufaktorové ověřování, vyplňte pole tokenu 2FA. V opačném případě jej ponechte prázdné Crosspost diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 33059981..41fd6c68 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -324,7 +324,6 @@ Videos stummschalten NSFW-Videos stummschalten - Automatisch versuchen, Redgifs abzurufen, falls Videos auf Gfycat entfernt wurden. Navigationsleiste im Video-Player ignorieren Kein extra Rand beim Video-Controller Verlassen bestätigen @@ -744,7 +743,6 @@ Benachrichtigungen Nachrichten Nachricht - Abruf des Gfycat-Videos fehlgeschlagen Abruf des Redgifs-Videos fehlgeschlagen Lade Video-Info. Bitte warten. Kann Bilder nicht laden @@ -768,7 +766,6 @@ Auf dem Sperrbildschirm setzen Auf beiden setzen Standard - Versuche Video von Redgifs zu laden %1$s Punkte Sofern du Zwei-Faktor-Authentifizierung aktiviert hast, trage den Code im 2FA-Feld ein. Ansonsten leer lassen Crossposten diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 59a899ed..2f3edc4a 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -294,7 +294,6 @@ "Περιήγηση στις αναρτήσεις με τα κουμπιά έντασης" "Σίγαση βίντεο" "Σίγαση NSFW βίντεο" - "Αύτοματη προσπάθεια προσπέλασης στο Redgifs αν τα Βίντεο στο Gfycat έχουν αφαιρεθεί." "Αγνόηση Μπάρας Πλοήγησης κατά την Αναπαραγωγή Βίντεο" "Αποτρέπει τα Χειριστήρια του Βίντεο να έχουν έξτρα περιθώριο" "Επιβεβαίωση για Έξοδο" @@ -686,7 +685,6 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd "Ειδοποιήσεις" "Μηνύματα" "Μήνυμα" - "Η ανάκτηση του βίντεο Gfycat απέτυχε" "Η ανάκτηση του βίντεο Redgifs απέτυχε" "Ανάκτηση πληροφοριών βίντεο. Παρακαλώ περιμένετε." "Αδυναμία φόρτωσης εικόνων" @@ -707,7 +705,6 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd "Ρύθμιση στην Οθόνη Κλειδώματος" "Ρύθμιση και στα δύο" "Προεπιλογή" - "Προσπάθεια φόρτωσης βίντεο στο Redgifs" "%1$s βθμ" "Αν έχετε ενεργή την ταυτοποίηση 2 παραγόντων, παρακαλώ πληκτρολογήστε τον κωδικό με τον παρακάτω τρόπο: <κωδικός>:<2FA κωδικός>. Παράδειγμα: οκωδικοςσας:123456" diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 8c17a531..5e9ee93a 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -323,7 +323,6 @@ Premio means prize, so it's better suited the first word instead of the second o Usar las teclas de volumen para navegar publicaciones Silenciar vídeos Silenciar vídeos NSFW - Intentar acceder automáticamente a Redgifs si se eliminan los videos en Gfycat. Ignorar la barra de navegación en el reproductor de vídeo Bloquear al controlador de vídeo para que no tenga margen extra Confirmar para salir @@ -737,7 +736,6 @@ Premio means prize, so it's better suited the first word instead of the second o Notificaciones Mensajes Mensaje - No fue posible obtener el vídeo de Gfycat No fue posible obtener el vídeo de Redgifs Obteniendo información del vídeo. Por favor espera. No fue posible cargar las imágenes @@ -758,7 +756,6 @@ Premio means prize, so it's better suited the first word instead of the second o Establecer como pantalla de bloqueo Establecer ambos Por defecto - Intentar cargando el vídeo en Redgifs %1$s puntos Si tiene habilitada la autenticación de 2 factores, por favor escriba su contraseña como la siguiente: <contraseña>:<código 2FA> Crosspost diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 4460e271..9e2a2c1c 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -213,7 +213,6 @@ Teeman esikatselu Mikä on tämän teeman nimi\? Kopioi kaikki raakatekstinä - Yritä ladata video Redgifsistä Virheellinen vastaus palvelimelta Jaa linkki Kyllä @@ -384,7 +383,6 @@ \nNapauta yrittääksesi uudelleen. Mukautetut teemat Muuta viestien asettelua - Yritä automaattisesti videoita Redgifsistä jos video Gfycatista on poistettu. 6 tuntia 1 tunti Pyyhkäisyn toiminto diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 56424176..4794e96c 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -343,7 +343,6 @@ Couper le son des vidéos Couper le son des Vidéos NSFW - Essayez d\'accéder automatiquement à redgif si les vidéos sur gfycat sont supprimées. Ignorer la barre de navigation dans le lecteur vidéo Empêcher le contrôleur vidéo de créer une marge supplémentaire Confirmer pour quitter @@ -768,7 +767,6 @@ https://s3.eu-west-1.amazonaws.com/po-pub/i/dFZKKms9HbrDGOlcgW9QTcwF.jpg --> Notifications Messages Message - Échec de la récupération de la vidéo Gfycat Échec de la récupération de la vidéo Redgifs Récupération des informations vidéo. Veuillez patienter. Impossible de charger les images @@ -790,7 +788,6 @@ https://s3.eu-west-1.amazonaws.com/po-pub/i/dFZKKms9HbrDGOlcgW9QTcwF.jpg --> Ajouter à l\'écran de verrouillage Définir pour les deux Par défaut - Essayez de charger la vidéo sur Redgifs %1$s points Si l’authentification à 2 facteurs est activée, vous devez remplir le champ du jeton 2FA. Sinon, laissez le vide. Republier diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index fd458002..668e4566 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -333,7 +333,6 @@ Behavior --> मौन NSFW वीडियोज - स्वतः ही Redgifs खोलने का प्रयास यदि Gfycat पर वीडियोज हटा दी गयी हों। वीडियो प्लेयर में नेवीगेशन बार का छिपना वीडियो कंट्रोलर द्वारा अतिरिक्त हाशिया लेने पर रोक एप छोड़ने की पुष्टि @@ -748,7 +747,6 @@ Behavior --> अधिसूचनाएं संदेश संदेश - Gfycat वीडियो प्राप्ति सफल Redgifs वीडियो प्राप्ति असफल वीडियो इनफो प्राप्त हो रहा है। कृपया प्रतीक्षा करें। चित्र लोड नहीं हो सका @@ -770,7 +768,6 @@ Behavior --> लक स्क्रीन पे सेट करे दोनो पे ही सेट करे पूर्वनिर्धारित - वीडियो रेडगिफ्स पर लोड करने कि कोशिश करे %1$s अंक अगार आपका 2-कदाम प्रमाणीकरण चालू है, तो कृपिया आपना पासबर्ड(चाबी) निम्ना लिखित तरीके से दिजीये: <पासबर्ड>:<2FA code> क्रॉसपोस्ट diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index ad8767be..9bcc856d 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -326,7 +326,6 @@ Isključi ton na videozapisima Isključi ton na NSFW videozapisima - Automatski pokušaj pristupiti Redgifs ako su videozapisi na Gfycatu uklonjeni. Ignoriraj navigacijsku traku u video playeru Onemogući dodatnu marginu na video kontroleru Potvrdi izlaz @@ -739,7 +738,6 @@ Obavijesti Poruke Poruka - Dohvaćanje Gfycat videozapisa nije uspjelo Dohvaćanje Redgifs videozapisa nije uspjelo Dohvaćanje informacija o videozapisu. Molim pričekajte. Nije moguće učitati slike @@ -761,7 +759,6 @@ Postavi na Zaključni zaslon Postavi na oboje Zadano - Pokušajte učitati video na Redgifs %1$s boda/ova Ukoliko imate omogućenu 2-faktorsku autentikaciju, upišite zaporku na sljedeći način:<zaporka>:<2FA kod>. Primjer: vašazaporka:123456 Crosspost diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index c62dc258..03276541 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -309,7 +309,6 @@ Videók némítása NSFW videók némítása - Próbálja autómatikusan elérni a Redgifeket, ha a videók Gfycat-en el vannak távolítva. Navigációs sáv ignorálása videó lejátszóban Annak megelőzése, hogy a videó kontrollernek extra szegélye legyen Kilépés megerősítése @@ -717,7 +716,6 @@ Értesítések Üzenetek Üzenet - Gfycat videó megszerzése nem sikerült Redgifs videó megszerzése nem sikerült Videó infó megszerzése. Kérlek várj. Nem lehet betölteni a képeket @@ -738,7 +736,6 @@ Beállítva zárolt képernyőre Beállítva mindettőre Alapértelmezett - Próbáld meg betölteni a videót Redgifs-en %1$s pont Ha a két faktoros azonosítás be van kapcsolva, kérlek írd be a jelszavad így: <jelszó>:<2FA kód>. Például: jelszavad:123456 Crossposzt diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index fdf1d38a..99f86859 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -308,7 +308,6 @@ Usa i Tasti del Volume per Navigare i Post Muta i video Metti in muto i video NSFW - Prova automaticamente ad accedere a Redgifs se i video su Gfycat vengono rimossi. Ignora la Barra di Navigazione nel Lettore Video Impedisci ai controlli video di avere margine aggiuntivo Conferma per uscire @@ -707,7 +706,6 @@ Notifiche Messaggi Messaggio - Impossibile recuperare il video da Gfycat Impossibile recuperare il video da Redgifs Recupero delle informazioni sul video. Attendere prego. Impossibile caricare immagini @@ -728,7 +726,6 @@ Imposta sulla schermata di blocco Imposta su Entrambi Predefinito - Prova a caricare il video su Redgifs %1$s pts Se hai attivato l\'autenticazione a due fattori, per favore inserisci la password come segue: <password>:<codice per l\'autenticazione a due fattori>. \nEsempio: latuapassword:123456 diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index cdf53f8e..39da0f70 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -337,7 +337,6 @@ 動画をミュート再生 NSFWの動画をミュート再生 - Gfycatの動画が削除されていた場合、自動的にRedgifsでリトライ 動画プレーヤーでナビゲーションバーを無視 動画コントローラーが余分な余白を使用することを防止します アプリの終了確認を表示 @@ -758,7 +757,6 @@ 通知 メッセージ メッセージ - Gfycat動画を取得できませんでした Redgifs動画を取得できませんでした 動画の情報を取得中です。少々お待ちください。 画像をロードできませんでした @@ -782,7 +780,6 @@ ロック画面に設定 両方に設定 Default - Redgifsから動画のロードを試行 %1$s点 2段階認証を有効にしている場合、パスワードは次のように入力してください 「<パスワード>:<2段階認証コード>」 クロスポスト diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index c61460f0..09d240ba 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -324,7 +324,6 @@ "볼륨 키로 포스트 스크롤하기" "둥영상 음소거" "NSFW 둥영상 음소거" - "Gfycat 비디오가 제거되었을 시 자동으로 Redgifs 접근 시도하기" "영상에서 내비게이션 바 무시" "나갈 때 확인" "댓글" diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 3794058f..ffaf74aa 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -312,7 +312,6 @@ Video\'s dempen NSFW-video\'s dempen - Automatisch trachten Redgifs te openen als video\'s zijn verwijderd van Gfycat Navigatiebalk verbergen in videospeler Voorkom dat de navigatiebalk extra opvulling heeft Afsluiten bevestigen @@ -722,7 +721,6 @@ not: "5 uren" --> Notificaties Berichten Bericht - Ophalen van Gfycat video is mislukt Ophalen van Redgifs video is mislukt Ophalen van videoinfo. Even geduld aub. Kan afbeeldingen niet laden @@ -744,7 +742,6 @@ not: "5 uren" --> Als vergrendeldscherm instellen Als beiden instellen Standaard - Probeer de video op Redgifs te laden %1$s pnt Als je 2-factor authenticatie hebt ingeschakeld, typ dan je wachtwoord als volgt in: <wachtwoord>: <2FA code>. \nVoorbeeld: yourpass:123456 diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 02b0c124..4ddb0a2e 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -313,7 +313,6 @@ Wycisz filmy Wycisz wideo NSFW - Automatycznie próbuj uzyskać filmy z Redgifs, gdy są usunięte z Gfycat. Ignoruj pasek nawigacji w odtwarzaczu wideo Zapobiegaj posiadaniu dodatkowego marginesu przez kontroler wideo Potwierdź aby wyjść @@ -720,7 +719,6 @@ Powiadomienia Wiadomości Wiadomość - Nie udało się pobrać filmu z Gfycat Nie udało się pobrać filmu z Redgifs Pobieranie informacji o filmie. Proszę czekać. Nie można załadować obrazów @@ -742,7 +740,6 @@ Ustaw na ekranie blokady Ustaw na obu Domyślnie - Spróbuj załadować film na Redgifs %1$s punktów Jeśli masz włączone uwierzytelnianie dwuskładnikowe, wpisz swoje hasło w następujący sposób: <hasło>:<kod 2FA> Crosspost diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index d3219613..c1ba1824 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -315,7 +315,6 @@ Usar as teclas de volume para navegar entre posts Silenciar vídeos Silenciar vídeos NSFW - Tentar acessar automaticamente o Redgifs se os vídeos do Gfycat forem removidos. Ignorar barra de navegação no reprodutor de vídeos Evitar que o controle de vídeo tenha margens largas Confirmar para sair @@ -717,7 +716,6 @@ Notificações Mensagens Mensagem - Falha ao buscar vídeos do Gfycat Erro ao buscar vídeos do Redgifs Obtendo informações do vídeo. Por favor aguarde. Não foi possível carregar as imagens @@ -738,7 +736,6 @@ Aplicar na tela de bloqueio Aplicar em ambos Padrão - Tente carregar o vídeo no Redgifs %1$s pontos Se você tem a Autenticação em 2 Etapas ativada, digite a senha da seguinte forma: <senha>:<código de autenticação>. \nExemplo: suasenha:123456 diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index a7f8c687..5e2f4e38 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -318,7 +318,6 @@ Vídeos Sem Som Vídeos 18+ Sem Som - Tentar aceder ao Redgifs automaticamente caso os vídeos no Gfycat tenham sido removidos. Ignorar Barra de Navegação no Reprodutor de Vídeo Impedir que o Controlador de Vídeo Tenha Margem Extra Confirmar para Sair @@ -709,7 +708,6 @@ Notificações Mensagens Mensagem - Falha ao obter vídeo do Gfycat Falha ao obter vídeo do Redgifs A obter informações do vídeo. Aguarde. Impossível carregar imagens @@ -730,7 +728,6 @@ Ecrã de Bloqueio Ambos Padrão - Tente carregar o vídeo no Redgifs %1$s pontos Caso tenha autenticação de dois fatores (2FA) ativada, tem de preencher o campo do token 2FA. Caso contrário, deixe-o vazio Republicar diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 864af1a9..7c7dfb50 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -325,7 +325,6 @@ Utilizează Tastele de Volum pentru a Naviga Postările Amuțire Videoclip Amuțire Videoclipurilor NSFW - Încearcă Automat să Accesați Redgifs dacă Videoclipurile de pe Gfycat sunt Eliminate. Ignoră Bara de Navigare în Player-ul pentru Video Împiedică Controller-ul Video să aibă Margine Suplimentară Confirmă pentru a Ieși @@ -735,7 +734,6 @@ Notificări Mesaje Mesaj - Obținerea videoclipului Gfycat a eșuat Obținerea videoclipului Redgifs a eșuat Se obțin informații despre video. Te rugăm să aștepți. Nu s-au putut încărca imaginile @@ -756,7 +754,6 @@ Setează pe Ecranul de Blocare Setează pe Ambele Implicit - Încearcă să încarci videoclipul pe Redgifs %1$s pct Dacă aveți autentificarea cu doi pași activată, va trebui să umpleți câmpul jetonului 2FA. Lăsați-l gol altfel Crosspost diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 763f9454..b386f490 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -319,7 +319,6 @@ Видео без звука NSFW-видео без звука - Пытаться использовать Redgifs, если видео на Gfycat удалены. Не использовать панель навигации в видеоплеере Предотвратить случайные нажатия Подтверждать выход @@ -723,7 +722,6 @@ Уведомления Сообщения Сообщение - Невозможно получить видео Gfycat Невозможно получить видео Redgifs Получение информации о видео. Пожалуйста, подождите. Невозможно загрузить изображения @@ -744,7 +742,6 @@ Установить на экран блокировки Установить на оба экрана По умолчанию - Попробуйте загрузить видео на Redgifs %1$s пойнтов Если у вас включена двухфакторная аутентификация, введите 2FA токен в поле. Иначе оставьте его пустым Кросспост diff --git a/app/src/main/res/values-tr-rTR/strings.xml b/app/src/main/res/values-tr-rTR/strings.xml index ab560506..597b1fe7 100644 --- a/app/src/main/res/values-tr-rTR/strings.xml +++ b/app/src/main/res/values-tr-rTR/strings.xml @@ -320,7 +320,6 @@ This translation does it work well in this kinda format. People use "since" in s Videoları Sessize Al NSFW Videolarını Sessize Al - Gfycat\'teki Videolar Kaldırılmışsa Otomatik Olarak Redgif\'lere Erişmeyi Dene. Video Oynatıcısındaki Navigasyon Çubuğunu Yoksay Video Denetleyicisinde Fazladan Kenar Olmasını Önle Çıkışı Doğrula @@ -726,7 +725,6 @@ This translation does it work well in this kinda format. People use "since" in s Bildirimler Mesajlar Mesaj - Gfycat video\'su alınamadı Redgifs video\'su alınamadı Video bilgisi alınıyor. Lütfen bekleyin. Görüntüler yüklenemedi @@ -748,7 +746,6 @@ This translation does it work well in this kinda format. People use "since" in s Kilit Ekranına Ayarla İkisine de Ayarla Varsayılan - Videoyu Redgifs\'e yüklemeyi deneyin %1$s puan 2 faktörlü kimlik doğrulamasını etkinleştirdiyseniz, lütfen şifrenizi aşağıdaki gibi yazınız: <parola>: <2FA code> Çapraz Gönderi diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 4a72c6f3..301d88bf 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -312,7 +312,6 @@ Пересуватися дописами клавішами гучності Глушити відео Глушити відео НБДР - Автоматично спробувати отримати доступ до Redgifs, якщо відео на Gfycat видалено. Ігнорувати панель пересування у відеопрогравачі Не дозволяти відеоконтролеру мати додаткове поле Підтверджувати вихід @@ -714,7 +713,6 @@ Сповіщення Повідомлення Повідомлення - Не вдалося отримати відеозапис Gfycat Не вдалося отримати відеозапис Redgifs Отримання відомостей про відео. Зачекайте. Неможливо завантажити зображення @@ -735,7 +733,6 @@ Установити на екран блокування Установити для обох Типово - Спробувати завантажити відеозапис на Redgifs %1$s балів Якщо у Вас увімкнено 2-факторну автентифікацію, Вам треба заповнити поле «Токен 2FA». Якщо ні — залиште його порожнім Передопис diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index bbf78dc6..e053f2e9 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -315,7 +315,6 @@ Tắt tiếng Video Tắt tiếng video NSFW - Tự động thử truy cập Redgifs nếu Video trên Gfycat bị xóa. Bỏ qua thanh điều hướng trong trình phát video Ngăn trình điều khiển video có thêm lề Xác nhận để thoát @@ -718,7 +717,6 @@ Thông báo Tin nhắn Tin nhắn - Lấy video Gfycat thất bại Lấy video Redgifs thất bại Đang lấy thông tin video. Vui lòng đợi. Không thể tải hình ảnh @@ -739,7 +737,6 @@ Đặt làm màn hình khoá Đặt làm cả hai Mặc định - Thử tải video trên Redgifs %1$s điểm Nếu bạn đã bật xác thực 2 yếu tố, hãy vui lòng nhập mật khẩu như sau: <mật khẩu>:<mã 2FA>. \nVí dụ: yourpass:123456 diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index d4da3d8f..c0e883e4 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -312,7 +312,6 @@ 静音视频 静音 NSFW 视频 - 如果 Gfycat 上的视频已被删除,则自动尝试访问 Redgifs。 视频播放器中忽略导航栏 防止视频控制栏有额外的外边距 @@ -739,7 +738,6 @@ 通知 消息 消息 - 获取 Gfycat 视频失败 获取 Redgifs 视频失败 正在获取视频信息,请稍候。 无法加载图像 @@ -761,7 +759,6 @@ 设置到锁定屏幕 设置到主屏幕和锁定屏幕 默认字体 - 尝试加载 Redgifs 上的视频 %1$s 分 如果您启用了两步验证,请按如下格式输入密码(使用英文的冒号):<密码>:<两步验证代码>。 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d41b430f..24902d56 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -371,7 +371,6 @@ Use Volume Keys to Navigate Posts Mute Videos Mute NSFW Videos - Automatically Try Accessing Redgifs if Videos on Gfycat are Removed. Ignore Navigation Bar in Video Player Prevent the Video Controller Having Extra Margin Main Page Back Button Action @@ -967,7 +966,6 @@ Notifications Messages Message - Fetch Gfycat video failed Fetch Redgifs video failed Fetching video info. Please wait. Fetch Streamable video failed @@ -994,7 +992,6 @@ Set to Lock Screen Set to Both Default - Try loading the video on Redgifs %1$s pts If you have 2-factor authentication enabled, you need to fill the 2FA token filed. Leave empty otherwise Block User diff --git a/app/src/main/res/xml/video_preferences.xml b/app/src/main/res/xml/video_preferences.xml index ee5c67a2..2bc91bde 100644 --- a/app/src/main/res/xml/video_preferences.xml +++ b/app/src/main/res/xml/video_preferences.xml @@ -14,11 +14,6 @@ app:icon="@drawable/ic_mute_preferences_24dp" app:title="@string/settings_mute_nsfw_video_title" /> - -