summaryrefslogtreecommitdiff
path: root/model/src
diff options
context:
space:
mode:
authorShom Bandopadhaya <shom@bandopadhaya.com>2022-01-04 10:26:59 +0000
committerGitHub <noreply@github.com>2022-01-04 11:26:59 +0100
commit8568226468e7377e273410847a97ebf8a1d7e5e7 (patch)
tree487879cce40c1dba0180d4041430bdde9f0cf26f /model/src
parent4f031c4e45cc2e83059da8bed55f23bca345320d (diff)
downloadAntennaPod-8568226468e7377e273410847a97ebf8a1d7e5e7.zip
Local feeds: add sort option for file name (#5629)
Co-authored-by: widlok <widlok@users.noreply.github.com>
Diffstat (limited to 'model/src')
-rw-r--r--model/src/main/java/de/danoeh/antennapod/model/feed/SortOrder.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/model/src/main/java/de/danoeh/antennapod/model/feed/SortOrder.java b/model/src/main/java/de/danoeh/antennapod/model/feed/SortOrder.java
index cbc56fd11..1f9687b2e 100644
--- a/model/src/main/java/de/danoeh/antennapod/model/feed/SortOrder.java
+++ b/model/src/main/java/de/danoeh/antennapod/model/feed/SortOrder.java
@@ -18,6 +18,8 @@ public enum SortOrder {
EPISODE_TITLE_Z_A(4, INTRA_FEED),
DURATION_SHORT_LONG(5, INTRA_FEED),
DURATION_LONG_SHORT(6, INTRA_FEED),
+ EPISODE_FILENAME_A_Z(7, INTRA_FEED),
+ EPISODE_FILENAME_Z_A(8, INTRA_FEED),
FEED_TITLE_A_Z(101, INTER_FEED),
FEED_TITLE_Z_A(102, INTER_FEED),
RANDOM(103, INTER_FEED),
@@ -68,4 +70,12 @@ public enum SortOrder {
public static String toCodeString(@Nullable SortOrder sortOrder) {
return sortOrder != null ? Integer.toString(sortOrder.code) : null;
}
+
+ public static SortOrder[] valuesOf(String[] stringValues) {
+ SortOrder[] values = new SortOrder[stringValues.length];
+ for (int i = 0; i < stringValues.length; i++) {
+ values[i] = SortOrder.valueOf(stringValues[i]);
+ }
+ return values;
+ }
}