Don't show Redgifs videos in app.

This commit is contained in:
Docile-Alligator 2025-07-07 21:24:54 -04:00
parent 9a1a23b71e
commit 8a55adeff0
2 changed files with 17 additions and 12 deletions

View File

@ -312,7 +312,7 @@ public class LinkResolverActivity extends AppCompatActivity {
if (path.startsWith("/CL0/")) {
handleUri(Uri.parse(path.substring("/CL0/".length())));
}
} else if (authority.contains("redgifs.com")) {
}/* else if (authority.contains("redgifs.com")) {
if (path.matches(REDGIFS_PATTERN)) {
Intent intent = new Intent(this, ViewVideoActivity.class);
intent.putExtra(ViewVideoActivity.EXTRA_REDGIFS_ID, path.substring(path.lastIndexOf("/") + 1));
@ -322,7 +322,7 @@ public class LinkResolverActivity extends AppCompatActivity {
} else {
deepLinkError(uri);
}
} else if (authority.contains("imgur.com")) {
}*/ else if (authority.contains("imgur.com")) {
if (path.matches(IMGUR_GALLERY_PATTERN)) {
Intent intent = new Intent(this, ViewImgurMediaActivity.class);
intent.putExtra(ViewImgurMediaActivity.EXTRA_IMGUR_TYPE, ViewImgurMediaActivity.IMGUR_TYPE_GALLERY);

View File

@ -335,13 +335,14 @@ public class ParsePost {
String authority = uri.getAuthority();
if (authority != null) {
if (authority.contains("redgifs.com")) {
/*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.setRedgifsId(redgifsId);
} else if (authority.equals("streamable.com")) {
} else */
if (authority.equals("streamable.com")) {
String shortCode = url.substring(url.lastIndexOf("/") + 1);
post.setPostType(Post.VIDEO_TYPE);
post.setIsStreamable(true);
@ -529,13 +530,14 @@ public class ParsePost {
String authority = uri.getAuthority();
if (authority != null) {
if (authority.contains("redgifs.com")) {
/*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.setRedgifsId(redgifsId);
} else if (authority.equals("streamable.com")) {
} else*/
if (authority.equals("streamable.com")) {
String shortCode = url.substring(url.lastIndexOf("/") + 1);
post.setPostType(Post.VIDEO_TYPE);
post.setIsStreamable(true);
@ -596,13 +598,14 @@ public class ParsePost {
String authority = uri.getAuthority();
if (authority != null) {
if (authority.contains("redgifs.com")) {
/*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.setRedgifsId(redgifsId);
} else if (authority.equals("streamable.com")) {
} else*/
if (authority.equals("streamable.com")) {
String shortCode = url.substring(url.lastIndexOf("/") + 1);
post.setPostType(Post.VIDEO_TYPE);
post.setIsStreamable(true);
@ -618,7 +621,7 @@ public class ParsePost {
try {
String authority = uri.getAuthority();
if (authority != null) {
if (authority.contains("redgifs.com")) {
/*if (authority.contains("redgifs.com")) {
String redgifsId = url.substring(url.lastIndexOf("/") + 1);
if (redgifsId.contains("-")) {
redgifsId = redgifsId.substring(0, redgifsId.indexOf('-'));
@ -626,7 +629,8 @@ public class ParsePost {
post.setIsRedgifs(true);
post.setVideoUrl(url);
post.setRedgifsId(redgifsId.toLowerCase());
} else if (authority.equals("streamable.com")) {
} else*/
if (authority.equals("streamable.com")) {
String shortCode = url.substring(url.lastIndexOf("/") + 1);
post.setPostType(Post.VIDEO_TYPE);
post.setIsStreamable(true);
@ -693,13 +697,14 @@ public class ParsePost {
String authority = uri.getAuthority();
if (authority != null) {
if (authority.contains("redgifs.com")) {
/*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.setRedgifsId(redgifsId);
} else if (authority.equals("streamable.com")) {
} else*/
if (authority.equals("streamable.com")) {
String shortCode = url.substring(url.lastIndexOf("/") + 1);
post.setPostType(Post.VIDEO_TYPE);
post.setIsStreamable(true);