diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2017-04-15 14:32:01 +0200 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2017-04-15 14:32:01 +0200 |
commit | 43ccc0e276d4db5de560b8de06c8c66fc69591d3 (patch) | |
tree | a8b6aa8a9aecc19736d5de5f41f79bcd1ed46eb8 /core/src/main | |
parent | 09fc0debf141eee622e46fd1fb5ccb1ad2793bd2 (diff) | |
download | AntennaPod-43ccc0e276d4db5de560b8de06c8c66fc69591d3.zip |
Only use iTunes summary when
* no description is set yet OR
* it is clearly more detailed (i.e. longer) than the current description
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSITunes.java | 5 |
1 files changed, 4 insertions, 1 deletions
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); |