Merge pull request #3567 from ByteHamster/prefer-image-from-feed

Prefer image that is specified in feed over embedded image
This commit is contained in:
H. Lehmann 2019-10-28 13:30:35 +01:00 committed by GitHub
commit 3b51af00e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}