mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-29 19:14:44 +01:00
parent
37ab47bc34
commit
7a39b2341b
@ -43,7 +43,7 @@ public class SortType {
|
||||
TOP_TWELVE_HOURS("TopTwelveHour", "Top"),
|
||||
TOP_DAY("TopDay", "Top"),
|
||||
TOP_WEEK("TopWeek", "Top"),
|
||||
TOP_MONTH("month", "Top"),
|
||||
TOP_MONTH("TopMonth", "Top"),
|
||||
TOP_THREE_MONTHS("TopThreeMonths", "Top"),
|
||||
TOP_SIX_MONTHS("TopSixMonths", "Top"),
|
||||
TOP_NINE_MONTHS("TopNineMonths", "Top"),
|
||||
|
@ -33,7 +33,6 @@ import java.util.concurrent.Executor;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import eu.toldi.infinityforlemmy.markdown.MarkdownUtils;
|
||||
import eu.toldi.infinityforlemmy.postfilter.PostFilter;
|
||||
import eu.toldi.infinityforlemmy.utils.JSONUtils;
|
||||
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;
|
||||
|
||||
Uri uri = Uri.parse(url);
|
||||
if (uri.getAuthority() == null) {
|
||||
Log.e("ParsePost", "parseData:" + uri.toString());
|
||||
}
|
||||
String path = uri.getPath();
|
||||
boolean isVideo = path.endsWith(".mp4") || path.endsWith(".webm") || path.endsWith(".gifv");
|
||||
|
||||
@ -364,7 +366,7 @@ public class ParsePost {
|
||||
|
||||
post.setPreviews(previews);
|
||||
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
|
||||
int postType = Post.VIDEO_TYPE;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user