Merge pull request #4095 from ByteHamster/fix-feedhandler-test

Fixed feed image tests
This commit is contained in:
H. Lehmann 2020-05-01 15:38:03 +02:00 committed by GitHub
commit c33669478a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -118,7 +118,7 @@ public class FeedHandlerTest {
assertEquals(media.getMime_type(), parsedMedia.getMime_type());
}
assertEquals(item.getImageUrl(), parsedFeed.getImageUrl());
assertEquals(feed.getImageUrl(), item.getImageLocation());
if (item.getChapters() != null) {
assertNotNull(parsedItem.getChapters());

View File

@ -100,8 +100,8 @@ public class CastUtils {
metadata.putString(MediaMetadata.KEY_SUBTITLE, subtitle);
}
if (!TextUtils.isEmpty(feedItem.getImageUrl())) {
metadata.addImage(new WebImage(Uri.parse(feedItem.getImageUrl())));
if (!TextUtils.isEmpty(feedItem.getImageLocation())) {
metadata.addImage(new WebImage(Uri.parse(feedItem.getImageLocation())));
}
Calendar calendar = Calendar.getInstance();
calendar.setTime(media.getItem().getPubDate());