This commit is contained in:
Martin Fietz 2016-01-17 14:18:18 +01:00
parent d487949a36
commit 19fb75addf
1 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,6 @@ import android.util.Log;
import org.xml.sax.Attributes;
import de.danoeh.antennapod.core.BuildConfig;
import de.danoeh.antennapod.core.feed.FeedImage;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.feed.FeedMedia;
@ -88,16 +87,15 @@ public class NSAtom extends Namespace {
size = Long.parseLong(strSize);
}
} catch (NumberFormatException e) {
if (BuildConfig.DEBUG) Log.d(TAG, "Length attribute could not be parsed.");
Log.d(TAG, "Length attribute could not be parsed.");
}
String type = attributes.getValue(LINK_TYPE);
if (SyndTypeUtils.enclosureTypeValid(type)
|| (type = SyndTypeUtils
.getValidMimeTypeFromUrl(href)) != null) {
state.getCurrentItem().setMedia(
new FeedMedia(state.getCurrentItem(), href,
size, type)
);
|| (type = SyndTypeUtils.getValidMimeTypeFromUrl(href)) != null) {
}
} else if (rel.equals(LINK_REL_PAYMENT)) {
state.getCurrentItem().setPaymentLink(href);
@ -111,9 +109,11 @@ public class NSAtom extends Namespace {
* LINK_TYPE_HTML or LINK_TYPE_XHTML
*/
if ((type == null && state.getFeed().getLink() == null)
|| (type != null && (type.equals(LINK_TYPE_HTML) || type.equals(LINK_TYPE_XHTML)))) {
|| (type != null && (type.equals(LINK_TYPE_HTML)
|| type.equals(LINK_TYPE_XHTML)))) {
state.getFeed().setLink(href);
} else if (type != null && (type.equals(LINK_TYPE_ATOM) || type.equals(LINK_TYPE_RSS))) {
} else if (type != null && (type.equals(LINK_TYPE_ATOM)
|| type.equals(LINK_TYPE_RSS))) {
// treat as podlove alternate feed
String title = attributes.getValue(LINK_TITLE);
if (title == null) {