return the correct media type for favicons (fix #736)

This commit is contained in:
Athou
2015-06-08 15:53:09 +02:00
parent 18a7bd1fd1
commit 101602c6f6
6 changed files with 34 additions and 22 deletions

View File

@@ -36,7 +36,7 @@ public class YoutubeFaviconFetcher extends AbstractFaviconFetcher {
private final CommaFeedConfiguration config;
@Override
public byte[] fetch(Feed feed) {
public Favicon fetch(Feed feed) {
String url = feed.getUrl();
if (!url.toLowerCase().contains("youtube.com/feeds/videos.xml")) {
@@ -94,8 +94,8 @@ public class YoutubeFaviconFetcher extends AbstractFaviconFetcher {
}
if (!isValidIconResponse(bytes, contentType)) {
bytes = null;
return null;
}
return bytes;
return new Favicon(bytes, contentType);
}
}