mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
@@ -43,7 +43,7 @@ public class SortType {
|
|||||||
TOP_TWELVE_HOURS("TopTwelveHour", "Top"),
|
TOP_TWELVE_HOURS("TopTwelveHour", "Top"),
|
||||||
TOP_DAY("TopDay", "Top"),
|
TOP_DAY("TopDay", "Top"),
|
||||||
TOP_WEEK("TopWeek", "Top"),
|
TOP_WEEK("TopWeek", "Top"),
|
||||||
TOP_MONTH("month", "Top"),
|
TOP_MONTH("TopMonth", "Top"),
|
||||||
TOP_THREE_MONTHS("TopThreeMonths", "Top"),
|
TOP_THREE_MONTHS("TopThreeMonths", "Top"),
|
||||||
TOP_SIX_MONTHS("TopSixMonths", "Top"),
|
TOP_SIX_MONTHS("TopSixMonths", "Top"),
|
||||||
TOP_NINE_MONTHS("TopNineMonths", "Top"),
|
TOP_NINE_MONTHS("TopNineMonths", "Top"),
|
||||||
|
@@ -33,7 +33,6 @@ import java.util.concurrent.Executor;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import eu.toldi.infinityforlemmy.markdown.MarkdownUtils;
|
|
||||||
import eu.toldi.infinityforlemmy.postfilter.PostFilter;
|
import eu.toldi.infinityforlemmy.postfilter.PostFilter;
|
||||||
import eu.toldi.infinityforlemmy.utils.JSONUtils;
|
import eu.toldi.infinityforlemmy.utils.JSONUtils;
|
||||||
import eu.toldi.infinityforlemmy.utils.LemmyUtils;
|
import eu.toldi.infinityforlemmy.utils.LemmyUtils;
|
||||||
@@ -219,6 +218,9 @@ public class ParsePost {
|
|||||||
String authorAvatar = (!data.getJSONObject("creator").isNull("avatar")) ? data.getJSONObject("creator").getString("avatar") : null;
|
String authorAvatar = (!data.getJSONObject("creator").isNull("avatar")) ? data.getJSONObject("creator").getString("avatar") : null;
|
||||||
|
|
||||||
Uri uri = Uri.parse(url);
|
Uri uri = Uri.parse(url);
|
||||||
|
if (uri.getAuthority() == null) {
|
||||||
|
Log.e("ParsePost", "parseData:" + uri.toString());
|
||||||
|
}
|
||||||
String path = uri.getPath();
|
String path = uri.getPath();
|
||||||
boolean isVideo = path.endsWith(".mp4") || path.endsWith(".webm") || path.endsWith(".gifv");
|
boolean isVideo = path.endsWith(".mp4") || path.endsWith(".webm") || path.endsWith(".gifv");
|
||||||
|
|
||||||
@@ -364,7 +366,7 @@ public class ParsePost {
|
|||||||
|
|
||||||
post.setPreviews(previews);
|
post.setPreviews(previews);
|
||||||
post.setVideoUrl(url);
|
post.setVideoUrl(url);
|
||||||
} else if (uri.getAuthority().contains("imgur.com") && (path.endsWith(".gifv") || path.endsWith(".mp4"))) {
|
} else if (uri.getAuthority() != null && uri.getAuthority().contains("imgur.com") && (path.endsWith(".gifv") || path.endsWith(".mp4"))) {
|
||||||
// Imgur gifv/mp4
|
// Imgur gifv/mp4
|
||||||
int postType = Post.VIDEO_TYPE;
|
int postType = Post.VIDEO_TYPE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user