From 43ccc0e276d4db5de560b8de06c8c66fc69591d3 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Sat, 15 Apr 2017 14:32:01 +0200 Subject: [PATCH] Only use iTunes summary when * no description is set yet OR * it is clearly more detailed (i.e. longer) than the current description --- .../antennapod/core/syndication/namespace/NSITunes.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSITunes.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSITunes.java index 1c424c6b5..7d60566b2 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSITunes.java +++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSITunes.java @@ -101,7 +101,10 @@ public class NSITunes extends Namespace { if (TextUtils.isEmpty(summary)) { return; } - if (state.getCurrentItem() != null) { + if (state.getCurrentItem() != null && + (TextUtils.isEmpty(state.getCurrentItem().getDescription()) || + state.getCurrentItem().getDescription().length() * 1.25 < summary.length()) + ) { state.getCurrentItem().setDescription(summary); } else if (state.getFeed() != null) { state.getFeed().setDescription(summary);