diff options
author | malockin <malockin@gmail.com> | 2020-05-03 18:17:42 +0300 |
---|---|---|
committer | malockin <malockin@gmail.com> | 2020-05-03 18:17:42 +0300 |
commit | 4f8979ecacbb7f7c8c2a854bc6f2c98f5f89f5cf (patch) | |
tree | eaaf95e6380aecac6581b0e22e344ef682c0a7fb /core | |
parent | f634198794ee3e15fc02f677da1642c7df0f5271 (diff) | |
download | AntennaPod-4f8979ecacbb7f7c8c2a854bc6f2c98f5f89f5cf.zip |
Reformatted output, added Hebrew translation
Reformatted output to be sorted by date in descending order. Added links
to episode page, as well as direct media download.
Added Hebrew transaltion for Favorites export.
Removed unused code.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java | 20 | ||||
-rw-r--r-- | core/src/main/res/values-iw-rIL/strings.xml | 3 |
2 files changed, 13 insertions, 10 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java b/core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java index a6686a8a4..39e968ce9 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java @@ -35,7 +35,7 @@ public class FavoritesWriter implements ExportWriter { String template = IOUtils.toString(templateStream, "UTF-8"); String[] templateParts = template.split("\\{FAVORITES\\}"); - Map<Long, List<FeedItem>> favoriteByFeed = getFeedMap(getFavorites(feeds)); + Map<Long, List<FeedItem>> favoriteByFeed = getFeedMap(getFavorites()); writer.append(templateParts[0]); writer.append("<ul>"); @@ -60,7 +60,7 @@ public class FavoritesWriter implements ExportWriter { Log.d(TAG, "Finished writing document"); } - private List<FeedItem> getFavorites(List<Feed> feeds) { + private List<FeedItem> getFavorites() { int page = 0; List<FeedItem> favoritesPage = DBReader.getFavoriteItemsList(page, PAGE_LIMIT); @@ -79,7 +79,8 @@ public class FavoritesWriter implements ExportWriter { favoritesPage = DBReader.getFavoriteItemsList(page * PAGE_LIMIT, PAGE_LIMIT); } - Collections.sort(favoritesList, (lhs, rhs) -> lhs.getPubDate().compareTo(rhs.getPubDate())); + // sort in descending order + Collections.sort(favoritesList, (lhs, rhs) -> rhs.getPubDate().compareTo(lhs.getPubDate())); return favoritesList; } @@ -114,14 +115,13 @@ public class FavoritesWriter implements ExportWriter { } private void writeFavoriteItem(Writer writer, FeedItem item) throws IOException { - writer.append("<li><span>["); - writer.append(DATE_FORMAT.format(item.getPubDate())); - writer.append("] <a href=\""); - writer.append(item.getLink()); - writer.append("\">"); + writer.append("<li><span>"); writer.append(item.getTitle().trim()); - writer.append("</a>"); - writer.append("</span></li>\n"); + writer.append("<br>\n[<a href=\""); + writer.append(item.getLink()); + writer.append("\">Website</a>] • [<a href=\""); + writer.append(item.getMedia().getDownload_url()); + writer.append("\">Media</a>]</span></li>\n"); } @Override diff --git a/core/src/main/res/values-iw-rIL/strings.xml b/core/src/main/res/values-iw-rIL/strings.xml index cdd31c600..d20a388bc 100644 --- a/core/src/main/res/values-iw-rIL/strings.xml +++ b/core/src/main/res/values-iw-rIL/strings.xml @@ -556,6 +556,9 @@ <string name="import_select_file">בחירת קובץ לייבוא</string> <string name="import_ok">הייבוא הצליח.\n\nנא ללחוץ על אישור כדי להפעיל את אנטנה־פּוֹד מחדש</string> <string name="import_no_downgrade">מסד נתונים זה ייוצא עם גרסה עדכנית יותר של אנטנה־פוֹד</string> + <string name="favorites">מועדפים</string> + <string name="favorites_export_label">ייצוא מועדפים</string> + <string name="favorites_export_summary">ייצוא פרקים מועדפים לקובץ</string> <!--Sleep timer--> <string name="set_sleeptimer_label">הגדרת מתזמן שינה</string> <string name="disable_sleeptimer_label">השבתת מתזמן שינה</string> |