Fixed feed image tests

This commit is contained in:
ByteHamster 2020-05-01 14:39:18 +02:00
parent df47dd37ef
commit 16b7aa7424
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());