Prefer image that is specified in feed over embedded image

This commit is contained in:
ByteHamster 2019-10-27 22:52:41 +01:00
parent eb5514c764
commit 20e025bd2e
2 changed files with 7 additions and 7 deletions

View File

@ -375,10 +375,10 @@ public class FeedItem extends FeedComponent implements ShownotesProvider, ImageR
@Override
public String getImageLocation() {
if(media != null && media.hasEmbeddedPicture()) {
return media.getImageLocation();
} else if (imageUrl != null) {
return imageUrl;
if (imageUrl != null) {
return imageUrl;
} else if (media != null && media.hasEmbeddedPicture()) {
return media.getLocalMediaUrl();
} else if (feed != null) {
return feed.getImageLocation();
} else {

View File

@ -566,10 +566,10 @@ public class FeedMedia extends FeedFile implements Playable {
@Override
public String getImageLocation() {
if (hasEmbeddedPicture()) {
return getLocalMediaUrl();
} else if(item != null) {
if (item != null) {
return item.getImageLocation();
} else if (hasEmbeddedPicture()) {
return getLocalMediaUrl();
} else {
return null;
}