aboutsummaryrefslogtreecommitdiff
path: root/pl/cfg.pl
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-04-13 00:46:59 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-04-13 00:46:59 +0200
commit9e8e9eaf5e0cd56de34bdd74b73663de9aa132e3 (patch)
tree75965d7a53adc8b2105f7c728683df934b483ccd /pl/cfg.pl
parent46ef895756dd2d3d06488066fae6845d2412351c (diff)
downloadEpisodeBrowser-9e8e9eaf5e0cd56de34bdd74b73663de9aa132e3.tar.gz
Persist sort order.
Diffstat (limited to 'pl/cfg.pl')
-rw-r--r--pl/cfg.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/pl/cfg.pl b/pl/cfg.pl
index 78dc267..fa17b38 100644
--- a/pl/cfg.pl
+++ b/pl/cfg.pl
@@ -45,3 +45,11 @@ get_view_tv_original(V) :-
integer(V), !
; V = 1
).
+
+set_sort(V) :- W is V + 2147483647, set_key('Sort', W).
+get_sort(V) :-
+ ( get_key('Sort', W),
+ integer(W), !,
+ V is W - 2147483647
+ ; V = 1
+ ).